LLVM/project ebd9c2cclang-tools-extra/include-cleaner/lib WalkAST.cpp, clang-tools-extra/include-cleaner/unittests WalkASTTest.cpp

Add Objective-C support to include-cleaner's AST walker. (#211119)

Extend WalkAST to recognize and report references in Objective-C
constructs, including interfaces, protocols, message expressions,
properties, categories, compatible aliases, and instance variables. Also
update the test helper to support custom compiler arguments and add
corresponding unit tests.
DeltaFile
+293-3clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
+164-2clang-tools-extra/include-cleaner/lib/WalkAST.cpp
+457-52 files

LLVM/project bece576llvm/include/llvm/Transforms/Utils LowerCommentStringPass.h

[PowerPC][AIX] Mark LowerCommentStringPass as RequiredPassInfoMixin

Directly using isRequired is deprecated and PassInfoMixin will soon be
moved to a detail namespace.

Reviewers: tonykuttai, w2yehia, hubert-reinterpretcast

Pull Request: https://github.com/llvm/llvm-project/pull/212018
DeltaFile
+2-3llvm/include/llvm/Transforms/Utils/LowerCommentStringPass.h
+2-31 files

LLVM/project 3d2d8a9clang/lib/Tooling/Inclusions HeaderIncludes.cpp, clang/unittests/Tooling HeaderIncludesTest.cpp

