Mk/Scripts/do-depends.sh: propagate DEBUG_MK_* to find-lib.sh
env -i in find_lib() drops DEBUG_MK_SCRIPTS and
DEBUG_MK_SCRIPTS_FIND_LIB, so find-lib.sh never enables tracing.
Pass both through env -i.
PR: 245438
RISCV: Fix using getVRegDef on a physical register
This was looking through a VL operand to find a materialized
ADDI $x0, imm. The VL register can be physical, so avoid calling
getVRegDef.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
clang/AMDGPU: Don't emit target-features on AMDGCN-flavored SPIR-V
The spirv64-amd-amdhsa target unions every GPU's features in its feature
map so it can report builtins as available. The CodeGen doesn't have
any use of the target-features. Putting it into the IR just results
in an annoying to update test every time a new feature is added. The
ultimate SPIRV codegen doesn't do anything with it, and if it did
survive to AMDGPU codegen, it would be actively harmful.
This isn't an ideal solution. The target-features spam is also
noisy and useless in the AMDGPU case, but solving that is more
intricate because we do currently rely on this for some features,
most notably the wavesize.
Co-authored-by: Claude (Claude-Opus-4.8)
CodeGen: Fix machine sink critical edge crash on an undef register
Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
CodeGen: Fix MachineSink trivial coalescing crash on an undef register
PerformTrivialForwardCoalescing dereferences getVRegDef() for a copy's
source register without a null check. A source register defined only by an
undef use has no defining instruction, so coalescing a copy from it crashes.
Bail out when there is no defining instruction.
Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Use feature bitset instead of ArchAttr
Convert from the legacy getArchAttrAMDGCN manual bitmask checks to using
the new generated bitset. These are the easy cases. sramecc and xnack
require more supporting work so will be done later.
Co-authored-by: Claude (Claude-Opus-4.8)
[SLP]Recalculate cleared deps for all cancelled copyable elements
Deps of a cancelled copyable element were recalculated only for
control-dependency nodes; a speculatable one stayed unschedulable and
deadlocked the final scheduling. Recalculate unconditionally.
Fixes #216544
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/216734
NVPTX: Fix using getVRegDef on a physical register
This was calling getVRegDef on the frame register; change to
getOneDef instead. This still seems like a dubious way to deal
with any kind of frame setup optimization though.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>