[clang][DebugInfo] Add virtuality call-site target information in DWARF. (#182510)
Given the test case:
struct CBase {
virtual void foo();
};
void bar(CBase *Base) {
Base->foo();
}
and using '-emit-call-site-info' with llc, the following DWARF
is produced for the indirect call 'Base->foo()':
1$: DW_TAG_structure_type "CBase"
...
2$: DW_TAG_subprogram "foo"
...
[20 lines not shown]
[ConstantTime][RISCV] Add comprehensive tests for ct.select
Add comprehensive test suite for RISC-V fallback implementation:
- Edge cases (zero conditions, large integers, sign extension)
- Pattern matching (nested selects, chains)
- Vector support with RVV extensions
- Side effects and memory operations
The basic fallback test is in the core infrastructure PR.
[LLVM][ARM] Add native ct.select support for ARM32 and Thumb
This patch implements architecture-specific lowering for ct.select on ARM
(both ARM32 and Thumb modes) using conditional move instructions and
bitwise operations for constant-time selection.
Implementation details:
- Uses pseudo-instructions that are expanded Post-RA to bitwise operations
- Post-RA expansion in ARMBaseInstrInfo for BUNDLE pseudo-instructions
- Handles scalar integer types, floating-point, and half-precision types
- Handles vector types with NEON when available
- Support for both ARM and Thumb instruction sets (Thumb1 and Thumb2)
- Special handling for Thumb1 which lacks conditional execution
- Comprehensive test coverage including half-precision and vectors
The implementation includes:
- ISelLowering: Custom lowering to CTSELECT pseudo-instructions
- ISelDAGToDAG: Selection of appropriate pseudo-instructions
- BaseInstrInfo: Post-RA expansion of BUNDLE to bitwise instruction sequences
[3 lines not shown]
[LLVM][AArch64] Add native ct.select support for ARM64
This patch implements architecture-specific lowering for ct.select on AArch64
using CSEL (conditional select) instructions for constant-time selection.
Implementation details:
- Uses CSEL family of instructions for scalar integer types
- Uses FCSEL for floating-point types (F16, BF16, F32, F64)
- Post-RA MC lowering to convert pseudo-instructions to real CSEL/FCSEL
- Handles vector types appropriately
- Comprehensive test coverage for AArch64
The implementation includes:
- ISelLowering: Custom lowering to CTSELECT pseudo-instructions
- InstrInfo: Pseudo-instruction definitions and patterns
- MCInstLower: Post-RA lowering of pseudo-instructions to actual CSEL/FCSEL
- Proper handling of condition codes for constant-time guarantees
[LLVM][X86] Add f80 support for ct.select
Add special handling for x86_fp80 types in CTSELECT lowering by splitting
them into three 32-bit chunks, performing constant-time selection on each
chunk, and reassembling the result. This fixes crashes when compiling
tests with f80 types.
Also updated ctselect.ll to match current generic fallback implementation.
[LLVM][X86] Add native ct.select support for X86 and i386
Add native X86 implementation with CMOV instructions and comprehensive tests:
- X86 ISelLowering with CMOV for x86_64 and i386
- Fallback bitwise operations for i386 targets without CMOV
- Post-RA expansion for pseudo-instructions
- Comprehensive test coverage:
- Edge cases (zero conditions, large integers)
- i386-specific tests (FP, MMX, non-CMOV fallback)
- Vector operations
- Optimization patterns
The basic test demonstrating fallback is in the core infrastructure PR.
[clang][ssaf] Add checks for missing and mismatched `EntitySummary` data and improve code coverage
This PR adds new checks and tests for null `EntitySummary`, and
`SummaryName` match against `EntitySummary::getSummaryName()`. It also
adds tests for `SummaryName` with no registered `FormatInfo`.
As part of this change, the `JSONFormatTest` fixture has been made to
inherit from `ssaf::TestFixture` to provide its subclasses direct access
to the private-field accessors that TestFixture exposes.
This brings JSONFormat.cpp to almost 100% coverage. The remaining
uncovered lines are either in untestable paths or coverage
instrumentation artifacts.
[lldb] Limit Python include dir to ScriptInterpreterPython (NFC) (#183236)
Limit Python include dir to ScriptInterpreterPython and any library that
depends on it (i.e. liblldb), making it consistent with what we do for
Lua.
[MLIR][NVVM] Enable result type inference (#181781)
Includes `InferOpTypeInterface.td` in `NVVMOps.td` enabling result type
inference for NVVM operations.
Fixes a test for `nvvm.redux.sync` in `nvvm.py` due to a resulting
change in the python binding for the operation.
[lld][LoongArch] Fix range checking of R_LARCH_*_PCADD_HI20 relocations on 64-bit
According to the la-abi-specs, the R_LARCH_*_PCADD_HI20 relocations are
also used on 64-bit LoongArch. Fix the range checking accordingly.
[lldb] Extract CMake logic to add SWIG wrapper into helper function (#183203)
Extract the CMake logic to add SWIG wrapper into helper function defined
in the bindings directly. This avoid code duplication between Python and
Lua.
The function is parameterized in its target, making it possible to add
the wrapper to a different target, for example the respective script
interpreter plugin when building dynamic plugins.
[Clang][NFC] Correct the test in PR183010 (#183226)
We should test non-type-dependent type aliases.
(I copy-pasted wrong code which is used for debugging. Thanks to Richard
for spotting that)
[clang] allow canonicalizing assumed template names
Assumed template names are part of error recovery and encode just a
declaration name, making them always canonical. This patch allows
them to be canonicalized, which is trivial.
Fixes #183075
[AMDGPU] Add LIT tests for DS loop waitcnt prefetch flushed (tests-only PR) (#183217)
Test-only PR for PR #175658, and remove -O3 from PR #172728 LIT test per
post-merge comment
[clang] allow canonicalizing assumed template names
Assumed template names are part of error recovery and encode just a
declaration name, making them always canonical. This patch allows
them to be canonicalized, which is trivial.
Fixes #183075
[Clang] Check the underlying type dependency in concept checking guards (#183010)
In the concept parameter mapping patch, we partially preserved sugar for
concept checking. However, in dependent contexts there may be
non-dependent aliases that still require concept checking to filter out
unwanted functions.
No release note because of being a regression.
Fixes https://github.com/llvm/llvm-project/issues/182344