[clang][Tooling] Fix main header matching for headers with special characters. (#211934)

In Clang Tooling, escape HeaderStem before constructing MainIncludeRegex
to prevent special characters (such as '+') from being interpreted as
regex operators. Useful for Objective-C where "Foo+Bar.h" headers are
very common for categories.
DeltaFile
+14-0clang/unittests/Tooling/HeaderIncludesTest.cpp
+2-1clang/lib/Tooling/Inclusions/HeaderIncludes.cpp
+16-12 files

LLVM/project 3031d2dlldb/docs/resources addingtargetsupport.md

[lldb][docs] Add hardware feature considerations to target doc (#211213)

As requested on #207166, this change adds information about hardware
features that can help or hinder porting LLDB.

I decided not to add an explicit "help" or "hinder" tag to them because
the descriptions are pretty general and I'd rather people took them as
starting points to think for themselves.

Debugging is a pile of things working together, so it's hard to say that
lack of one thing is "bad" without seeing it in context. Hopefully by
thinking about all these items for their target, developers will be able
to do that.
DeltaFile
+170-0lldb/docs/resources/addingtargetsupport.md
+170-01 files

LLVM/project 3d82215llvm/lib/Analysis HashRecognize.cpp, llvm/test/Analysis/HashRecognize cyclic-redundancy-check.ll

[HashRecognize] Fix compiler crash on missing latch compare instruction (#211895)

It is never checked whether a candidate loop `L` is latched by a compare
instruction, yet `L.getLatchCmpInst()` is added to the `Roots` for
`containsUnreachable`. If a loop is predicated on anything other than a
compare instruction, `getLatchCmpInst()` returns `nullptr`, causing
`containsUnreachable` to crash when calling `isa<PHINode>`. To fix,
consider loops where `L.getLatchCmpInst()` is null to be not in
canonical form, and reject them.
- Crash: https://godbolt.org/z/Tboo4jo5Y

Assisted-by: Claude Opus 5
DeltaFile
+25-0llvm/test/Analysis/HashRecognize/cyclic-redundancy-check.ll
+2-1llvm/lib/Analysis/HashRecognize.cpp
+27-12 files

LLVM/project 668e41amlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import function-metadata.ll

[MLIR][LLVM] Preserve unknown function metadata on import

Import non-debug function metadata without a kind-specific dialect conversion into LLVMFuncOp function_metadata. Preserve repeated metadata kinds through the generic carrier so LLVM IR import and export can round-trip those attachments.
DeltaFile
+95-0mlir/test/Target/LLVMIR/Import/function-metadata.ll
+36-5mlir/lib/Target/LLVMIR/ModuleImport.cpp
+131-52 files

LLVM/project 010cb97mlir/lib/Target/LLVMIR ModuleTranslation.cpp, mlir/test/Target/LLVMIR function-metadata.mlir

[MLIR][LLVM] Translate LLVMFuncOp function metadata

Materialize LLVMFuncOp function_metadata through ModuleTranslation metadata conversion. Attach function metadata after module-level symbols are mapped so metadata references to functions, globals, aliases, and ifuncs can be resolved.
DeltaFile
+156-0mlir/test/Target/LLVMIR/function-metadata.mlir
+49-5mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+205-52 files

LLVM/project 0ece785mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td LLVMOps.td, mlir/lib/Dialect/LLVMIR/IR LLVMAttrs.cpp

[MLIR][LLVM] Add function metadata to LLVMFuncOp

Add a generic LLVM dialect carrier for LLVM IR function metadata on LLVMFuncOp.
Represent attachments as an ordered list so repeated metadata kinds, such as
multiple type metadata attachments, can be preserved while keeping metadata names
language-agnostic.
DeltaFile
+22-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+22-0mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+20-0mlir/test/Dialect/LLVMIR/invalid.mlir
+18-0mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+3-0mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+1-0mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+86-06 files

LLVM/project 2f1f2b7mlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import intrinsic-unregistered.ll import-failure.ll

[MLIR][LLVM] Preserve global value metadata operands on import

Import global value references inside LLVM metadata operands as LLVM dialect metadata symbol-reference attributes. Add llvm.read_register import coverage for function, global, alias, and nameless-global metadata operands.
DeltaFile
+75-5mlir/test/Target/LLVMIR/Import/intrinsic-unregistered.ll
+51-13mlir/lib/Target/LLVMIR/ModuleImport.cpp
+45-0mlir/test/Target/LLVMIR/Import/import-failure.ll
+171-183 files

LLVM/project c5a0012mlir/include/mlir-c/Dialect LLVM.h, mlir/lib/CAPI/Dialect LLVM.cpp

fix: clang-format
DeltaFile
+4-3mlir/include/mlir-c/Dialect/LLVM.h
+4-3mlir/lib/CAPI/Dialect/LLVM.cpp
+8-62 files

LLVM/project ce8a458llvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/CodeGen/AMDGPU fix-sgpr-copies-f16-true16.mir

[AMDGPU][True16] Apply v2s copies to non-def operand 0 (#212261)

`legalizeOperandsVALUt16` iterates over all operands except for the
zeroth one, as the zeroth one is typically a definition. However, if the
zeroth operand is an input (e.g., for a `V_CMP`), then this causes the
compiler to generate illegal machine code.

This patch extends `legalizeOperandsVALUt16` to apply also to the zeroth
operand, guarding for when this operand is a definition.
DeltaFile
+18-0llvm/test/CodeGen/AMDGPU/fix-sgpr-copies-f16-true16.mir
+3-3llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+21-32 files

LLVM/project 253a841third-party/benchmark/src sysinfo.cc

[benchmark] Back port 2b0bff7 from upstream

Fix compile error with clang -Werror -Wunused-template
(cherry picked from commit 2b0bff7444a8df460daab2e5af18bce45ca00657)
DeltaFile
+3-2third-party/benchmark/src/sysinfo.cc
+3-21 files

LLVM/project 2af577alldb/source/ValueObject ValueObject.cpp, lldb/test/API/commands/frame/var-dil/expr/Assignment TestFrameVarDILAssign.py

[lldb][DIL] Fix size check when assigning a signed value with DIL (#207404)

The DIL assignment path (`frame variable 'lhs = rhs'`) routes through
`ValueObject::SetValueFromInteger`, which verifies that the new value
fits
in the destination type before writing it. That size check compared the
source `APInt`'s raw 64-bit word, treated as an unsigned value, against
the
destination type's unsigned maximum:

```
  uint64_t u_max = (1 << (byte_size * CHAR_BIT)) - 1;
  if (*(value.getRawData()) > u_max)
    return llvm::createStringError("Illegal argument: new value is too big");
```

This is wrong in both directions:

* Small negative values that fit are rejected. A literal such as `-2`

    [41 lines not shown]
DeltaFile
+17-8lldb/source/ValueObject/ValueObject.cpp
+24-0lldb/test/API/commands/frame/var-dil/expr/Assignment/TestFrameVarDILAssign.py
+41-82 files

LLVM/project 30603f5.github/workflows libc-fullbuild-tests.yml

Update image sha256 for libc fullbuild tests (#212168)
DeltaFile
+2-2.github/workflows/libc-fullbuild-tests.yml
+2-21 files

LLVM/project 0d70ca3compiler-rt/lib/scudo/standalone secondary.h, compiler-rt/lib/scudo/standalone/tests secondary_test.cpp

[scudo] Add unmap and eviction stats to Secondary

Track and print stats on the number of memory unmaps and cache evictions
in the MapAllocator. These statistics track total unmaps, as well as
unmaps triggered by exceeding the maximum cache entry size or the
maximum number of entries in the cache.
DeltaFile
+19-13compiler-rt/lib/scudo/standalone/secondary.h
+10-0compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
+29-132 files

LLVM/project cbf4834lld/ELF Thunks.cpp Thunks.h, lld/ELF/Arch PPC64.cpp

[NFC][ELF][PPC64] Pass address not offset to writePPC64LoadAndBranch (#212275)

Every caller currently subtracts the TOC base in its argument, so move
that into common code inside writePPC64LoadAndBranch. This will also
allow a different computation to be used in some cases in a future
commit.

Note that offset is now unsigned not signed; even previously, all
arguments were uint64_t, and all uses are unsigned, so making it signed
doesn't make much sense.
DeltaFile
+9-11lld/ELF/Thunks.cpp
+1-2lld/ELF/Arch/PPC64.cpp
+1-1lld/ELF/Thunks.h
+11-143 files

LLVM/project 7f46263lld/ELF SyntheticSections.cpp

[NFC][ELF] Use hasPhdrsCommands() wrapper instead of direct access (#212273)

This is the only place outside of LinkerScript/ScriptParser that
directly accesses the phdrsCommands member, introduced in 5a58e98c2018
("[ELF] Align the end of PT_GNU_RELRO associated PT_LOAD to a
common-page-size boundary (#66042)").
DeltaFile
+1-1lld/ELF/SyntheticSections.cpp
+1-11 files

LLVM/project c937150clang/lib/CodeGen CGOpenMPRuntime.h

format
DeltaFile
+2-1clang/lib/CodeGen/CGOpenMPRuntime.h
+2-11 files

LLVM/project c44443fllvm/docs conf.py LibFuzzer.md, llvm/docs/_static custom.css copybutton.js

[Docs] Reland Furo theme for LLVM docs (#211993)

Relands https://github.com/llvm/llvm-project/pull/184440 which was
reverted in https://github.com/llvm/llvm-project/pull/208619 because of
doc generation slowness.

The main root cause (https://github.com/llvm/llvm-project/issues/208786)
has been addressed, so attempting a reland at this point.

As before, Furo output at
https://nigham.github.io/llvm_docs_furo/LangRef.html

Comparing the generation times for "Build LLVM docs" step, this PR took
< 3m vs > 15m for the previous reverted PR.
DeltaFile
+62-0llvm/docs/_static/custom.css
+56-0llvm/docs/_static/copybutton.js
+39-0llvm/docs/_static/copybutton.css
+16-15llvm/docs/conf.py
+0-16llvm/docs/LibFuzzer.md
+0-11llvm/docs/ReleaseProcess.rst
+173-42162 files not shown
+177-453168 files

LLVM/project d151b8amlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import function-metadata.ll

[MLIR][LLVM] Preserve unknown function metadata on import

Import non-debug function metadata without a kind-specific dialect conversion into LLVMFuncOp function_metadata. Preserve repeated metadata kinds through the generic carrier so LLVM IR import and export can round-trip those attachments.
DeltaFile
+95-0mlir/test/Target/LLVMIR/Import/function-metadata.ll
+36-5mlir/lib/Target/LLVMIR/ModuleImport.cpp
+131-52 files

LLVM/project 38e4a63mlir/lib/Target/LLVMIR ModuleTranslation.cpp, mlir/test/Target/LLVMIR function-metadata.mlir

[MLIR][LLVM] Translate LLVMFuncOp function metadata

Materialize LLVMFuncOp function_metadata through ModuleTranslation metadata conversion. Attach function metadata after module-level symbols are mapped so metadata references to functions, globals, aliases, and ifuncs can be resolved.
DeltaFile
+156-0mlir/test/Target/LLVMIR/function-metadata.mlir
+49-5mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+205-52 files

LLVM/project 006ea20mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td LLVMOps.td, mlir/lib/Dialect/LLVMIR/IR LLVMAttrs.cpp

[MLIR][LLVM] Add function metadata to LLVMFuncOp

Add a generic LLVM dialect carrier for LLVM IR function metadata on LLVMFuncOp.
Represent attachments as an ordered list so repeated metadata kinds, such as
multiple type metadata attachments, can be preserved while keeping metadata names
language-agnostic.
DeltaFile
+22-0mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+22-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+20-0mlir/test/Dialect/LLVMIR/invalid.mlir
+18-0mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+3-0mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+1-0mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+86-06 files

LLVM/project d4403d8mlir/lib/Target/LLVMIR ModuleImport.cpp, mlir/test/Target/LLVMIR/Import intrinsic-unregistered.ll import-failure.ll

[MLIR][LLVM] Preserve global value metadata operands on import

Import global value references inside LLVM metadata operands as LLVM dialect metadata symbol-reference attributes. Add llvm.read_register import coverage for function, global, alias, and nameless-global metadata operands.
DeltaFile
+75-5mlir/test/Target/LLVMIR/Import/intrinsic-unregistered.ll
+51-13mlir/lib/Target/LLVMIR/ModuleImport.cpp
+45-0mlir/test/Target/LLVMIR/Import/import-failure.ll
+171-183 files

LLVM/project abae9dcmlir/include/mlir-c/Dialect LLVM.h, mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td

[MLIR][LLVM] Rename MDValueAttr to MDGlobalValueAttr

Name the metadata carrier after the symbol-backed global values it can represent. Update the assembly mnemonic and the C, C++, and Python APIs consistently.
DeltaFile
+9-9mlir/lib/Bindings/Python/DialectLLVM.cpp
+9-9mlir/include/mlir-c/Dialect/LLVM.h
+8-8mlir/lib/CAPI/Dialect/LLVM.cpp
+8-7mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+7-7mlir/test/python/dialects/llvm.py
+4-4mlir/test/Target/LLVMIR/llvmir-named-metadata.mlir
+45-445 files not shown
+56-5411 files

LLVM/project 600654cclang/test/CIR/CodeGen coro-task.cpp, clang/test/CodeGenCXX builtin-clear-padding-codegen.cpp

rebase

Created using spr 1.3.7
DeltaFile
+690-690llvm/test/CodeGen/AArch64/GlobalISel/legalize-vector-cmp.mir
+598-627clang/test/CodeGenCXX/builtin-clear-padding-codegen.cpp
+1,171-0libcxx/test/support/test_text_encoding.h
+0-1,171libcxx/test/std/text/text_encoding/test_text_encoding.h
+968-0llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax-post-ra.mir
+0-900clang/test/CIR/CodeGen/coro-task.cpp
+3,427-3,3881,233 files not shown
+33,914-20,8821,239 files

LLVM/project c3c6ffbclang/test/CIR/CodeGen coro-task.cpp, clang/test/CodeGenCXX builtin-clear-padding-codegen.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+690-690llvm/test/CodeGen/AArch64/GlobalISel/legalize-vector-cmp.mir
+598-627clang/test/CodeGenCXX/builtin-clear-padding-codegen.cpp
+0-1,171libcxx/test/std/text/text_encoding/test_text_encoding.h
+1,171-0libcxx/test/support/test_text_encoding.h
+968-0llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax-post-ra.mir
+0-900clang/test/CIR/CodeGen/coro-task.cpp
+3,427-3,3881,233 files not shown
+33,914-20,8821,239 files

LLVM/project 323d583llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize early_exit_with_stores.ll tail_fold_uncountable_exits.ll

[VPlan] Use llvm.mask.beforefirst for computing early exit mask

This makes the cost more accurate and improves codegen for RISC-V. The codegen for an early exit loop with side effects then goes from:

    .LBB0_3:                                # %vector.body
                                            # =>This Inner Loop Header: Depth=1
        vl1r.v  v16, (a3)
        vsetvli zero, zero, e8, m1, ta, ma
        vmseq.vi        v16, v16, 0
        vfirst.m        a7, v16
        srli    t0, a7, 63
        czero.nez       a7, a7, t0
        czero.eqz       t0, a1, t0
        or      a7, t0, a7
        vsetvli zero, zero, e64, m8, ta, ma
        vmsltu.vx       v0, v8, a7
        vle8.v  v17, (a5), v0.t
        vcpop.m t1, v16
        vsetvli zero, zero, e8, m1, ta, ma

    [20 lines not shown]
DeltaFile
+62-62llvm/test/Transforms/LoopVectorize/AArch64/early_exit_with_stores.ll
+27-27llvm/test/Transforms/LoopVectorize/VPlan/early_exit_with_stores_vplan.ll
+12-12llvm/test/Transforms/LoopVectorize/early_exit_with_stores.ll
+8-9llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+8-8llvm/test/Transforms/LoopVectorize/RISCV/early_exit_with_stores.ll
+2-2llvm/test/Transforms/LoopVectorize/tail_fold_uncountable_exits.ll
+119-1202 files not shown
+123-1248 files

LLVM/project dd32eaellvm/include/llvm/Transforms/Utils AssignGUID.h

[ThinLTO] Mark AssignGUIDPass as RequiredPassInfoMixin

PassInfoMixin is going away, so switch to RequiredPassInfoMixin and
remove the explicit isRequired implementation.

Reviewers: mtrofin, orodley

Pull Request: https://github.com/llvm/llvm-project/pull/211987
DeltaFile
+1-3llvm/include/llvm/Transforms/Utils/AssignGUID.h
+1-31 files

LLVM/project 7c38ce6clang/test/CIR/CodeGen coro-task.cpp, clang/test/CodeGenCXX builtin-clear-padding-codegen.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+690-690llvm/test/CodeGen/AArch64/GlobalISel/legalize-vector-cmp.mir
+598-627clang/test/CodeGenCXX/builtin-clear-padding-codegen.cpp
+1,171-0libcxx/test/support/test_text_encoding.h
+0-1,171libcxx/test/std/text/text_encoding/test_text_encoding.h
+968-0llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax-post-ra.mir
+0-900clang/test/CIR/CodeGen/coro-task.cpp
+3,427-3,3881,233 files not shown
+33,914-20,8821,239 files

LLVM/project e4c07b9llvm/lib/Target/AArch64 SVEShuffleOpts.cpp AArch64.h

[AArch64] Rename SVEShuffleOpts to AArch64SVEShuffleOpts

To be more consistent with other AArch64 passes and other CodeGen passes
in general which are almost always prefixed with the name of the target
(and ideally will be once we finish the NewPM transition).

Reviewers: davemgreen, huntergr-arm, paulwalker-arm

Pull Request: https://github.com/llvm/llvm-project/pull/211876
DeltaFile
+3-3llvm/lib/Target/AArch64/SVEShuffleOpts.cpp
+3-2llvm/lib/Target/AArch64/AArch64.h
+3-1llvm/lib/Target/AArch64/AArch64PassRegistry.def
+9-63 files