LLVM/project 3578807llvm/lib/MC MCGOFFStreamer.cpp GOFFObjectWriter.cpp

Fix formatting
DeltaFile
+4-3llvm/lib/MC/MCGOFFStreamer.cpp
+2-1llvm/lib/MC/GOFFObjectWriter.cpp
+6-42 files

LLVM/project 3829fdbmlir/lib/Pass PassRegistry.cpp, mlir/test/Pass invalid-pass.mlir

[mlir][Pass] Report error when passing options to pipelines via shorthand syntax (#185738)

When passing options to a pass pipeline that doesn't accept options,
mlir-opt exits with error code 1, but prints no error message when using
shorthand CLI syntax:

```
# Silent failure (no error message):
$ mlir-opt --tosa-to-linalg-pipeline=foo /dev/null
$ echo $?
1

# Same pipeline via --pass-pipeline syntax reports error:
$ mlir-opt --pass-pipeline='builtin.module(tosa-to-linalg-pipeline{foo})' /dev/null
<unknown>:0: error: failed to add `tosa-to-linalg-pipeline` with options `foo`
```

This PR adds replaces the silent call to `failure` with `errorHandler`
in `PassPipelineCLParser::addToPipeline`, matching the existing pattern
in `TextualPipeline::addToPipeline`.
DeltaFile
+3-1mlir/lib/Pass/PassRegistry.cpp
+2-0mlir/test/Pass/invalid-pass.mlir
+5-12 files

LLVM/project 6bdd17dllvm/lib/Target/X86 X86SelectionDAGInfo.cpp

[X86] Add stop-gap for SDAG failure in fptrunc lowering

```
define <3 x half> @err_420(<3 x float> %0) {
entry:
  %1 = fptrunc <3 x float> %0 to <3 x half>
  ret <3 x half> %1
}
```

currently crashes.

\#185562 will fix this, but needs another round of review. Land a
stop-gap for now to unblock our integrate process.
DeltaFile
+2-0llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
+2-01 files

LLVM/project 88c33f8mlir/include/mlir/Dialect/SPIRV/IR SPIRVMatrixOps.td, mlir/lib/Dialect/SPIRV/IR SPIRVOps.cpp

[mlir][spirv] Move remaining verification from C++ to ODS for Matrix ops (#185702)

This adds two new custom constraints to enforce matrix and vector
dimension with respect to one another.

Assisted-by: Codex
DeltaFile
+0-88mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
+43-4mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMatrixOps.td
+9-9mlir/test/Dialect/SPIRV/IR/matrix-ops.mlir
+52-1013 files

LLVM/project ffa128dmlir/include/mlir/Dialect/AMDGPU/IR AMDGPUOps.td, mlir/lib/Conversion/AMDGPUToROCDL AMDGPUToROCDL.cpp

[AMDGPU] Added support for Sparse WMMA ops (#183360)

This PR adds support for Sparce WMMA ops (gfx12 and gfx1250)

---------

Co-authored-by: Jakub Kuderski <kubakuderski at gmail.com>
DeltaFile
+255-15mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+112-0mlir/test/Dialect/AMDGPU/invalid.mlir
+98-0mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPUOps.td
+85-0mlir/test/Conversion/AMDGPUToROCDL/swmmac-gfx12.mlir
+71-0mlir/lib/Dialect/AMDGPU/IR/AMDGPUOps.cpp
+51-0mlir/test/Conversion/AMDGPUToROCDL/swmmac-gfx1250.mlir
+672-156 files

LLVM/project a158b0bllvm/cmake/modules HandleLLVMOptions.cmake

[SystemZ] Disable PCH on z/OS.

The compiler supports PCH in pronciple, but there are occasionally
hickups. Therefore it is better to disable PCH by default.
DeltaFile
+7-0llvm/cmake/modules/HandleLLVMOptions.cmake
+7-01 files

LLVM/project d4c7630llvm/utils lldbDataFormatters.py

[lldb] Fix type checking in lldbDataFormatters (NFC) (#185706)
DeltaFile
+17-16llvm/utils/lldbDataFormatters.py
+17-161 files

LLVM/project 9c464eeutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Add SCFDialect dep to OpenACCDialect

Needed to satisfy some internal layering checks.
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 8963edbllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer consecutive-access.ll reduced-gathered-vectorized.ll

[SLP] Loop aware cost model/tree building

Currently, SLP vectorizer do not care about loops and their trip count.
It may lead to inefficient vectorization in some cases. Patch adds loop
nest-aware tree building and cost estimation.
When it comes to tree building, it now checks that tree do not span
across different loop nests. The nodes from other loop nests are
immediate buildvector nodes.
The cost model adds the knowledge about loop trip count. If it is
unknown, the default value is used, controlled by the
-slp-cost-loop-min-trip-count=<value> option. The cost of the vector
nodes in the loop is multiplied by the number of iteration (trip count),
because each vector node will be executed the trip count number of
times. This allows better cost estimation.

Reviewers: jdenny-ornl, vporpo, hiraditya, RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/150450
DeltaFile
+183-13llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+69-92llvm/test/Transforms/SLPVectorizer/RISCV/buildvector-all-external-scalars.ll
+34-45llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll
+24-52llvm/test/Transforms/SLPVectorizer/consecutive-access.ll
+49-20llvm/test/Transforms/SLPVectorizer/reduced-gathered-vectorized.ll
+33-36llvm/test/Transforms/SLPVectorizer/X86/deleted-instructions-clear.ll
+392-25822 files not shown
+530-43328 files

LLVM/project d89c2b2llvm/lib/Analysis DependenceAnalysis.cpp

add another assertion
DeltaFile
+7-0llvm/lib/Analysis/DependenceAnalysis.cpp
+7-01 files

LLVM/project 9d8810cclang/test/CodeGenCXX microsoft-abi-diamond-template-multiple-vbptrs-32bit.cpp microsoft-abi-diamond-template-multiple-vbptrs.cpp

[clang][codegen] Additional tests for vbptr memory size calculation (#185703)

This patch adds three vbptr and 32 bit test cases for additional
coverage
Follow-up to https://github.com/llvm/llvm-project/pull/184558
DeltaFile
+212-0clang/test/CodeGenCXX/microsoft-abi-diamond-template-multiple-vbptrs-32bit.cpp
+90-1clang/test/CodeGenCXX/microsoft-abi-diamond-template-multiple-vbptrs.cpp
+302-12 files

LLVM/project 9e611e8clang/include/clang/CIR/Dialect/IR CIROps.td CIRAttrs.td, clang/include/clang/CIR/Interfaces ASTAttrInterfaces.h

[CIR] Add abstract delete operation without AST attribute (#185538)

This introduces the cir.delete_array operation, adds code to emit that
operation during CIR codegen, and adds lowering of the operation to the
CXXABILowering pass.

In order to handle possible variations in the delete representation, we
add the name of the delete function, the usual delete parameters, and,
optionally, the name of the element destructor function.

During the CXXABILoweringPass, the cir.delete_array operation is
expanded to call the delete function. This will be extended in a future
change to handle reading the array cookie, if required, and calling
element destructors.
DeltaFile
+64-0clang/test/CIR/CodeGen/delete-array.cpp
+41-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+28-1clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+24-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+17-3clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
+1-0clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.h
+175-46 files

LLVM/project 7a10495mlir/lib/Dialect/OpenACC/IR OpenACCCG.cpp

[MLIR] Fix -Wunused-variable in 41c0b19d878f2bb9b2c0a4ccb08f81da992e4fef
DeltaFile
+1-2mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
+1-21 files

LLVM/project 8d32713llvm/lib/MC GOFFObjectWriter.cpp MCGOFFStreamer.cpp, llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.cpp

[SystemZ][GOFF] Reference to external variable needs PR symbol

Variables are modelled as parts in the GOFF format. Referencing a
variable defined in a different compilation unit requires to use
a PR symbol instead of EXTRN/WEXTRN instruction.
A small issue is that these PR symbols can refer to the same ED
symbols, for which a section needs to be created.
DeltaFile
+52-44llvm/test/CodeGen/SystemZ/zos-section-1.ll
+35-27llvm/test/CodeGen/SystemZ/zos-section-2.ll
+22-10llvm/lib/MC/GOFFObjectWriter.cpp
+12-12llvm/test/CodeGen/SystemZ/zos-symbol-2.ll
+15-2llvm/lib/MC/MCGOFFStreamer.cpp
+7-2llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+143-972 files not shown
+153-988 files

LLVM/project 8e24cb4clang-tools-extra/clang-doc/assets comment-template.mustache

[clang-doc][NFC] Remove outdated tag in comment template (#185704)
DeltaFile
+0-5clang-tools-extra/clang-doc/assets/comment-template.mustache
+0-51 files

LLVM/project b50cf35llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU fp-min-max-num-flat-atomics.ll fp-min-max-num-global-atomics.ll

[AMDGPU][GlobalIsel] Add register bank legalization rules for amdgcn atomic fminmax num (#184564)

This patch adds register bank legalization rules for amdgcn global/flat
atomic fmin/fmax num operations in the AMDGPU GlobalISel pipeline.
DeltaFile
+145-30llvm/test/CodeGen/AMDGPU/fp-min-max-num-flat-atomics.ll
+68-26llvm/test/CodeGen/AMDGPU/fp-min-max-num-global-atomics.ll
+8-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+221-563 files

LLVM/project ab048acclang/lib/Headers __clang_cuda_runtime_wrapper.h

[clang][CUDA] Define _NV_RSQRT_SPECIFIER for glibc-2.42/cuda-13.2 compatibility (#185701)

CUDA-13.2 defines _NV_RSQRT_SPECIFIER to make its headers compileable
with glibc 2.42+. However, clang does not include the header that
defines the macro, and has to define it by itself.
DeltaFile
+12-0clang/lib/Headers/__clang_cuda_runtime_wrapper.h
+12-01 files

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

[Bazel] Port 41c0b19d878f2bb9b2c0a4ccb08f81da992e4fef
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 1bebdfbflang/lib/Parser openmp-parsers.cpp, flang/test/Parser/OpenMP no-commas-in-ods-list-item.f90

[flang][OpenMP] Allow parsing ODS as directive-specification list item

Normally a directive specification may use commas between the directive
name and the clauses, and between the clauses. There are some instances,
however, when a directive-specification is treated as a list item.
Specifically in arguments to the APPLY clause and as an argument to WHEN,
OTHERWISE, and the now-deprecated DEFAULT when used on a METADIRECTIVE.
In those cases, use of commas is prohibited to avoid confusion between
commas being part of the directive-specification, and the argument list
separators.
DeltaFile
+122-61flang/lib/Parser/openmp-parsers.cpp
+16-0flang/test/Parser/OpenMP/no-commas-in-ods-list-item.f90
+138-612 files

LLVM/project 79c9dadllvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp, llvm/test/CodeGen/SPIRV/llvm-intrinsics powi-glsl.ll

[SPIR-V] Add lowering for G_FPOWI (#185454)

This fixes an assertion I was hitting in the fragment density map sample
in Vulkan Samples. In starfield.frag.hlsl, we have

float starCol = pow((rnd - threshhold) / (1.0 - threshhold), 16.0);

The optimizer recognizes 16.0 as a whole number and converts the call to
`llvm.powi`. The backend goes on to fail with:

fatal error: error in backend: cannot select: %46:fid(s64) = nnan ninf
nsz arcp afn reassoc G_FPOWI %44:fid, %45:iid(s64) (in function:
_Z9starFieldDv3_f)

On Vulkan, there is no integer-exponent for pow. This patch lowers it by
converting the exponent to float and calling GLSL.std.450's Pow.

---------

Co-authored-by: Steven Perron <stevenperron at google.com>
DeltaFile
+43-0llvm/test/CodeGen/SPIRV/llvm-intrinsics/powi-glsl.ll
+27-1llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+70-12 files

LLVM/project 4398b5flldb/include/lldb/Utility DataExtractor.h VirtualDataExtractor.h, lldb/source/Symbol ObjectFile.cpp

[lldb] Have ObjectFile::FindPlugin send a copy of the DE (#185727)

ObjectFile::FindPlugin iterates over plugins to find one that can handle
the binary provided. It is currently sending the one DataExtractorSP to
each subclass, but some subclasses may modify this DataExtractor during
their processing, e.g. calling DataExtractor::SetData on it, and I think
it is safer to isolate these with a copy of the DataExtractor so the
order the plugins are tried cannot possibly change behavior.
DeltaFile
+6-2lldb/source/Symbol/ObjectFile.cpp
+6-0lldb/include/lldb/Utility/DataExtractor.h
+4-0lldb/include/lldb/Utility/VirtualDataExtractor.h
+16-23 files

LLVM/project 9472490clang/docs ReleaseNotes.rst, clang/lib/Sema SemaOverload.cpp

[clang] fix explicit incomplete enum (#184210)

stop BuildConvertedConstantExpression early for already-broken
expressions to prevent crashes in the constant conversion
fixes #183887
DeltaFile
+8-0clang/test/SemaCXX/gh183887.cpp
+8-0clang/lib/Sema/SemaOverload.cpp
+1-0clang/docs/ReleaseNotes.rst
+17-03 files

LLVM/project 41c0b19mlir/include/mlir/Dialect/OpenACC/Transforms Passes.td, mlir/lib/Dialect/OpenACC/Transforms ACCComputeLowering.cpp

[mlir][acc] Add ACCComputeLowering pass (#185501)

Introduce a pass that lowers OpenACC compute constructs to a
representation that separates the data environment from the compute body
and prepares for parallelism assignment and privatization at the right
granularity.

- Decompose acc.parallel, acc.serial, and acc.kernels into
acc.kernel_environment and acc.compute_region. Launch arguments
(num_gangs, num_workers, vector_length) are turned into acc.par_width
and passed as compute_region launch operands.
- Convert acc.loop to SCF based on context: unstructured loops to
scf.execute_region; sequential (serial or seq) to scf.parallel with
par_dims=sequential; auto loops to scf.for (with collapse when
multi-dimensional); orphan loops to scf.for; independent loops in
parallel/kernels to scf.parallel with par_dims from the GPU mapping.

---------

Co-authored-by: Scott Manley <rscottmanley at gmail.com>
DeltaFile
+372-0mlir/lib/Dialect/OpenACC/Transforms/ACCComputeLowering.cpp
+176-0mlir/test/Dialect/OpenACC/acc-compute-lowering-loop.mlir
+107-0mlir/test/Dialect/OpenACC/acc-compute-lowering-compute.mlir
+75-1mlir/unittests/Dialect/OpenACC/OpenACCUtilsCGTest.cpp
+46-25mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
+53-0mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsCG.cpp
+829-269 files not shown
+936-4615 files

LLVM/project 4131535flang/test/Driver fsafe-trampoline.f90

[flang] Add REQUIRES for the trampoline test (#185699)

Instead of listing the UNSUPPORTED list, it makes sense to have
the REQUIRES. 

Fix build failure in https://lab.llvm.org/buildbot/#/builders/157/builds/45154.
DeltaFile
+1-1flang/test/Driver/fsafe-trampoline.f90
+1-11 files

LLVM/project c3155felibclc/clc/include/clc/math clc_div_cr.h, libclc/clc/lib/generic CMakeLists.txt

libclc: Add div_cr utility function

This is a workaround for the modal div operator precision. The
OpenCL default is not correctly rounded, so this provides a backdoor
to get a correctly rounded fdiv. Ideally clang would have a builtin
or some other mechanism to control the precision.
DeltaFile
+26-0libclc/clc/include/clc/math/clc_div_cr.h
+12-0libclc/clc/lib/generic/math/clc_div_cr.inc
+11-0libclc/clc/lib/generic/math/clc_div_cr.cl
+4-0libclc/clc/lib/generic/CMakeLists.txt
+53-04 files

LLVM/project 859313fclang/include/clang/Analysis/Scalable/Analyses/UnsafeBufferUsage UnsafeBufferUsage.h, clang/lib/Analysis/Scalable CMakeLists.txt

[ssaf][UnsafeBufferUsage] Add JSON serialization for UnsafeBufferUsage

Implemented and registered a JSONFormat::FormatInfo for
UnsafeBufferUsage analysis

rdar://171920065
DeltaFile
+126-5clang/unittests/Analysis/Scalable/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+85-0clang/lib/Analysis/Scalable/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.cpp
+26-3clang/include/clang/Analysis/Scalable/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.h
+1-0clang/lib/Analysis/Scalable/CMakeLists.txt
+238-84 files

LLVM/project 30f13b1llvm/test/CodeGen/AMDGPU vgpr-mark-last-scratch-load.ll

[AMDGPU] New test for untested line in AMDGPUMarkLastScratchLoad (#185430)

[This
line](https://github.com/llvm/llvm-project/blob/af15474262100ade9a8fcfd05f9e05c7ba23ff8c/llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp#L121)
in the AMDGPU backend is uncovered by the existing test suite (checked
using coverage, and by asserting that no tests in the existing test
suite fails if we insert an `abort()` at this line).

We propose a test that covers this line. We demonstrate the test by
inserting an `abort()` at that line in commit
[#3cb65cf](https://github.com/llvm/llvm-project/pull/185430/changes/3cb65cf4451b5e728fb1e4968ba78b8e83d74220).
Running all tests shows that only our proposed test fails in the
presence of the abort. We'll remove the abort before merging.

This is the only test that fails in the presence of the abort (our new
test) -- it will pass once we remove the abort:
`CodeGen/AMDGPU/mark-last-scratch-load.ll`
DeltaFile
+305-0llvm/test/CodeGen/AMDGPU/vgpr-mark-last-scratch-load.ll
+305-01 files

LLVM/project 122cffallvm/lib/Target/AMDGPU AMDGPUCoExecSchedStrategy.cpp AMDGPUCoExecSchedStrategy.h, llvm/test/CodeGen/AMDGPU coexec-scheduler.ll

[AMDGPU] Add stalls for DS FIFO buffer

Change-Id: I73e56da97a931349e0655e4e20b24aeb97920647
DeltaFile
+56-53llvm/test/CodeGen/AMDGPU/coexec-scheduler.ll
+58-25llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp
+41-6llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.h
+155-843 files

LLVM/project d8d9df5libc/test/integration/src/__support/GPU scan_reduce.cpp, libclc/clc/lib/amdgpu/subgroup clc_sub_group_reduce.cl sub_group_reduce.cl

Address comments

Created using spr 1.3.7
DeltaFile
+289-52llvm/test/Analysis/CostModel/AMDGPU/exp10.ll
+289-52llvm/test/Analysis/CostModel/AMDGPU/exp.ll
+153-48llvm/test/Analysis/CostModel/AMDGPU/exp2.ll
+145-0libclc/clc/lib/amdgpu/subgroup/clc_sub_group_reduce.cl
+0-145libclc/clc/lib/amdgpu/subgroup/sub_group_reduce.cl
+107-0libc/test/integration/src/__support/GPU/scan_reduce.cpp
+983-297127 files not shown
+2,697-962133 files

LLVM/project 5e2d990llvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Use findAllocaInsertPoint when possible and move the affinity packing logic to OpenMPToLLVMIRTranslation

- Move the omp.affinity_list packing logic from OMPIRBuilder to
  OpenMPToLLVMIRTranslation so that we have all the omp.affinity_list
  allocating logic inside the lambda defined in buildAffinityData
  - all the allocation logic for affinity list is now using
    findAllocaInsertPoint when possible (static count)
  - `task_affinity_iterator_dynamic_tripcount` in
    openmp-iterator.mlir is a regression test add previously for
    dynamic tripcount
DeltaFile
+67-7mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+3-49llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+6-6mlir/test/Target/LLVMIR/openmp-iterator.mlir
+5-1llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+1-3llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+82-665 files