[mlir] Print unit prop-dict entries by presence (#219315)
Teach generated prop-dict parsers and printers to use a bare key for
`UnitAttr` and false-default `UnitProp` entries while retaining the
explicit value spelling for compatibility.
Assisted-by: Codex
[clang][ssaf] Fix Windows link error by adding clangAST dependency (#219305)
Fixes link failure in SrcEditMerge(Introduced in #216183) on Windows due
to a missing clangAST dependency.
rdar://179151250
lldb: Linux: restore __ptrace_request typedef for bionic+musl (#219237)
glibc declares ptrace as taking an enum __ptrace_request as its first
argument. Because C++ does not allow implicit conversion from int to an
enumeration type, callers must cast int arguments to __ptrace_request
(e.g., static_cast<__ptrace_request>(req)).
However, bionic and musl declare ptrace as taking an int and do not
define __ptrace_request. Providing a fallback typedef int
__ptrace_request
allows the static_cast to compile across all three libcs.
I removed this typedef by accident in
ef9085f5bdb52b27258c150bd7e1fd812fc406c8.
Fixes: commit ef9085f5bdb5 ("lldb: Linux: empty Ptrace.h pollyfill")
Link: https://github.com/llvm/llvm-project/issues/217413
[VPlan] Handle trunc in replaceSymbolicStrides (#216367)
LoopAccessAnalysis skips IntegralCast expressions when speculating
strides, but the trunc case is missing in replaceSymbolicStrides. Add
the case, and make some non-functional improvements while at it.
ModuloSchedule: Use use_instructions instead of use_operands + getParent (#219297)
The use list only inspected the user, so directly loop over the users.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Rematerializer: Use def_instructions instead of def_operands + getParent (#219298)
Directly iterate the user instructions instead of querying the same
parent for each use.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[ADT] Remove ComputeNodeHash and Trait::ComputeHash (NFC) (#219029)
With the switch to open addressing (commit b3411b89c3af),
FoldingSetNode stores its hash in the node itself. Table growth
rehashes nodes by calling getFoldingSetHash(), leaving ComputeNodeHash
and Trait::ComputeHash unused.
[mlir][IR][NFC] Disambiguate `SymbolTable::Visibility` references (#219301)
As a follow-up to 979b722, address MSVC's confusion when it's trying to
resolve the underqualified enum name:
```
error C2955: 'mlir::OpTrait::SymbolTable': use of class template requires template argument list
```
Assisted-by: OpenAI Codex
Signed-off-by: Artem Gindinson <gindinson at roofline.ai>
Hexagon: Use use_instructions in BitSimplify use scans
This only inspects the parent instruction, so use use_instructions
instead.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[scudo] Track maximum resident memory in cache (#219036)
Add tracking for the resident memory in MapAllocatorCache. Unreleased
cache entries where Time != 0 are assumed to be resident, while entries
that have passed through releaseOlderThan where Time == 0 have had their
physical pages discarded.
Tracking is performed by updating CurrentResidentBytes on store, remove,
and release operations, recoding the peak in maxResidentBytes and
reporting it in getStats.
GlobalISel: Replace MachineOperand based register constraint API
Replace MachineOperand reference in getConstrainedRegClassForOperand with
a Register. It is only valid to call this on a generic vreg operand, which
must be a Register so there's no point in using an operand reference.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[Clang] Rename OffloadArch::TargetArch::SPIRV to AMDGCNSPIRV to avoid confusion (#218502)
Following up to
https://github.com/llvm/llvm-project/pull/213362/changes#r3745729994,
the `TargetArch::SPIRV` introduced by #213362 actually corresponds to
`amdgcnspirv`, which is not the same as standard SPIRV: This could prove
rather confusing in the future. Renaming to `TargetArch::AMDGCNSPIRV`
also decouples "`TargetArch::SPIRV`" from AMD-specific SPIRV support, as
SPIRV is used by other vendors as well.
[CIR] Classify a named bit-field access unit as a bit-field on x86_64
mapCIRType built the ABI FieldInfo for a bit-field access unit with IsBitField
set only for an unnamed one, so a named unit reached the classifier as an
ordinary field. We now pass IsBitField with the unit's width to be able to
lower named bit-fields correctly.
Assisted-by: Cursor / claude-opus-5
[KnownFPClass] Add `KnownFPClass::frem` [NFC] (#218949)
Follow up to https://github.com/llvm/llvm-project/pull/218726
Moves `frem` deduction logic from `Analysis/ValueTracking.cpp` and
`CodeGen/GlobalISel/GISelValueTracking.cpp` to `KnownFPClass::frem`.
[MLIR][XeGPU] Update array-length users atomically (#217478)
Preflight load and slice users before changing tensor descriptor types,
then update their dependent types and offsets in one pattern
application.
Assisted-by: Codex
[AMDGPU] Ignore CU mode on targets without WGP mode
isFullSIMDMode() treated +cumode as meaningful on every generation, so on
pre-gfx10 targets it halved both the physical and the addressable LDS size
and dropped getNumWorkGroupSIMDs() from 4 to 2. Before the LDS size rework
the CU/WGP adjustment was gated on isGFX10Plus(), and +cumode was simply
ignored elsewhere.
rocFFT passes -mcumode to hipRTC unconditionally, so its Bluestein kernels
started failing to compile on gfx942 with "local memory (65536) exceeds
limit (32768)".
Change-Id: I0b440751aedd8f8b5d334ee62b68ffdc449d53f8
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Rematerializer: Use def_instructions instead of def_operands + getParent
Directly iterate the user instructions instead of querying the same
parent for each use.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
ModuloSchedule: Use use_instructions instead of use_operands + getParent
The use list only inspected the user, so directly loop over the users.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[SCEV] Remove unreachable visitMulExpr in SCEVCastSinkingRewriter (NFC) (#219279)
SCEVCastSinkingRewriter::visit() returns S unchanged unless S->getType()
is a pointer type. So visitMulExpr can never be entered.