Hide LD_DEBUG support behind a compile-time #ifdel DL_DEBUG.
Also delete the LD_TRACE_LOADED_OBJECTS_FMT1, LD_TRACE_LOADED_OBJECTS_FMT2,
and LD_TRACE_LOADED_OBJECTS_PROGNAME environment options.
ok kettenis
[ASan][test] Mark Linux/stack-overflow-recovery-mode.cpp UNSUPPORTED on Android AArch64 (#240097)
Temporarily mark `TestCases/Linux/stack-overflow-recovery-mode.cpp`
unsupported on Android AArch64 while waiting for #236879, matching
#236884 (https://lab.llvm.org/buildbot/#/builders/186/builds/4079).
Assisted-by: Gemini
[ADT] Add LLVM_ATTRIBUTE_WARN_UNUSED to SmallPtrSet (#240080)
This patch adds LLVM_ATTRIBUTE_WARN_UNUSED to SmallPtrSet so that
compilers can diagnose unused SmallPtrSet variables even though
SmallPtrSet has a non-trivial constructor and destructor.
This patch also addresses the existing warnings uncovered by the
attribute:
- ScheduleDAGSDNodes::BuildSchedUnits had an unused local variable
Visited, which this patch removes.
- SmallPtrSetTest.cpp intentionally leaves Other unused in two move
tests, so this patch marks Other with [[maybe_unused]].
Assisted-by: Antigravity
sysutils/psmisc: Fix a PLIST issue that happens when po4a is installed
When textproc/po4a is installed, psmisc generates and installs a bunch of
translated man pages, and our PLIST isn't happy with that.
[LLVM] FIx fallout from #239908 (#240096)
The original patch added LLVM_ATTRIBUTE_WARN_UNUSED to some ADT classes,
which caused some more -Wunused-variable warnings under release builds
(that optimize out asserts).
https://lab.llvm.org/buildbot/#/builders/228/builds/17397
[clang][Sema][NFC] Share member template instantiation lookup (#239450)
Use `RedeclarableTemplateDecl` to consolidate the identical
`isInstantiationOf` implementations for class and function templates,
leaving the other overloads unchanged.
I initially considered turning these helpers into a function template,
but the declaration types use different accessors, such as
`getInstantiatedFromMemberTemplate()` and `getInstantiatedFromMember()`.
I'd also like to discuss whether a function template would be preferable
here, although that would likely require a broader change.
BPF: Stop lowering unwinding through nonexistent unwinder calls (#239899)
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>
Commit fixes provided by Chuck Cranor, thank you very much.
The fixes correct color handling glitches which were the result of
the terminal colour incorrectly being reset to the original pair not
the default color that had been set.
[SPARC] Remap the parameter DBG_VALUEs of a leaf procedure (#239545)
A leaf procedure stays in its caller's register window, so
remapRegsForLeafProc rewrites %i0-%i7 to %o0-%o7. PEI calls it from
determineCalleeSaves, while the parameter DBG_VALUEs at the start of the
entry block are stashed outside the function (stashEntryDbgValues), so
they keep naming %i registers and gdb reads the arguments of leaf
functions from the wrong register.
This renames the debug operands that are left once PEI has put the
stashed values back, in processFunctionBeforeFrameIndicesReplaced. Other
DBG_VALUEs on the same value were already renamed, it's only the stashed
parameter ones that were missed.
Fixes #235238.
`leaf.c` from the issue, `break get` in gdb, before:
```
[13 lines not shown]
[SPARC] Expand f64 bitcasts from v2i32 on 32-bit SPARC (#234201)
It is not possible to directly transfer values from integer registers to
floating point registers, so it needs to be done via the stack.
Fixes the following error:
LLVM ERROR: Cannot select: t10: f64 = bitcast t16
t16: v2i32 = BUILD_VECTOR t2, t4
t2: i32,ch = CopyFromReg t0, Register:i32 %0
t4: i32,ch = CopyFromReg t0, Register:i32 %1
In function: v2i32_build_vector
Assisted-by: Claude
[SPARC] Preserve register operand flags in BPR branch conditions (#240077)
parseCondBranch() rebuilt the register operand of a branch-on-register
(BPR) instruction from just its register number, and insertBranch()
re-added it with addReg(), so any operand flags were lost when a branch
was analyzed and reinserted.
When the register is undef (ProcessImplicitDefs marks the use undef
after removing its IMPLICIT_DEF), PHI elimination splitting a critical
edge rewrites the terminator via updateTerminator() and the BPR ends up
reading a virtual register with no def. The machine verifier rejects
this, and without the verifier the greedy register allocator segfaults
in VirtRegAuxInfo::weightCalcHelper.
Copy the whole MachineOperand into Cond and add it back with add(), as
other targets do.
Fixes #233111
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>