[clang-tidy] Fix inferred field note location (#202105)
Fixed the misleading note location for inferred ID-dependent fields.
Now the note points to the assignment that introduces the dependency,
not the field declaration.
Fixes #202077
[utils] Fix DenseMap debugger printers for the packed used-bit array (#201755)
DenseMap no longer use in-band sentinel keys. (#200595 and #201281).
Update the GDB pretty printer and LLDB data formatters to test the used
bit rather than comparing keys.
GDB: advancePastEmptyBuckets relied on DenseMapInfo::getEmptyKey(),
which could not be evaluated in GDB and so was disabled, leaving the printer
to emit empty and erased buckets. It now walks bucket indices and skips any
whose used bit is clear.
LLDB: DenseMapSynthetic used a key-uniqueness heuristic to guess which
buckets were live, which mishandled a lone erased bucket (hence the
former tombstones=1 summary note). It now reads the used array directly,
so erased entries are skipped exactly. NumTombstones no longer exists,
so drop it from the summary.
Written by Claude Opus 4.8
[2 lines not shown]
[test] Regenerate CSKY/M68k codegen tests after atomic and error-message changes (#202244)
Fix tests after #195308 ([AtomicExpand] Preserve flags expanding
loads/stores to cmpxchg/atomicrmw) and ([CodeGen][NFC] Remove
contractions in error messages).
[MRI] Avoid walking past all defs in hasOneUse() (#201249)
The use-def list is circular in the Prev direction (Head->Prev == Tail)
and defs always precede uses, see
MachineRegisterInfo::addRegOperandToUseList().
We can implement hasOneUse() by checking only the Tail and its Prev,
instead of
walking past all defs from the head via use_iterator.
[VPlan] Only simplify ExtractLastLane of non-wide single-scalar. (#202234)
After 8e868c5, we may remove ExtractLastLane of a wide recipe that could
be single scalar but has not been narrowed. Limit to
VPInstruction/VPReplicateReceipe to fix crash in added test case.
Fixes https://github.com/llvm/llvm-project/issues/201582.
[NVPTX] pass variadics frame as local pointer (#201661)
Pass the pointer for variadics as a local (addrspace(5)) pointer. This
enables InferAddressSpace to convert loads of vaargs to local loads
(pipeline reordered to accomadate) and will also save a register in
short pointer mode. We leave vaListType as a generic pointer and cast
when expanding va_start to maintain backwards compatibility with IR
written expecting the va_list to be a generic pointer.
[SPIR-V] Rewrite extractvalue over aggregate spv_extractv result (#200065)
Chained extractvalue from an aggregate-returning call left raw IR over a
multi-register spv_extractv, crashing later in foldImm. Mutate the
producer to i32 and convert the user too
[SPIR-V] Lower vector-typed GEPs with more than 1 element in SPIRVEmitIntrinsics (#197101)
Fix spirv-val concern in the IR from #186764 with vector-typed GEPs (`<N
x ptr>`) that were lowered to a single spv_gep intrinsic with a vector
return
```
error: line 54: The Result Type of OpPtrAccessChain <id> '...' must be OpTypePointer. Found OpTypeVector.
```
Resolves #186764
[InstCombine][NFC] Use custom inserter for metadata (#202206)
Proactively getting metadata for every visited instruction is expensive.
Therefore, only store the current instruction and get the metadata only
when an instruction is actually inserted.
[DenseMap] Canonicalize pointer hashes. NFC (#202226)
`(p>>4)^(p>>9)` does not mix the high bits of the address. Pointers from
one allocator grown across multiple slabs whose low-bit windows overlap
map to the same narrow bucket range, an issue fixed by #197390.
Fix by delegating to the canonical pointer hash.
compiler-rt: Suppress -g error for gpu builds
Currently a RelWithDebInfo build fails when gpu targets
are enabled enabled as runtime targets, since clang will error
with -g.
Co-Authored-By: Claude Sonnet 4.5 <noreply at anthropic.com>
[VPlan] Use VPInstructionWithType for uniform casts. (#140623)
Use VPInstructionWithType instead of VPReplicate recipe for uniform
casts. This is a first step towards breaking up VPReplicateRecipe. Using
the general VPInstructionWithType has the additional benefit that we can
now apply a number of simplifications directly.
Depends on https://github.com/llvm/llvm-project/pull/140621
PR: https://github.com/llvm/llvm-project/pull/140623
[clang-tidy] Preserve line endings in macro-to-enum fixes (#202054)
Use `StringRef::detectEOL()` when inserting enum braces so fix-its do
not mix LF into CRLF source files.
Closes https://github.com/llvm/llvm-project/issues/61593
[lld-macho] Replace unordered_{map,set} with Dense{Map,Set} (#202100)
DenseMap no longer uses in-band sentinel keys (#201281) and is superior
to unordered_map in these scenarios.
[LoopInterchange] Reject interchange when AnyOf reduction exists (#202092)
This patch removes `AnyOf` reductions from the legal candidates for
interchange. In some cases, especially when the result value of `AnyOf`
is loop-invariant with respect to outer loop, then the interchange
should be legal. However, at the moment, we reject all the cases
conservatively.
Fixes #202089 .
[LoopInterchange] Add test for loop contains AnyOf reduction (NFC) (#202091)
This patch adds the test case raised in #202089. The issue will be fixed
by a follow-up patch #202092.