[DirectX] Resources and simple GEP traversal in DXILMemIntrinsics (#173054)
Walk through GEPs and recognize resource target extension types when
trying to infer the underlying types of memory intrinsics.
Reland "[Clang] Load pass plugins before parsing LLVM options" (#171868)
This permits pass plugins to use llvm::cl::opt. Additionally, add a test
of -fpass-plugin, this was previously not tested at all.
I'm not sure whether using the LLVM Bye.so in the tests is possible this
way (e.g., if Clang is built standalone).
Reland after #173279.
Pull Request: https://github.com/llvm/llvm-project/pull/173287
[MLIR][NVVM][Tests]: Update FileCheck primitives (#173252)
This patch updates a few FileCheck primitives for the TMA test
to use CHECK-PTX-DAG instead of CHECK-PTX to accommodate
a slightly different ordering of BB's.
The dump-ptx integration test fails when the PTX is generated
through nvcc (intermediates) from public toolkit. This patch fixes
it by allowing regex strings from both the backends.
Signed-off-by: Durgadoss R <durgadossr at nvidia.com>
[SelectionDAG] Make SSHLSAT/USHLSAT obey getShiftAmountTy(). (#173216)
Treat these like other shift operations by allowing the shift amount to
be a different type than the result.
The PromoteIntOp_Shift and LegalizeDAG code are not tested due to lack
of target support.
I'm looking at adding SSHLSAT for the RISC-V P extension. I don't need
this support for that since RISC-V only has one legal type. I just thought it
was odd that they weren't like other shifts.
[libc][math] Add LIBC_CONF_MATH_USE_SYSTEM_FENV / LIBC_MATH_USE_SYSTEM_FENV (#172902)
This is to allow math function implementations to use system libc's
fenv.h instead of internal fenv implementations.
[VectorCombine] foldPermuteOfBinops - support multi-use binary ops and operands in shuffle folding (#173153)
Fixes #173033
This patch extends VectorCombine to fold binary operations through
shuffles in scenarios involving multiple uses of both the binary
operator and its operands.
Previously, the transformation was restricted to single-use cases to
prevent instruction duplication. This change implements a cost-based
evaluation that allows the fold even when:
1. The binary operator has multiple users (requiring duplication of the
arithmetic instruction).
2. The operands of the binary operator (the shuffles) have multiple
users (requiring the original shuffles to be preserved).
The optimization is performed if the TTI cost of the new instruction
sequence—including any duplicated arithmetic—is lower than the cost of
the shuffle sequence it replaces. This is particularly beneficial on X86
targets for expensive cross-lane shuffles.
Avoid merging globals residing in different comdats (#172835)
The global-merge pass may merge globals residing in different comdat
groups, which may later confuse linker if section GC is being used. In
particular this may happen when merging instrumentation profiler
counters when their corresponding __llvm_prf_cnts sections are being
merged into a single one and moved out of a comdat group, containing
__llvm_prf_cnts and __llvm_prf_data sections. After that __llvm_prf_data
section is becoming orphaned and is garbage-collected when --gc-sections
linker flag is used.
[LifetimeSafety] Add missing origins stats for lifetime analysis (#166568)
This PR adds the implementation for printing missing origin stats for
lifetime analysis.
**Purpose:**
This capability is added to track the expression types with missing
origin. While retrieving the origins from origin manager, some
expressions show missing origins. Currently these are created on the fly
using getOrCreate function. For analysing the coverage of the check, it
will be necessary to see what kind of expressions have a missing origin.
It prints the counts in this form: `QualType : count` and `StmtClassName
: count`.
**Approach:**
1. The signature of the runLifetimeAnalysis function is changed to
return the LifetimeAnalysis object which will be used to get the origin
[21 lines not shown]
[LLVM][NFC] Move PassPlugin from Passes to separate library
This avoid pulling in the entire Passes library with all passes as
dependencies when just referring to PassPlugin, which is in fact
independent of the Passes themselves.
Pull Request: https://github.com/llvm/llvm-project/pull/173279