[AMDGPU] Enable SlotIndexes compaction by default
Add TargetRegisterInfo::shouldCompactSlotIndexes() so targets can opt
in to dropping dead SlotIndexes entries before greedy allocation, one
target at a time. An explicit -greedy-compact-slot-indexes still
overrides the target. Enable it for AMDGPU, where the leftover entries
skew live range priorities enough to cause heavy spilling.
[SystemZ][z/OS] Add AMODE to PR symbols (#223541)
Contrary to the documentation, setting the AMODE at PR symbols is
required. The symptom is that references to variables `optind` and
`optarg` (from include `<getopt.h>`, the LE-provided C runtime) results
in "missing symbol" errors.
The fix is to derive the AMODE of the PR from the RMODE of the ED, which
is the way HLASM handles it.
[TableGen] Reverse little-endian encoding bits without mutating records (#234583)
CodeEmitterGen and DecoderEmitter reversed the Inst field of every
instruction encoding in place for targets with little-endian encodings.
As suggested by the FIXME, replace this with a helper,
getInstructionEncodingBits, that returns the reversed bits and caches
them, and use it wherever these backends read the encoding bits.
Creating new BitsInits from a backend seems contrary to the const
correctness goals of #108752, so this patch allocates raw arrays from a
new BumpPtrAllocator instead.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
[compiler-rt] Add fnan2, fnorm2, funder to macho_embedded arm.txt
After #168394 armv6m's mulsf3.S references these helpers, but they
were filtered out of the macho_embedded builtins, leaving undefined
symbols at link time.
Assisted-By: Claude
[clang][DepScan] Introduce API to find modulemaps without loading
Introduce a way to batch look up the modulemap that defines
each of a set of module names.
`getModuleMapsForModules` builds a compiler instance from the same
command line as a by-name scan, then does every lookup in a separate
header search with lazy modulemap loading turned on and diagnostics
ignored.
The main use case is to let the Swift dependency scanner
invalidate its serialized dependency graph without the cost of loading
the referenced modules.
* Modulemaps passed with `-fmodule-map-file` are parsed first, all
other modules are resolved by by-name header search.
[BOLT] Skip PatchEntries pass when old text will be rewritten (#235153)
If the original text section will be rewritten (--use-old-text), then
there is no original function entry to patch, and hence we should skip
the PatchEntries pass.
sysutils/dfc: Update and fix build with CMake 4
- Update port to snapshot dated 20251014.
- Upstream moved to GitHub.
- Pet port{clippy,fmt}.
PR: 299500, 297958
Reported by: arrowd (PR 297958)
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
(cherry picked from commit 27f5051ac41a8596b6af88114fed4852b340446a)
[SystemZ][z/OS] Enable z/OS to write in UTF-8 in writeFileWithEncoding (#234736)
The function writeFileWithEncoding() writes UTF-8 on all Unix-line
platforms. Do the same for z/OS.
The fixes the failure in ProgramTest.TestWriteWithSystemEncoding.
sysutils/dfc: Update and fix build with CMake 4
- Update port to snapshot dated 20251014.
- Upstream moved to GitHub.
- Pet port{clippy,fmt}.
PR: 299500, 297958
Reported by: arrowd (PR 297958)
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
sysutils/dfc: Update and fix build with CMake 4
- Update port to snapshot dated 20251014.
- Upstream moved to GitHub.
- Pet port{clippy,fmt}.
PR: 299500, 297958
Reported by: arrowd (PR 297958)
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
[ELF] Make merge section piece lookup branchless. NFC (#235375)
getSectionPiece's binary search causes a lot of branch mispredictions.
Rewrite the search so that the compiler emits a conditional move.
In a clang build, SimplifyCFG folds the ?: operator into a select, but
X86CmovConversion turns a cmov on a loop's critical path back into a
branch unless the condition is marked with `__builtin_unpredictable`.
GCC emits a cmov either way.
```
Write sections 1561 -> 940 ms
Total, --threads=8 5.07 -> 4.49 s
Total, --threads=1 21.6 -> 17.0 s
```
[mlir][vector] Mask a write that fills its dims but starts at a non-zero index (#233243)
`createWriteOrMaskedWrite` left a write unmasked when the vector shape
matched the destination dims it writes to, without looking at the write
indices. A write that starts at a non-zero index then runs past the end
of the destination.
For example, vectorizing this with `vector_sizes [8]`:
```mlir
%r = tensor.insert_slice %src into %dest[2] [6] [1]
: tensor<6xi32> into tensor<8xi32>
```
gave an unmasked `vector.transfer_write` of 8 elements at index 2, which
also writes `%dest[8]` and `%dest[9]`. The mask is now skipped only when
the write starts at 0 in those dims, so this write is masked to its
first 6 elements.
[11 lines not shown]
[clang][DepScan] Introduce API to find modulemaps without loading
Introduce a way to batch look up the modulemap that defines
each of a set of module names.
`getModuleMapsForModules` builds a compiler instance from the same
command line as a by-name scan, then does every lookup in a separate
header search with lazy modulemap loading turned on and diagnostics
ignored.
The main use case is to let the Swift dependency scanner
invalidate its serialized dependency graph without the cost of loading
the referenced modules.
* Modulemaps passed with `-fmodule-map-file` are parsed first, all
other modules are resolved by by-name header search.