[BOLT] Remove unneeded mc::RegisterMCTargetOptionsFlags (#239910)
PR #100800 added this registration because DwarfStreamer::init called
mc::InitMCTargetOptionsFromFlags, which asserts if the options are not
registered, and #100771 removed the registration from DWP.
DwarfStreamer also no longer needs these MC tool options.
[X86] Fix -Wunused-variable from #239777 (#239902)
Deleted some uses that left other variables unused outside of LLVM_DEBUG
which is only enabled with LLVM_ENABLE_ASSERTIONS, leaving release
builds with -Wunused-variable.
Mark [[maybe_unused]] to prevent the warning as-is standard.
[SLP] Pruning when there is no Undef
A poison value and concrete value can always pass
isGuaranteedNotToBePoison. Nowadays, we generates very few undef
value. So the prunning here makes sense as we try to do linear check
to find a possible undef instead of calling the very expensive
isGuaranteedNotToBePoison.
[DWARFLinker] Remove mc::RegisterMCTargetOptionsFlags (#239904)
dsymutil, llvm-dwarfutil, and the DwarfGenerator unittest never
parse/use these MC command line options. These were added around 2020
for "Move DwarfStreamer into DWARFLinker".
[clang][bytecode] Remove unused InlineDescriptor constructor (NFC) (#239688)
The last callers of InlineDescriptor::InlineDescriptor were removed on
November 6, 2026 in commit 0a0e65b2e8ff6043d85ab07c4d23ea18bf0b9b7d.
Assisted-by: Antigravity
AArch64: Use the DAG's libcall info (#239895)
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>
BPF: Stop lowering unwinding through nonexistent unwinder calls
BPF borrowed the DWARF EH pipeline in an unsound way. DwarfEHPrepare
turned resume into a call of _Unwind_Resume, which will never be
linked in. BPFUnwindLower later replaced it, and calls of
_Unwind_RaiseException, by matching callee names after register
allocation. This fixes the pass pipeline relying on these transient
calls to phantom functions.
Instead add an invokable llvm.bpf.unwind.exit intrinsic, similar to
wasm's throw intrinsics. BPFUnwindPrepare replaces resume with it so
no impossible call to _Unwind_Resume reaches selection.
The intrinsic selects to a pseudo which BPFUnwindLower turns into
either unwind_exit or a branch to the landing pad when invoked. The
pseudo clobbers nothing, so register allocation can be more aggressive
than when the function looked like an ordinary call.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang][Sema] Recheck array size once the element type is complete (#219817)
Fixes #213855
`BuildArrayType` can't check an array's byte size when the element type
is still incomplete, for example an array of a class template
specialization that hasn't been instantiated yet. Nothing rechecked it
afterwards, so a `~2^67` byte array type survived as a valid field and
the first size query asserted in `getTypeInfoImpl`.
`RequireCompleteType` now checks the size of a constant array once it is
complete, using the same limit as `BuildArrayType`. The error reports
bytes (new `err_array_size_too_large`) since the element count was
already accepted. Uninitialized variable definitions now require the
whole array type to be complete rather than just the base element type,
as initialized ones already do.
LLM tools were used for this contribution. I've reviewed, built, and
tested the change myself before pushing to GitHub.
X86: Remove clearKillFlags call in X86FlagsCopyLowering (#239893)
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>
[libc++] Implement ADL tests for std::expected (#236608)
Resolves #105307
- LWG3973: `std::expected`'s monadic operations use `this->__val()`
rather than `**this`, so they are already ADL-proof. Added tests to
ensure an ADL-found `operator*` is never selected.
Resolves #171310
- LWG4015: Nothing to do but considered completed together with
`optional<T&>`. It fixes the const overloads of `std::optional`'s
monadic operations from LWG3973's exposition; libc++ uses `value()`
instead of a pointer so the issue is not present.
---------
Co-authored-by: A. Jiang <de34 at live.cn>
BPF: Register the unwind passes (#239891)
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>
CodeGen: Stop using TargetLowering's libcall info in PreISelIntrinsicLowering
The TargetLowering copy of RuntimeLibcallsInfo should be deleted and
only the analysis should be used.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
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>
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.
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!
[libc++][docs] Use Furo theme
Adopt the shared LLVM Furo configuration and wyvern logo, widen the content area on desktop viewports, and remove page-local contents directives that duplicate Furo's navigation.
Assisted-by: Codex
[libc++][docs] Revert unrelated Python formatting changes
Restore the formatting of generate_feature_test_macro_components.py to match
main so that the diff only contains the Markdown output changes. Reformatting
was previously applied to the whole file; only changed lines are formatted now.
LLM-aided
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>