AArch64: Use the DAG's libcall info in call and DAG lowering
Use the analysis libcall info instead of the static copy in
TargetLowering, which will eventually be removed.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Hexagon: Remove redundant clearKillFlags calls
HexagonOptAddrMode recomputes kill flags with Liveness::resetKills
after any change, so its clears are redundant.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
X86: Remove clearKillFlags call in X86FlagsCopyLowering
Kill flags on physical registers here are either never set by the time
this code runs or are on reserved or constant registers where they
carry no information.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Analysis] Port inliner threshold options to AnalysisOptions (#239650)
getInlineParams, getInlineParamsFromOptLevel, and
InlineConstants::getInstrCost take an LLVMContext. ModuleInlinerPass and
ModuleInlinerWrapperPass no longer default their InlineParams, which
read options during pass construction.
LLM-aided
AArch64: Remove clearKillFlags calls
Kill flags are no longer permitted on virtual registers, but these
contexts may also see physical registers. Those physical register
kills are either never set by the time this code runs or are on
reserved or constant registers where they carry no information.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
SelectionDAG: Get libcall info from analysis, not TargetLowering (#239827)
TargetLowering's copy of the libcall info will eventually be
removed. Use the LibcallLoweringInfo analysis from SelectionDAG
instead.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
powerpc: Define the sub-word atomic load and store directly
All currently supported powerpc CPUs handle single-copy atomicity for
any size up to the native word size, so load and store operations are
guaranteed for sub-word size that are naturally aligned.
BPF: Register the unwind passes
Give BPFUnwindPrepare and BPFUnwindLower names, so that tests can stop
after them or run them on MIR.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[orc-rt] Report lookup failures from sps::lookupInJITDylib (#239890)
sps::lookupInJITDylib's wire signature returned a bare
SPSSymbolLookupResult, so the controller had no in-band way to report
that the lookup itself failed (e.g. a missing required symbol, or a
materialization failure). The only option was an out-of-band error,
which is indistinguishable from a failure to call the controller.
This commit changes the controller handler's return type to
SPSExpected<SPSSymbolLookupResult>, matching the NativeDylibManager
lookup. The public API is unchanged: lookupInJITDylib flattens the
transport and lookup errors into the Expected<SymbolLookupResult> passed
to its continuation.
The unit tests now check both error paths separately.
www/pomerium: update to 0.34.0
Release notes: https://github.com/pomerium/pomerium/releases/tag/v0.34.0
- Switch to Go 1.27, which upstream now requires.
- Regenerate modules.txt and update GH_TUPLE for the dependency
refresh. The Azure customtokenproxy package is now listed by
upstream, so it no longer needs to be added by hand.
- genproto googleapis/api and googleapis/rpc are now at different
commits; api comes from the root genproto tuple, rpc has its own.
- Fetch opentelemetry-go v1.46.0 for exporters/ and bridge/opencensus,
which upstream pins to an older release than the v1.47.0 root
module.
www/pomerium-envoy-custom: update to 1.37.0.20261102
Update to envoy-custom commit e7b75c3a606d, which moves the bundled
Envoy from 1.38.8 to 1.38.9, as required by pomerium 0.34.0.
Envoy 1.38.9 has no dependency changes. Add upstream's new
0014-disable-coverage-report-rounding.patch to the pre-build patch
list, and teach the new license_stamp.bzl rule about FreeBSD; its
select() only covered Linux and macOS.
BPF: Register the unwind passes
Give BPFUnwindPrepare and BPFUnwindLower names, so that tests can stop
after them or run them on MIR.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang][OpenMP] Fix assertion in the debug wrapper of CPU target kernels (#239580)
Fixes #188535
Any `omp target` region compiled for a CPU offload target with `-g` hit
the `Argument count mismatch` assert in
`GenerateOpenMPCapturedStmtFunctionAggregate`. It compared the field
count plus one against `F->getNumOperands()`, which on an
`llvm::Function` counts the hung-off operands (personality, prefix,
prologue data), not the parameters. That is zero here, so it fired on
every region. The IR emitted after it was fine, so release builds never
noticed.
Compare against `F->arg_size()` instead, which is what the code below
relies on: one parameter per captured field plus the implicit `dyn_ptr`.
AI assisted!
TableGen: Only collect sub-registers when there are candidate sub-classes (#239308)
For each register class and sub-register index,
inferMatchingSuperRegClass
looked up the sub-register of every member before checking for candidate
sub-classes, but most pairs have none: 73% for AMDGPU, with 62% of the
lookups. Collect the sub-registers when the first candidate is found.
The candidates are found by the TopoSigs of the sub-registers, which are
the same for registers with the same TopoSig. So find them once per
class
from one member per TopoSig, which is usually a single member.
AMDGPU tablegen runs that build the register bank:
Gigainstructions Gigacycles CPU seconds
Before 564 311 100
After 561 (-0.5%) 295 (-5.2%) 95 (-4.9%)
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
TableGen: Key register classes by member EnumValues in Key2RC (#239309)
Key2RC is searched with Key::operator<, which compares member lists and
loads every register in both. Store the EnumValues of the non-artificial
members in the keys instead, so a lookup only loads the members of the
class being looked up.
AMDGPU tablegen runs that build the register bank:
Gigainstructions Gigacycles CPU seconds
Before 561 295 95
After 536 (-4.5%) 287 (-2.7%) 93 (-1.9%)
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
powerpc64: Don't ignore lookup errors in kernel linker
If a lookup fails for a R_PPC_JMP_SLOT (PLT relocation) ignoring errors
results in an address of 0 gets written into the jump slot, leading to a
NULL pointer jump when attempting to call the function it points to.
Fix this with proper error checking so that a module will fail to load
instead of crashing later on.
[CIR] Add unnamed_addr to cir.global (#239429)
Add an `unnamed_addr` unit property to cir.global and lower it to the
LLVM dialect's `unnamed_addr` attribute.
The LLVM dialect models this as a three-valued enum
(`#llvm.unnamed_addr<none|local_unnamed_addr|unnamed_addr>`). CIR uses
an on/off flag instead: classic codegen only ever sets `unnamed_addr` or
nothing, never `local_unnamed_addr` (that is introduced later by
optimization passes), so the extra state is not needed.
AI modified the tests accordingly.
camcontrol: Fix -Wcast-align errors in the NVMe reservation report
Casting the byte buffer that holds the Reservation Report payload to
the status structures trips -Wcast-align on strict-alignment
architectures, which broke the CI builds there. Put the buffer in a
union with the two status structures instead, so it is properly
aligned and no casts are needed.
Reported by: FreeBSD CI
Fixes: ba75cf05727e ("camcontrol: Support NVMe reservations via the persist subcommand")
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
MFC after: 1 week
Sponsored by: Spectra Logic
[CIR] Match classic codegen's shouldEmitRTTI for offload devices (#239817)
CIR's shouldEmitRTTI only disabled RTTI for CUDA/HIP device compiles and
OpenMP device compiles on NVPTX. Classic codegen disables it for any
offload device compile (SYCL, OpenMP, CUDA, HIP) targeting a GPU.
I use the same condition as classic codegen. CUDA and HIP behavior is
unchanged. Classic CodeGen does not have a.t.m tests for SYCL or OMP
on AMDGPU I could not find any OG tests. As such, I am pushing tests
on the CIR test dir.
[Option] Add and use LLVM_REGISTER_LIBRARY_OPTIONS. NFC (#239887)
Extract from #239678: Exempt the file-scope registration of options
struct from -Wglobal-constructors, in preparation for enabling
-Werror=global-constructors for llvm/lib.
[CGP] Fix incorrect sized ConstantInt crash
Fixes a buildbot failure after #226197, https://lab.llvm.org/buildbot/#/builders/210/builds/13772.
We were always using a 64-bit APInt for StructSize which causes a type mismatch and crash for 32-bit targets with scalable vectors, e.g. riscv32 with +v
[perf-training][merge-fdata] Clean up input fdata files (#139650)
BOLT AArch64 worker has been running out of disk space due to excessive
fdata files being produced from clang-bolt builder. Delete merged fdata
files to counter disk space waste.
[Clang][C++2d] Implement defaulted postfix increment and decrement operators (P3668R4) (#229560)
Paper:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3668r4.html
Allow the postfix `operator++(int)` and `operator--(int)` to be
explicitly defaulted, as specified by P3668R4 ([over.inc.default]). The
implicit definition of a defaulted postfix operator for a type `C` is
equivalent to
```cpp
C tmp(c);
++c; // or --c
return tmp;
```
where c denotes `*this` for an implicit object member function and the
first parameter otherwise. The copy is direct-initialized and `tmp` is a
candidate for named return value optimization.
[32 lines not shown]
[compiler-rt][test] Use sysroot dynamic linker and rpath on Linux (#239878)
Follow-up to https://github.com/llvm/llvm-project/pull/239742.
`glibc-X.Y` lit features are detected from `CMAKE_SYSROOT` headers, but
test binaries still executed against the host's glibc at runtime,
breaking
tests like `preinit_array.cpp` (`UNSUPPORTED: glibc-2.34`) and
`getline_nohang.cpp` (`UNSUPPORTED: glibc-2.38`) when the host glibc is
newer than the sysroot.
Assisted-by: Gemini
CodeGen: Remove clearKillFlags calls on virtual registers (#239778)
Kill flags are no longer permitted on virtual registers, so clearing
them is a no-op. Remove the calls in generic passes where the register
can only be virtual.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>