LLVM/project 983f726llvm/tools/llvm-readobj ELFDumper.cpp

fix use of wrong enum

Created using spr 1.3.8-wip
DeltaFile
+49-38llvm/tools/llvm-readobj/ELFDumper.cpp
+49-381 files

LLVM/project 92f01b2llvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/lib/Target/AArch64/MCTargetDesc AArch64InstPrinter.cpp

[TableGen] Use StringTable for searchable tables (#206252)

LLVM has some large searchable tables containing string pointers. This
patch changes two things:

- String references in searchable tables are now always StringTable
  offsets; and all code referencing these is updated accordingly. This
  often avoids relocations in the data structures, permitting their
  placement in .rodata instead of .data.rel.ro and avoids dynamic
  relocations.

- The lookup indicies now reference the same string table instead of
  storing string pointers, permitting deduplication and also avoids
  dynamic relocations.

In an all-target assert build, this changes section sizes as follows:

- .data.rel.ro: -311920
- .rodata:      +227712

    [6 lines not shown]
DeltaFile
+97-82llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
+78-20llvm/utils/TableGen/SearchableTableEmitter.cpp
+34-33llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
+32-18llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+21-16llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
+12-12llvm/test/TableGen/generic-tables.td
+274-18113 files not shown
+320-21219 files

LLVM/project 7bfbbf6llvm/test/CodeGen/AMDGPU memory-legalizer-private-workgroup.ll memory-legalizer-private-wavefront.ll

AMDGPU: Replace tgsplit subtarget feature with attribute

This is a per-entrypoint property and has a corresponding
assembler directive, so it should not be baked into the
subtarget. I couldn't find much documentation on what this
actually does, so the description isn't great.

Fixes #204149

Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-private-workgroup.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-private-wavefront.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-private-singlethread.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-local-workgroup.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-local-wavefront.ll
+96-94llvm/test/CodeGen/AMDGPU/memory-legalizer-local-system.ll
+576-56443 files not shown
+2,547-2,45249 files

LLVM/project d301c9allvm/tools/llvm-readobj ELFDumper.cpp

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+519-475llvm/tools/llvm-readobj/ELFDumper.cpp
+519-4751 files

LLVM/project 2fa1477llvm/utils/TableGen SearchableTableEmitter.cpp

feedback

Created using spr 1.3.8-wip
DeltaFile
+5-4llvm/utils/TableGen/SearchableTableEmitter.cpp
+5-41 files

LLVM/project 374871dllvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp

[AArch64][NFC] Use compact enum table for feature strings (#206084)

Although this is not exactly an enum, the same data structure can be
used to compactly store the feature strings without dynamic relactions.
As a side effect, this also slightly reduces the size of the table.
DeltaFile
+139-140llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+139-1401 files

LLVM/project 3288c8fllvm/include/llvm/DebugInfo/CodeView EnumTables.h, llvm/lib/DebugInfo/CodeView EnumTables.cpp TypeRecordMapping.cpp

[CodeView][NFC] Use compact enum tables. (#206071)

Largely a straight-forward replacement.
DeltaFile
+524-483llvm/lib/DebugInfo/CodeView/EnumTables.cpp
+43-66llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp
+31-32llvm/include/llvm/DebugInfo/CodeView/EnumTables.h
+16-23llvm/lib/DebugInfo/PDB/Native/EnumTables.cpp
+16-18llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+8-9llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp
+638-6315 files not shown
+652-66011 files

LLVM/project 2567d25llvm/tools/llvm-objdump COFFDump.cpp, llvm/tools/llvm-readobj COFFDumper.cpp MachODumper.cpp

[llvm-readobj][NFC] Use compact enums (except for ELF) (#206075)

In principle straight-forward replacement, but clang-format is
deliberately non-helpful here..

ELFDumper is a separate patch due to the size of the changes.
DeltaFile
+241-217llvm/tools/llvm-readobj/COFFDumper.cpp
+195-176llvm/tools/llvm-readobj/MachODumper.cpp
+56-51llvm/tools/llvm-readobj/XCOFFDumper.cpp
+35-31llvm/tools/llvm-readobj/Win64EHDumper.cpp
+23-24llvm/tools/llvm-objdump/COFFDump.cpp
+17-21llvm/tools/llvm-readobj/WasmDumper.cpp
+567-5201 files not shown
+570-5247 files

LLVM/project 1da59d8llvm/include/llvm/BinaryFormat DXContainer.h SFrame.h, llvm/lib/BinaryFormat DXContainer.cpp SFrame.cpp

[BinaryFormat][NFC] Use compact enums (#206074)

Straight-forward replacement.
DeltaFile
+144-138llvm/lib/BinaryFormat/DXContainer.cpp
+43-35llvm/lib/BinaryFormat/SFrame.cpp
+24-23llvm/lib/ObjectYAML/DXContainerYAML.cpp
+21-21llvm/include/llvm/BinaryFormat/DXContainer.h
+8-11llvm/tools/llvm-objdump/DXContainerDump.cpp
+9-9llvm/include/llvm/BinaryFormat/SFrame.h
+249-2371 files not shown
+256-2447 files

LLVM/project 3655c98bolt/lib/Core BinaryContext.cpp, bolt/lib/Passes RetpolineInsertion.cpp

[Support][Object/ELF][NFC] Use new enum table (#206068)

Straight forward replacement.
DeltaFile
+22-18llvm/lib/Object/ELFObjectFile.cpp
+9-7llvm/lib/Support/ELFAttrParserCompact.cpp
+3-11llvm/include/llvm/Object/ELFObjectFile.h
+7-7llvm/tools/llvm-readobj/ELFDumper.cpp
+1-0bolt/lib/Passes/RetpolineInsertion.cpp
+1-0bolt/lib/Core/BinaryContext.cpp
+43-435 files not shown
+48-4311 files

LLVM/project da4d6callvm/lib/Target/X86/MCTargetDesc X86InstComments.cpp

[X86][NFC] Use compact enum to store ternlog comments (#206089)

Instead of storing a StringRef (StringLiteral is essentially a
StringRef) with 16 bytes and one dynamic relocation for each of the 256
entries (4kiB total) and, use the new compact enum tables to store each
entry with 4 bytes and without relocations.
DeltaFile
+260-258llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
+260-2581 files

LLVM/project 3717264clang-tools-extra/clang-tidy/modernize AvoidCStyleCastCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix invalid avoid-c-style-cast fix-it after keywords (#206239)

When a C-style cast immediately follows an identifier-like token, the
replacement could merge with the previous token, e.g. turning
`return(int)d` into `returnstatic_cast<int>(d)`. This patch fixes the
problem by adding a leading space to the replacement when needed.

Closes https://github.com/llvm/llvm-project/issues/97012
DeltaFile
+24-0clang-tools-extra/clang-tidy/modernize/AvoidCStyleCastCheck.cpp
+6-0clang-tools-extra/test/clang-tidy/checkers/modernize/avoid-c-style-cast.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+35-03 files

LLVM/project 702fc6cllvm/lib/FileCheck FileCheck.cpp FileCheckImpl.h, llvm/test/FileCheck unmatched-substs-captures.txt

[FileCheck] Call out var captures on unmatched patterns

This patch is motivated by an #llvm IRC chat in 2019 with Aaron
Ballman, where he pointed out an example similar to following:

```
$ cat input
[[clang::optnone]] void foo() {

$ cat check
CHECK: [[clang::optnone]] void foo() {

$ FileCheck check < input |& tail -7
Input was:
<<<<<<
           1: [[clang::optnone]] void foo() {
check:1'0    {                                } search range (exclusive bounds)
check:1'1                                       error: no match found
check:1'2            ?                          possible intended match

    [21 lines not shown]
DeltaFile
+123-0llvm/test/FileCheck/unmatched-substs-captures.txt
+22-0llvm/lib/FileCheck/FileCheck.cpp
+5-1llvm/test/FileCheck/match-time-error-propagation/matched-expected-pattern.txt
+4-0llvm/test/FileCheck/match-time-error-propagation/matched-excluded-pattern.txt
+3-0llvm/lib/FileCheck/FileCheckImpl.h
+157-15 files

LLVM/project 0d2d366llvm/test/Transforms/SLPVectorizer/X86 odd_store.ll

Fix clang-format issue.
DeltaFile
+4-4llvm/test/Transforms/SLPVectorizer/X86/odd_store.ll
+4-41 files

LLVM/project e509f63llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 odd_store.ll

Update for comments and fix lit test
DeltaFile
+42-23llvm/test/Transforms/SLPVectorizer/X86/odd_store.ll
+4-5llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+46-282 files

LLVM/project 56fe4eallvm/test/CodeGen/AMDGPU div_v2i128.ll bf16.ll, llvm/test/CodeGen/AMDGPU/GlobalISel udiv.i64.ll urem.i64.ll

Merge branch 'main' into fix-blockfreq-unroll-unconditional-latches--uniform
DeltaFile
+2,592-2,587llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+1,940-1,931llvm/test/CodeGen/AMDGPU/bf16.ll
+1,833-1,841llvm/test/CodeGen/ARM/vector-lrint.ll
+1,410-1,359llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
+1,351-1,351llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
+1,701-810llvm/test/CodeGen/AMDGPU/llvm.set.rounding.ll
+10,827-9,8794,246 files not shown
+171,371-122,9064,252 files

LLVM/project ca59c69clang/unittests/Lex PPMemoryAllocationsTest.cpp, llvm/include/llvm/Support Allocator.h PerThreadBumpPtrAllocator.h

[Allocator] Drop RedZoneSize (non-sanitizer) and BytesAllocated members (#205711)

`RedZoneSize` is only read inside `#if LLVM_ADDRESS_SANITIZER_BUILD`.
Additionally gate it under `LLVM_ENABLE_ABI_BREAKING_CHECKS` so that
release-non-assertions builds don't incur the overhead. To support
non-asan build with asan library users, the variable is only omitted in
`!LLVM_ENABLE_ABI_BREAKING_CHECKS` builds.

`BytesAllocated` is incremented on every Allocate (a hot-path memory
read-modify-write) only to back `getBytesAllocated()`. Drop the member.
There is a measurable stage2 instruction-count reduction.

https://llvm-compile-time-tracker.com/compare.php?from=25a6b5be6853b2c493ef392d41e43dd35ad4839a&to=8ebc975635ad717deb392d20b50f1a1f6bb16054&stat=instructions:u

Migrate the in-tree consumers:

- TableGen dumpAllocationStats drops the line; the clangd debug log
reports
  getTotalMemory().

    [8 lines not shown]
DeltaFile
+0-47llvm/unittests/ADT/ConcurrentHashtableTest.cpp
+19-28llvm/include/llvm/Support/Allocator.h
+0-12llvm/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
+7-4clang/unittests/Lex/PPMemoryAllocationsTest.cpp
+0-10llvm/include/llvm/Support/PerThreadBumpPtrAllocator.h
+3-5llvm/unittests/Support/PerThreadBumpPtrAllocatorTest.cpp
+29-10611 files not shown
+38-13017 files

LLVM/project fc43f7dutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Fixes 9889e62 (#206294)

This fixes 9889e626983fe38aca09283e9092fd8cebdae8fa.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 10e7761libc/shared builtins.h, libc/shared/builtins subdf3.h

[libc] add shared subdf3 builtin (#205673)

Re-exposes LLVM-libc's `__subdf3` as `shared::subdf3` for reuse by
compiler-rt's builtins.

Stacked change - merge these first:
- #200094
- #205669
- #205670
- #205671
- #205672

Part of #197824
DeltaFile
+32-0libc/src/__support/builtins/subdf3.h
+29-0libc/shared/builtins/subdf3.h
+9-0libc/src/__support/builtins/CMakeLists.txt
+1-0libc/shared/builtins.h
+1-0libc/test/shared/CMakeLists.txt
+1-0libc/test/shared/shared_builtins_test.cpp
+73-06 files

LLVM/project 9889e62mlir/include/mlir-c IR.h, mlir/include/mlir/CAPI IRMapping.h

[mlir-c] Add IRMapping C API bindings (#206146)

Expose IRMapping through the MLIR C API with full create/destroy/map, lookup, contains/erase, and clone-with-mapping functionality.

Assisted by: Claude
DeltaFile
+121-0mlir/test/CAPI/ir.c
+89-0mlir/include/mlir-c/IR.h
+85-0mlir/lib/CAPI/IR/IR.cpp
+43-0mlir/test/CAPI/rewrite.c
+18-0mlir/include/mlir/CAPI/IRMapping.h
+7-0mlir/lib/CAPI/Transforms/Rewrite.cpp
+363-01 files not shown
+368-07 files

LLVM/project 115eae2llvm/include/llvm/Support WithColor.h raw_ostream.h, llvm/test lit.cfg.py

[FileCheck] Improve colors in input dumps (#204936)

This patch makes two improvements to colors used in FileCheck input
dumps:

1. Without this patch, input line numbers and ellipses have a foreground
    color of black, which is hard to see in a terminal with a dark color
    theme. This patch changes that to bright black (a grayish color), which
    looks good to me for all terminal themes I have tried while remaining
    distinct from the input text.
2. Without this patch, the input text is accidentally set to bold when
    neither `-v` or `-vv` is specified. Perhaps I never noticed because I
    tend to always use `-vv`. This patch changes that to use the terminal's
    default color.

Case 2 exposes a problem with LLVM's color implementation. Without this
patch, the call to `WithColor`'s constructor actually specifies bold as
`false`, but `WithColor` ignores that when the color is `SAVEDCOLOR`.
While it seems like that should be fixed, I am concerned about the

    [6 lines not shown]
DeltaFile
+112-0llvm/test/FileCheck/dump-input/color.txt
+93-0llvm/test/lit.cfg.py
+17-9llvm/test/FileCheck/opt-color.txt
+14-4llvm/utils/FileCheck/FileCheck.cpp
+4-0llvm/include/llvm/Support/WithColor.h
+2-0llvm/include/llvm/Support/raw_ostream.h
+242-136 files

LLVM/project e6203d0mlir/include/mlir-c IR.h, mlir/include/mlir/CAPI IRMapping.h

[mlir-c] Add IRMapping C API bindings

Expose IRMapping through the MLIR C API with full create/destroy/map,
lookup, contains/erase, and clone-with-mapping functionality.
DeltaFile
+121-0mlir/test/CAPI/ir.c
+89-0mlir/include/mlir-c/IR.h
+85-0mlir/lib/CAPI/IR/IR.cpp
+43-0mlir/test/CAPI/rewrite.c
+18-0mlir/include/mlir/CAPI/IRMapping.h
+7-0mlir/lib/CAPI/Transforms/Rewrite.cpp
+363-01 files not shown
+368-07 files

LLVM/project deb7809llvm/test/tools/obj2yaml/DXContainer PRIVPart.yaml

[DirectX][ObjectYAML] Attempt to fix flaky PRIVPart.yaml (#206278)

This test was meant to round-trip YAML twice, to ensure correct
processing of non-4-byte-padded PRIV section.
However, second invocation of yaml2obj had wrong arguments (it was
reading from test file instead of stdin). Fix that.

Also, round-trips were split into several RUN lines, to make it clear on
which line an error occurs if the test is still flaky.
DeltaFile
+3-1llvm/test/tools/obj2yaml/DXContainer/PRIVPart.yaml
+3-11 files

LLVM/project cb9e849llvm/test/FileCheck/dump-input color.txt

Fix typo in color.txt comment about unmatched input
DeltaFile
+1-1llvm/test/FileCheck/dump-input/color.txt
+1-11 files

LLVM/project 91cfa57clang/docs SanitizerSpecialCaseList.rst ReleaseNotes.rst, clang/unittests/Basic DiagnosticTest.cpp

Reland "Make sanitizer special case list slash-agnostic" (#206250)

This changes the glob matcher for the sanitizer special case format so
that it treats `/` as matching both forward and back slashes.

When dealing with cross-compiles or build systems that don't normalize
slashes, it's possible to run into file paths with inconsistent
slashiness, e.g. `../..\v8/include\v8-internal.h` when [building
chromium](https://g-issues.chromium.org/issues/425364464).

We can match this using the current syntax using this ugly kludge:
`src:*{/,\\}v8{/,\\}*`. However, since the format is explicitly for
listing file paths, it makes sense to treat `/` as denoting a path
separator rather than a literal forward slash. This allows us to write
the much more natural form `src:*/v8/*` and have it work on any
platform.

This is technically a behavior change, but it seems very unlikely to
come up in practice. It will only make a difference if a user has a

    [16 lines not shown]
DeltaFile
+35-0clang/unittests/Basic/DiagnosticTest.cpp
+25-6llvm/lib/Support/SpecialCaseList.cpp
+20-0llvm/unittests/Support/SpecialCaseListTest.cpp
+12-0clang/docs/SanitizerSpecialCaseList.rst
+5-0clang/docs/ReleaseNotes.rst
+97-65 files

LLVM/project 2a811dellvm/include/llvm/Analysis HashRecognize.h, llvm/lib/Analysis HashRecognize.cpp

[HashRecognize] Rename ByteOrderSwapped to IsBigEndian (NFC) (#206243)

In order to avoid talking about bit-endianness versus byte-endianness,
rename ByteOrderSwapped to IsBigEndian, which is algorithm-agnostic. In
fact, CRC is a bitwise-algorithm, and hence the bit order is reversed.
DeltaFile
+27-28llvm/lib/Analysis/HashRecognize.cpp
+6-7llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+5-4llvm/include/llvm/Analysis/HashRecognize.h
+38-393 files

LLVM/project 6568c95llvm/lib/Transforms/Vectorize VPlanUtils.cpp, llvm/test/Transforms/LoopVectorize/VPlan/X86 scalarize-wide-load-for-address-use.ll

[VPlan] Skip VPInst where mask is only operand in chain in isUsed (NFC) (#206286)

Update isUsedByLoadStoreAddress o skip VPInstruction where the operand
in the use chain is only used as mask. Those do not contribute to the
load address, so should not force scalarization.

Fixes a regression with f2459f9e
(https://github.com/llvm/llvm-project/pull/196842).
DeltaFile
+7-3llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+4-3llvm/test/Transforms/LoopVectorize/VPlan/X86/scalarize-wide-load-for-address-use.ll
+11-62 files

LLVM/project 6a85214llvm/lib/Target/X86 X86TargetVerifier.cpp X86.h

[X86] Add target verifier

Add an X86 TargetVerify and register it by triple so the
TargetVerifierPass dispatches to it for X86 modules. It performs no
checks yet; the subtarget-dependent checks are added in a follow-up.
DeltaFile
+43-0llvm/lib/Target/X86/X86TargetVerifier.cpp
+6-0llvm/lib/Target/X86/X86.h
+6-0llvm/lib/Target/X86/X86TargetMachine.cpp
+1-0llvm/lib/Target/X86/CMakeLists.txt
+56-04 files

LLVM/project b33de64llvm/include/llvm/Target TargetVerifier.h, llvm/lib/Passes PassBuilder.cpp PassRegistry.def

[Target] Add target-independent TargetVerifier dispatcher

Introduce a target-dependent IR verification framework that can be run
from target-independent locations.

TargetVerify is a base class each backend subclasses to check a function
for constructs that are invalid for a particular target. Backends
register a factory keyed by Triple::ArchType via registerTargetVerify(),
typically from their LLVMInitialize<Target>Target().

TargetVerifierPass (registered as "target-verifier") is the dispatcher:
it reads the module triple and, if a verifier is registered for that
architecture, runs the generic IR verifier followed by the target's
TargetVerify. It is a no-op for targets that have not registered a
verifier, so it is safe to schedule from generic, target-independent
pipelines (e.g. `opt -passes=target-verifier`).
DeltaFile
+134-0llvm/include/llvm/Target/TargetVerifier.h
+82-0llvm/lib/Target/TargetVerifier.cpp
+1-0llvm/lib/Target/CMakeLists.txt
+1-0llvm/lib/Passes/PassBuilder.cpp
+1-0llvm/lib/Passes/PassRegistry.def
+219-05 files

LLVM/project ecc8547llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Drop dead CostCtx/Range arg sfrom getScaledReductions (NFC) (#206285)

Neither parameter is referenced; the cost-checking they described moved
to createPartialReductions. Also remove the stale comment.
DeltaFile
+2-6llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-61 files