LLVM/project 8b316fclld/ELF/Arch AMDGPU.cpp, lld/test/ELF amdgpu-abs32-reloc.s

Revert "[lld][AMDGPU] Support R_AMDGPU_ABS32_(LO|HI) relocations (#191550)"

This reverts commit 3a47349c084217d83f9968db8b551a8526de9702.
DeltaFile
+0-22lld/test/ELF/amdgpu-abs32-reloc.s
+0-14lld/ELF/Arch/AMDGPU.cpp
+0-362 files

LLVM/project 3a47349lld/ELF/Arch AMDGPU.cpp, lld/test/ELF amdgpu-abs32-reloc.s

[lld][AMDGPU] Support R_AMDGPU_ABS32_(LO|HI) relocations (#191550)

Summary:
These relocations are extremely rare, but they are listed as an expected
relocation in https://llvm.org/docs/AMDGPUUsage.html#relocation-records
and you can theoretically make them happen so we should probably support
it in the linker.
DeltaFile
+22-0lld/test/ELF/amdgpu-abs32-reloc.s
+14-0lld/ELF/Arch/AMDGPU.cpp
+36-02 files

LLVM/project ea8554ellvm/lib/Analysis InstCount.cpp, llvm/lib/Passes PassBuilderPipelines.cpp

Changed stat passes to count instructions before and after optimizations (#188837)

Created this for instcount and func-properties-analysis to be able to
see the change the optimization pipelines have on stats
DeltaFile
+0-70llvm/test/Analysis/FunctionPropertiesAnalysis/properties-stats.ll
+63-0llvm/test/Analysis/FunctionPropertiesAnalysis/function-properties-analysis.ll
+43-8llvm/lib/Analysis/InstCount.cpp
+38-6llvm/lib/Passes/PassBuilderPipelines.cpp
+41-0llvm/test/Analysis/InstCount/pipeline.ll
+41-0llvm/test/Analysis/FunctionPropertiesAnalysis/pipeline.ll
+226-846 files not shown
+285-9912 files

LLVM/project c9b632fllvm/test/MC/SystemZ insn-good-zos-pcrel.s

Fully translate test case to HLASM syntax dialect

This is a follow-up to 9d4436e3f4dfecd9503e90fb4cba907c86103e1e
which came in through the rebase.
DeltaFile
+28-28llvm/test/MC/SystemZ/insn-good-zos-pcrel.s
+28-281 files

LLVM/project afce975mlir/test/Dialect/Quant/Bytecode types.mlir

Fix duplicate quant bytecode test to actually test storage-type-only case (#190194)

Fixes a copy paste error
DeltaFile
+2-2mlir/test/Dialect/Quant/Bytecode/types.mlir
+2-21 files

LLVM/project eaf2f4eclang/lib/CodeGen BackendUtil.cpp, llvm/include/llvm/CodeGen AsmPrinterAnalysis.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+53-0llvm/include/llvm/CodeGen/AsmPrinterAnalysis.h
+51-1clang/lib/CodeGen/BackendUtil.cpp
+25-22llvm/include/llvm/Passes/CodeGenPassBuilder.h
+13-18llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+10-15llvm/lib/Target/AMDGPU/R600TargetMachine.cpp
+10-11llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+162-6710 files not shown
+196-11316 files

LLVM/project 2850600llvm/include/llvm/CodeGen AsmPrinterAnalysis.h, llvm/include/llvm/Passes CodeGenPassBuilder.h

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+53-0llvm/include/llvm/CodeGen/AsmPrinterAnalysis.h
+25-22llvm/include/llvm/Passes/CodeGenPassBuilder.h
+13-18llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+10-15llvm/lib/Target/AMDGPU/R600TargetMachine.cpp
+0-21llvm/lib/Target/X86/X86AsmPrinter.h
+10-11llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+111-877 files not shown
+135-11213 files

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

[Bazel] Fixes bd3088e (#191571)

This fixes bd3088ec7c680d419b108713945d94b1365c1201.

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 380b70cclang-tools-extra/clang-doc Serialize.cpp Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Use distinct APIs for fixed arena allocation sites

Typically, code either always emits data into the TransientArena or the
PersistentArena. Use more explicit APIs to convey the intent directly
instead of relying on parameters or defaults.
DeltaFile
+18-17clang-tools-extra/clang-doc/Serialize.cpp
+7-8clang-tools-extra/clang-doc/Representation.cpp
+7-7clang-tools-extra/clang-doc/BitcodeReader.cpp
+8-3clang-tools-extra/clang-doc/Representation.h
+3-3clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+43-385 files

LLVM/project eac7e79clang-tools-extra/clang-doc Representation.h

[clang-doc][nfc] Reformat and revise comment block
DeltaFile
+9-12clang-tools-extra/clang-doc/Representation.h
+9-121 files

LLVM/project 3b2c11eclang-tools-extra/clang-doc Serialize.cpp Serialize.h

[clang-doc] Removed OwnedPtr alias

The alias served a purpose during migration, but now conveys the wrong
semantics, as the memory of these pointers is generally interned inside
a local arena.
DeltaFile
+40-38clang-tools-extra/clang-doc/Serialize.cpp
+29-42clang-tools-extra/clang-doc/Serialize.h
+17-18clang-tools-extra/clang-doc/Representation.cpp
+3-14clang-tools-extra/clang-doc/Representation.h
+8-8clang-tools-extra/clang-doc/JSONGenerator.cpp
+8-6clang-tools-extra/clang-doc/HTMLGenerator.cpp
+105-12610 files not shown
+145-16616 files

LLVM/project 766ae30clang-tools-extra/clang-doc Representation.h Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Update type aliases

Many of the type aliases we introduced to simplify migration to arena
allocation  are no longer relevant after completing the migration. We
can use more relevant names and remove dead aliases.
DeltaFile
+13-25clang-tools-extra/clang-doc/Representation.h
+9-9clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+4-4clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+4-4clang-tools-extra/clang-doc/Representation.cpp
+4-4clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+4-4clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+38-505 files not shown
+47-5911 files

LLVM/project 4f49847flang/lib/Optimizer/Dialect FIROps.cpp CMakeLists.txt, flang/test/Transforms licm-acc-compute-region.fir

[flang] Detect non-optional boxes inside acc.compute_region. (#191328)

This should be a temporary change until we figure out
a better way for representing definitely present boxes.
It allows me to experiment with flang-licm further,
so I would like to ask for approval.
DeltaFile
+53-0flang/test/Transforms/licm-acc-compute-region.fir
+17-1flang/lib/Optimizer/Dialect/FIROps.cpp
+1-0flang/lib/Optimizer/Dialect/CMakeLists.txt
+71-13 files

LLVM/project 889d5bdflang/lib/Optimizer/Dialect/CUF CUFOps.cpp, flang/test/Transforms/CUF cuf-kernel-licm.fir

[flang][CUF] Limit Flang LICM for operations with symbol operands. (#191494)

There is probably an ordering issue between `CUFDeviceGlobal`
and `OffloadLiveInValueCanonicalization` passes: Flang LICM hoists
`fir.address_of` out of `cuf.kernel`, it is pulled back by
`OffloadLiveInValueCanonicalization`, but the symbol is never added
into the device module because `CUFDeviceGlobal` does not run after.

Changing the passes order may take some time, so this is a temporary
workaround to unblock #191309.

The change is currently NFC.
DeltaFile
+31-0flang/test/Transforms/CUF/cuf-kernel-licm.fir
+7-1flang/lib/Optimizer/Dialect/CUF/CUFOps.cpp
+38-12 files

LLVM/project 0074bfdllvm/lib/Support/Windows Path.inc Threading.inc

[Support] On Windows, silence FARPROC casts (#191563)

When building with clang-cl 19, this was generating:
```
  warning: cast from 'FARPROC' ... converts to incompatible function type
           [-Wcast-function-type-mismatch]
```
DeltaFile
+2-2llvm/lib/Support/Windows/Path.inc
+2-2llvm/lib/Support/Windows/Threading.inc
+4-42 files

LLVM/project 5d64a44clang-tools-extra/clang-doc Representation.h

[clang-doc] Initialize member variable (#191570)

We don't always initialize the IsType field in the current
implementation. We can ensure this field is always initialized to
`false`, and avoid any UB due to garbage data.
DeltaFile
+1-1clang-tools-extra/clang-doc/Representation.h
+1-11 files

LLVM/project bd3088emlir/lib/Dialect/SparseTensor/Transforms SparseGPUCodegen.cpp, mlir/test/Dialect/SparseTensor/GPU gpu_codegen_out_buffer.mlir gpu_combi.mlir

[mlir][sparse][gpu] fix sparse GPU codegen out buffer (#189221)

When lowering sparse tensor operations to GPU code using
`-sparse-gpu-codegen`, the generated `gpu.memcpy` op for device-to-host
copy was targeting the wrong buffer. In my case, it did not copy back
the output buffer and instead only copied back the input positions
buffer which results in the output buffer in host memory being empty.

The `SparseGPUCodegen` pass carries an assumption that the first buffer
is the out buffer. It looks like this assumption is not always true, as
in my case its the input positions buffer which made it the only buffer
getting copied back to host.

This change introduces a fix by removing the assumption and replacing it
with an analysis that checks for `memref::StoreOp` and write
MemoryEffects. This change also adds a regression test which highlights
the problematic edge case.

Assisted by Gemini 3.1 Pro for finding the issue of using incorrect
buffers in `gpu.memcpy` op in the lowered code.
DeltaFile
+42-8mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
+35-0mlir/test/Dialect/SparseTensor/GPU/gpu_codegen_out_buffer.mlir
+21-8mlir/test/Dialect/SparseTensor/GPU/gpu_combi.mlir
+11-5mlir/test/Dialect/SparseTensor/GPU/gpu_matmul.mlir
+109-214 files

LLVM/project 90abbf5clang-tools-extra/clang-doc Representation.h

[clang-doc] Initialize member variable

We don't always initialize the IsType field in the current
implementation. We can ensure this field is always initialized to
`false`, and avoid any UB due to garbage data.
DeltaFile
+1-1clang-tools-extra/clang-doc/Representation.h
+1-11 files

LLVM/project 2f422a5llvm/include/llvm/CodeGen InsertCodePrefetch.h, llvm/lib/CodeGen InsertCodePrefetch.cpp BasicBlockSectionsProfileReader.cpp

[Codegen, X86] Add prefetch insertion based on Propeller profile (#166324)

This PR implements the prefetch insertion in the InsertCodePrefetch pass
based on the
[RFC](https://discourse.llvm.org/t/rfc-code-prefetch-insertion/88668).

If the prefetch target is not defined in the same module (i.e, prefetch
target function is not defined in the same module), we emit a fallback
weak symbol after the prefetch instruction so that if the symbol is not
ever defined, we don't get undefined symbol error and the prefetch
instruction prefetches the next address:

```
prefetchit1 __llvm_prefetch_target_foo(%rip)
.weak __llvm_prefetch_target_foo
__llvm_prefetch_target_foo:
```

The weak symbol semantic is tied to ELF, so this makes this PR
target-dependent.
DeltaFile
+111-9llvm/lib/CodeGen/InsertCodePrefetch.cpp
+84-4llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
+31-0llvm/include/llvm/CodeGen/InsertCodePrefetch.h
+21-0llvm/lib/Target/X86/X86InstrInfo.cpp
+14-7llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+12-1llvm/test/CodeGen/X86/basic-block-sections-code-prefetch.ll
+273-219 files not shown
+317-2615 files

LLVM/project e3967abllvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.h SystemZHLASMAsmStreamer.cpp, llvm/test/CodeGen/SystemZ call-zos-02.ll

[SystemZ][z/OS] Show instruction encoding in HLASM output

This change adds the support to show instruction encoding as a comment
when emitting HLASM text. With this, the last 2 LIT tests migrate to
HLASM syntax.
DeltaFile
+83-55llvm/test/MC/SystemZ/insn-good-zos-pcrel.s
+9-18llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+7-5llvm/test/CodeGen/SystemZ/call-zos-02.ll
+3-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+102-784 files

LLVM/project 6f3a307llvm/include/llvm/MC MCAsmStreamer.h

Fix formatting
DeltaFile
+1-1llvm/include/llvm/MC/MCAsmStreamer.h
+1-11 files

LLVM/project a04ab8dclang-tools-extra/clang-doc Serialize.cpp Serialize.h

[clang-doc] Removed OwnedPtr alias

The alias served a purpose during migration, but now conveys the wrong
semantics, as the memory of these pointers is generally interned inside
a local arena.
DeltaFile
+40-38clang-tools-extra/clang-doc/Serialize.cpp
+29-42clang-tools-extra/clang-doc/Serialize.h
+17-18clang-tools-extra/clang-doc/Representation.cpp
+3-14clang-tools-extra/clang-doc/Representation.h
+8-8clang-tools-extra/clang-doc/JSONGenerator.cpp
+8-6clang-tools-extra/clang-doc/Generators.h
+105-12610 files not shown
+145-16616 files

LLVM/project 1795594clang-tools-extra/clang-doc Serialize.cpp Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Use distinct APIs for fixed arena allocation sites

Typically, code either always emits data into the TransientArena or the
PersistentArena. Use more explicit APIs to convey the intent directly
instead of relying on parameters or defaults.
DeltaFile
+18-17clang-tools-extra/clang-doc/Serialize.cpp
+7-8clang-tools-extra/clang-doc/Representation.cpp
+7-7clang-tools-extra/clang-doc/BitcodeReader.cpp
+8-3clang-tools-extra/clang-doc/Representation.h
+3-3clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+43-385 files

LLVM/project a683280clang-tools-extra/clang-doc Representation.h

[clang-doc][nfc] Reformat and revise comment block
DeltaFile
+9-12clang-tools-extra/clang-doc/Representation.h
+9-121 files

LLVM/project c88758bclang-tools-extra/clang-doc Representation.h Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Update type aliases

Many of the type aliases we introduced to simplify migration to arena
allocation  are no longer relevant after completing the migration. We
can use more relevant names and remove dead aliases.
DeltaFile
+13-25clang-tools-extra/clang-doc/Representation.h
+9-9clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+4-4clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+4-4clang-tools-extra/clang-doc/Representation.cpp
+4-4clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+4-4clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+38-505 files not shown
+47-5911 files

LLVM/project 21e0034clang-tools-extra/clang-doc Representation.cpp Representation.h, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Merge data into persistent memory (#190056)

We have a need for persistent memory for the final info. Since each
group processes a single USR at a time, every USR is only ever processed
by a single thread from the thread pool. This means that we can keep per
thread persistent storage for all the info. There is significant
duplicated data between all the serialized records, so we can just merge
the final/unique items into the persistent arena, and clear out the
scratch/transient arena as we process each record in the bitcode.

The patch adds some APIs to help with managing the data, merging, and
allocation of data in the correct arena. It also safely merges and deep
copies data from the transient arenas into persistent storage that is
never reset until the program completes.

This patch reduces memory by another % over the previous patches,
bringing the total savings over the baseline to 57%. Runtime performance
and benchmarks stay mostly flat with modest improvements.


    [30 lines not shown]
DeltaFile
+134-10clang-tools-extra/clang-doc/Representation.cpp
+25-25clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+7-0clang-tools-extra/clang-doc/Representation.h
+166-353 files

LLVM/project 96b1ae7flang/lib/Semantics resolve-directives.cpp

[flang][OpenMP] Use common utility functions to get affected nest depth (#191418)

Remove the existing code that calculates the number of affected loops in
an OpenMP construct. There is a single function that does that and that
handles all directives and clauses.

Issue: https://github.com/llvm/llvm-project/issues/191249
DeltaFile
+8-138flang/lib/Semantics/resolve-directives.cpp
+8-1381 files

LLVM/project 6dc059aclang/tools/diagtool ShowEnabledWarnings.cpp CMakeLists.txt

[clang][diagtool] Remove dependency on clangDriver from diagtool (#190076)
DeltaFile
+8-18clang/tools/diagtool/ShowEnabledWarnings.cpp
+0-1clang/tools/diagtool/CMakeLists.txt
+8-192 files

LLVM/project 903fe30clang-tools-extra/clang-doc Serialize.cpp Serialize.h

[clang-doc] Removed OwnedPtr alias

The alias served a purpose during migration, but now conveys the wrong
semantics, as the memory of these pointers is generally interned inside
a local arena.
DeltaFile
+40-38clang-tools-extra/clang-doc/Serialize.cpp
+29-42clang-tools-extra/clang-doc/Serialize.h
+17-18clang-tools-extra/clang-doc/Representation.cpp
+3-14clang-tools-extra/clang-doc/Representation.h
+8-8clang-tools-extra/clang-doc/JSONGenerator.cpp
+8-6clang-tools-extra/clang-doc/Generators.h
+105-12610 files not shown
+145-16616 files

LLVM/project a7f4df6clang-tools-extra/clang-doc Representation.h Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Update type aliases

Many of the type aliases we introduced to simplify migration to arena
allocation  are no longer relevant after completing the migration. We
can use more relevant names and remove dead aliases.
DeltaFile
+13-25clang-tools-extra/clang-doc/Representation.h
+9-9clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+4-4clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+4-4clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+4-4clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+4-4clang-tools-extra/clang-doc/Representation.cpp
+38-505 files not shown
+47-5911 files