LLVM/project bc7f24cclang/lib/Basic SourceManager.cpp

[clang] [NFC] Remove SourceLocation() parameter from Diag.Report() calls in SourceManager, and use the equivalent Report() overload instead (#116937)

DeltaFile
+3-3clang/lib/Basic/SourceManager.cpp
+3-31 files

LLVM/project 2b901e6llvm/include/llvm/ExecutionEngine/JITLink loongarch.h, llvm/lib/ExecutionEngine/JITLink ELF_loongarch.cpp loongarch.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+44-3llvm/include/llvm/ExecutionEngine/JITLink/loongarch.h
+26-0llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_loongarch64_relocations.s
+2-0llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
+1-0llvm/lib/ExecutionEngine/JITLink/loongarch.cpp
+73-34 files

LLVM/project ade0750llvm/lib/Target/AMDGPU SIISelLowering.cpp AMDGPUInstructionSelector.cpp, llvm/lib/Target/AMDGPU/MCTargetDesc AMDGPUInstPrinter.cpp

[AMDGPU] Fix some cache policy checks for GFX12+ (#116396)

Fix coding errors found by inspection and check that the swz bit still
serves to prevent merging of buffer loads/stores on GFX12+.
DeltaFile
+64-5llvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.load.ll
+24-3llvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.store.ll
+8-3llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+7-2llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+1-1llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
+104-145 files

LLVM/project 6f76b2allvm/include/llvm/BinaryFormat/ELFRelocs x86_64.def, llvm/lib/Target/X86/MCTargetDesc X86ELFObjectWriter.cpp

[X86][MC] Add R_X86_64_CODE_4_GOTTPOFF (#116633)

For

  mov name at GOTTPOFF(%rip), %reg
  add name at GOTTPOFF(%rip), %reg

add

  `R_X86_64_CODE_4_GOTTPOFF` = 44

if the instruction starts at 4 bytes before the relocation offset. It's
similar to R_X86_64_GOTTPOFF.

Linker can treat `R_X86_64_CODE_4_GOTTPOFF` as `R_X86_64_GOTTPOFF` or
convert the instructions above to

  mov $name at tpoff, %reg
  add $name at tpoff, %reg

    [10 lines not shown]
DeltaFile
+35-32llvm/test/MC/ELF/relocation.s
+3-0llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
+1-0llvm/include/llvm/BinaryFormat/ELFRelocs/x86_64.def
+39-323 files

LLVM/project 46f43b6llvm/lib/CodeGen MIRPrinter.cpp MachineLICM.cpp, llvm/lib/CodeGen/GlobalISel GISelKnownBits.cpp

[DebugInfo][InstrRef][MIR][GlobalIsel][MachineLICM] NFC Use std::move to avoid copying (#116935)

DeltaFile
+4-4llvm/lib/CodeGen/MIRPrinter.cpp
+1-1llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
+1-1llvm/lib/CodeGen/MachineLICM.cpp
+1-1llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+7-74 files

LLVM/project abb9f9fllvm/test/Transforms/LoopStrengthReduce scaling_factor_cost_crash.ll, llvm/test/Transforms/LoopStrengthReduce/AArch64 pr47329.ll

[llvm] Remove `br i1 undef` from  some regression tests [NFC] (#117112)

This PR removes tests with `br i1 undef` under
`llvm/tests/Transforms/Loop*, Lower*`.
DeltaFile
+36-36llvm/test/Transforms/LoopStrengthReduce/AArch64/pr47329.ll
+26-26llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
+22-22llvm/test/Transforms/LoopVectorize/incorrect-dom-info.ll
+17-17llvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
+16-16llvm/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll
+15-15llvm/test/Transforms/LoopStrengthReduce/scaling_factor_cost_crash.ll
+132-13271 files not shown
+420-42077 files

LLVM/project 97b2903llvm/include/llvm/IR ModuleSummaryIndexYAML.h ModuleSummaryIndex.h, llvm/lib/Bitcode/Writer BitcodeWriter.cpp

[NFCI][WPD]Use unique string saver to store type id (#106932)

Currently, both
[TypeIdMap](https://github.com/llvm/llvm-project/blob/67a1fdb014790a38a205d28e1748634de34471dd/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1356)
and
[TypeIdCompatibleVtableMap](https://github.com/llvm/llvm-project/blob/67a1fdb014790a38a205d28e1748634de34471dd/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1363)
keep type-id as `std::string` in the combined index for LTO indexing
analysis.

With this change, index uses a unique-string-saver to own the string
copies and two maps above can use string references to save some memory.

This shows a 3% memory reduction (from 8.2GiB to 7.9GiB) in an internal
binary with high indexing memory usage.
DeltaFile
+17-3llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
+11-7llvm/include/llvm/IR/ModuleSummaryIndex.h
+2-2llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+30-123 files

LLVM/project a6fefc8llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine logical-select.ll

[InstCombine] Convert logical and/or with `icmp samesign` into bitwise ops (#116983)

See the following case:
```
define i1 @test_logical_and_icmp_samesign(i8 %x) {
  %cmp1 = icmp ne i8 %x, 9
  %cmp2 = icmp samesign ult i8 %x, 11
  %and = select i1 %cmp1, i1 %cmp2, i1 false
  ret i1 %and
}
```
Currently we cannot convert this logical and into a bitwise and due to
the `samesign` flag. But if `%cmp2` evaluates to `poison`, we can infer
that `%cmp1` is either `poison` or `true` (`samesign` violation
indicates that X is negative). Therefore, `%and` still evaluates to
`poison`.

This patch converts a logical and into a bitwise and iff TV is poison
implies that Cond is either poison or true. Likewise, we convert a

    [14 lines not shown]
DeltaFile
+118-0llvm/test/Transforms/InstCombine/logical-select.ll
+37-4llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+155-42 files

LLVM/project 7c07863compiler-rt/test/orc/TestCases/Darwin/Generic trivial-cxx-constructor.cpp

[ORC-RT] Test basic C++ static initialization support in the ORC runtime.

This tests that a simple C++ static initializer works as expected.

Compared to the architecture specific, assembly level regression tests for the
ORC runtime; this test is expected to catch cases where the compiler adopts
some new MachO feature that the ORC runtime does not yet support (e.g. a new
initializer section).
DeltaFile
+17-0compiler-rt/test/orc/TestCases/Darwin/Generic/trivial-cxx-constructor.cpp
+17-01 files

LLVM/project 44496aallvm/unittests/Support YAMLIOTest.cpp

Little tweaks. Use other vetor types, not only std::array.
DeltaFile
+2-3llvm/unittests/Support/YAMLIOTest.cpp
+2-31 files

LLVM/project 6299ec7llvm/lib/Target/LoongArch/AsmParser LoongArchAsmParser.cpp, llvm/test/MC/LoongArch/Directives cfi.s

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+28-12llvm/test/MC/LoongArch/Directives/cfi.s
+22-2llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
+50-142 files

LLVM/project 115f2ecclang/test/CodeGen aarch64-neon-intrinsics.c, clang/test/CodeGen/AArch64 neon-intrinsics.c

Merge commit '980316ec85381f65c369cb650f25881e470857b7' (#116059)

Forgot to follow.
DeltaFile
+20,186-0llvm/test/CodeGen/RISCV/rvv/expandload.ll
+16,877-2,839llvm/test/CodeGen/AMDGPU/flat_atomics_i64_system.ll
+0-17,418clang/test/CodeGen/aarch64-neon-intrinsics.c
+17,418-0clang/test/CodeGen/AArch64/neon-intrinsics.c
+16,049-0llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+12,078-2,340llvm/test/CodeGen/AMDGPU/flat_atomics_i64.ll
+82,608-22,59712,871 files not shown
+1,120,036-583,60412,877 files

LLVM/project 476b208clang/lib/AST/ByteCode InterpBuiltinBitCast.cpp, clang/test/AST/ByteCode builtin-bit-cast.cpp

[clang][bytecode] Fix ToType/FromType diagnostic ordering (#116988)

We need to check the ToType first, then the FromType. Additionally,
remove qualifiers from the parent type of the field we're emitting a
note for.
DeltaFile
+11-0clang/test/AST/ByteCode/builtin-bit-cast.cpp
+3-4clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp
+14-42 files

LLVM/project e9c561ellvm/lib/Target/RISCV RISCVGISel.td, llvm/test/CodeGen/RISCV/GlobalISel atomic-load-store.ll

[RISCV][GISel] Add atomic load/store test. Add additional atomic load/store isel patterns."
DeltaFile
+1,678-0llvm/test/CodeGen/RISCV/GlobalISel/atomic-load-store.ll
+13-0llvm/lib/Target/RISCV/RISCVGISel.td
+1,691-02 files

LLVM/project dbe159bmlir/lib/IR BuiltinTypes.cpp BuiltinAttributes.cpp, mlir/test/Dialect/Affine memref-stride-calculation.mlir

[mlir] [IR] Allow zero strides in StridedLayoutAttr (#116463)

Disabling memrefs with a stride of 0 was intended to prevent internal
aliasing, but this does not address all cases : internal aliasing can
still occur when the stride is less than the shape.

On the other hand, a stride of 0 can be very useful in certain
scenarios. For example, in architectures that support multi-dimensional
DMA, we can use memref::copy with a stride of 0 to achieve a broadcast
effect.

This commit removes the restriction that strides in memrefs cannot be 0.
DeltaFile
+0-14mlir/lib/IR/BuiltinTypes.cpp
+0-10mlir/test/Dialect/MemRef/invalid.mlir
+0-5mlir/test/IR/invalid-builtin-types.mlir
+0-4mlir/lib/IR/BuiltinAttributes.cpp
+2-2mlir/test/Dialect/Affine/memref-stride-calculation.mlir
+2-355 files

LLVM/project 42775a4llvm/lib/Transforms/Instrumentation ControlHeightReduction.cpp

[ControlHeightReduction] Add assert to avoid underflow (#116339)

`NumCHRedBranches - 1` is used later, we should add an assertion to make
sure it will not underflow.
DeltaFile
+1-0llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+1-01 files

LLVM/project 3291372mlir/include/mlir/Dialect/Vector/IR VectorOps.td, mlir/lib/Dialect/Vector/IR VectorOps.cpp

[mlir][vector] Fix 0-d vector transfer mask inference (#116526)

When inferring the mask of a transfer operation that results in a single `i1` element, 
we could represent it using either `vector<i1>` or vector<1xi1>. To avoid type mismatches,
this PR updates the mask inference logic to consistently generate `vector<1xi1>` for
these cases. We can enable 0-D masks if they are needed in the future.

See: https://github.com/llvm/llvm-project/issues/116197
DeltaFile
+15-0mlir/test/Dialect/Vector/invalid.mlir
+14-0mlir/test/Dialect/Vector/ops.mlir
+5-0mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+3-1mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+37-14 files

LLVM/project 197fb27llvm/test/Transforms/SLPVectorizer materialize-vector-of-consts.ll

[AArch64][NFC] NFC for const vector as Instruction operand (#116790)

Current cost-modelling does not take into account cost of materializing
const vector. This results in some cases, as the test shows, being
vectorized but this may not always be profitable. Future patch will try
to address this issue.
DeltaFile
+100-0llvm/test/Transforms/SLPVectorizer/materialize-vector-of-consts.ll
+100-01 files

LLVM/project c4be13cclang/docs ReleaseNotes.rst, clang/include/clang/Basic Attr.td

Revert "[TargetVersion] Only enable on RISC-V and AArch64" (#117110)

Reverts llvm/llvm-project#115991

Due to build fail
https://lab.llvm.org/buildbot/#/builders/66/builds/6511
DeltaFile
+0-4clang/test/Sema/attr-target-version-unsupported.c
+0-2clang/docs/ReleaseNotes.rst
+1-1clang/include/clang/Basic/Attr.td
+1-73 files

LLVM/project 75b8f98llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLP] NFC. Change the comment to match the code execution. (#116022)

Make code execute like the comment will modify many tests and affect the
performance. As a result, we change the comment instead of the code.
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+1-11 files

LLVM/project 922282eclang/docs ReleaseNotes.rst, clang/include/clang/Basic Attr.td

[TargetVersion] Only enable on RISC-V and AArch64 (#115991)

Address https://github.com/llvm/llvm-project/issues/115000. 

This patch constrains the target_version feature to work only on RISC-V
and AArch64 to prevent crashes in Clang.

---------

Co-authored-by: Aaron Ballman <aaron at aaronballman.com>
DeltaFile
+4-0clang/test/Sema/attr-target-version-unsupported.c
+2-0clang/docs/ReleaseNotes.rst
+1-1clang/include/clang/Basic/Attr.td
+7-13 files

LLVM/project a432f11llvm/include/llvm/ExecutionEngine/JITLink aarch64.h, llvm/lib/ExecutionEngine/JITLink aarch64.cpp MachO_arm64.cpp

[JITLink][arm64] Support arm64e JIT'd code (initially enabled for MachO only).

Adds two new JITLink passes to create and populate a pointer-signing function
that can be called via an allocation-action attached to the LinkGraph:

* createEmptyPointerSigningFunction creates a pointer signing function in a
custome section, reserving sufficient space for the signing code. It should
be run as a post-prune pass (to ensure that memory is reserved prior to
allocation).
* lowerPointer64AuthEdgesToSigningFunction pass populates the signing function
by walking the graph, decoding the ptrauth info (encoded in the edge addend) and
writing an instruction sequence to sign all ptrauth fixup locations.

rdar://61956998
DeltaFile
+276-0llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
+158-0llvm/test/ExecutionEngine/JITLink/AArch64/MachO_ptrauth-globals.s
+53-0llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
+33-3llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
+520-34 files

LLVM/project 4d6e691clang/test/CodeGen math-libcalls-tbaa-indirect-args.c, clang/test/CodeGen/SystemZ zos-mixed-ptr-sizes.c

Add the initializes attribute inference (#117104)

reland https://github.com/llvm/llvm-project/pull/97373 after fixing
clang tests.

Confirmed with "ninja check-llvm" and "ninja check-clang"
DeltaFile
+572-0llvm/test/Transforms/FunctionAttrs/initializes.ll
+326-3llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+52-52llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll
+7-7clang/test/CodeGen/SystemZ/zos-mixed-ptr-sizes.c
+6-6clang/test/CodeGen/math-libcalls-tbaa-indirect-args.c
+5-5llvm/test/Transforms/FunctionAttrs/argmemonly.ll
+968-7327 files not shown
+1,022-12733 files

LLVM/project ceb3dc6llvm/lib/Target/AMDGPU VOP3PInstructions.td SIInstrInfo.td

AMDGPU: Create InstrMapping from VGPR MFMA to equivalent AGPR instruction

This provides infrastructure for a future optimization.
DeltaFile
+10-5llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+9-0llvm/lib/Target/AMDGPU/SIInstrInfo.td
+5-0llvm/lib/Target/AMDGPU/SIInstrInfo.h
+24-53 files

LLVM/project 69cc3f0utils/bazel/llvm-project-overlay/mlir BUILD.bazel

Add mlir-query bazel rules (#116063)

I noticed there's no bazel query for `mlir-query`, unlike the other MLIR
tools, so adding one.
DeltaFile
+58-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+58-01 files

LLVM/project 79c850dllvm/lib/Target/LoongArch LoongArchExpandPseudoInsts.cpp, llvm/test/CodeGen/LoongArch psabi-restricted-scheduling.ll tls-models.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+20-20llvm/test/CodeGen/LoongArch/psabi-restricted-scheduling.ll
+10-10llvm/test/CodeGen/LoongArch/tls-models.ll
+10-10llvm/test/CodeGen/LoongArch/machinelicm-address-pseudos.ll
+5-5llvm/test/CodeGen/LoongArch/code-models.ll
+4-4llvm/test/CodeGen/LoongArch/expand-adjacency.ll
+1-1llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+50-506 files

LLVM/project 5d38e6eflang/test/HLFIR bufferize-workshare.fir, flang/test/Integration/OpenMP workshare-scalar-array-mul.f90 workshare-axpy.f90

[flang] Introduce hlfir.elemental lowerings to omp.workshare_loop_nest (#104748)

This patch adds parallelization support for the following expression in OpenMP
workshare constructs:

* Elemental procedures in array expressions

(reapplied with linking fix)
DeltaFile
+162-0flang/test/Transforms/OpenMP/should-use-workshare-lowering.mlir
+65-0flang/test/Integration/OpenMP/workshare-scalar-array-mul.f90
+57-0flang/test/Integration/OpenMP/workshare-axpy.f90
+57-0flang/test/HLFIR/bufferize-workshare.fir
+45-0flang/test/Integration/OpenMP/workshare-scalar-array-assign.f90
+34-0flang/test/Integration/OpenMP/workshare-array-array-assign.f90
+420-03 files not shown
+431-49 files

LLVM/project 036cd27llvm/unittests/TargetParser RISCVISAInfoTest.cpp

[RISCV] Fix typo in RISCVISAInfoTest.cpp. NFC.

ExtsRV32G -> ExtsRV64G.
DeltaFile
+2-2llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+2-21 files

LLVM/project 5abf65amlir/lib/Transforms/Utils DialectConversion.cpp

[mlir][Transforms][NFC] Dialect conversion: Remove "finalize" phase (#116934)

The dialect conversion driver has three phases:
- **Create** `IRRewrite` objects as the IR is traversed.
- **Finalize** `IRRewrite` objects. During this phase, source
materializations for mismatching value types are created. (E.g., when
`Value` is replaced with a `Value` of different type, but there is a
user of the original value that was not modified because it is already
legal.)
- **Commit** `IRRewrite` objects. During this phase, all remaining IR
modifications are materialized. In particular, SSA values are actually
being replaced during this phase.

This commit removes the "finalize" phase. This simplifies the code base
a bit and avoids one traversal over the `IRRewrite` stack. Source
materializations are now built during the "commit" phase, right before
an SSA value is being replaced.

This commit also removes the "inverse mapping" of the conversion value

    [15 lines not shown]
DeltaFile
+72-112mlir/lib/Transforms/Utils/DialectConversion.cpp
+72-1121 files

LLVM/project cbc7802mlir/include/mlir/Dialect/Bufferization/Transforms Passes.td Bufferize.h, mlir/lib/Dialect/Bufferization/Transforms Bufferize.cpp

[mlir][bufferization] Remove `finalizing-bufferize` pass (#114154)

The dialect conversion-based bufferization passes have been migrated to
One-Shot Bufferize about two years ago. To clean up the code base, this
commit removes the `finalizing-bufferize` pass, one of the few remaining
parts of the old infrastructure. Most bufferization passes have already
been removed.

Note for LLVM integration: If you depend on this pass, migrate to
One-Shot Bufferize or copy the pass to your codebase.

Depends on #114152.
DeltaFile
+0-95mlir/test/Dialect/Bufferization/Transforms/finalizing-bufferize.mlir
+0-75mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
+0-16mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
+0-6mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
+0-4mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
+0-2mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
+0-1986 files