LLVM/project 54faa75llvm/cmake/modules AddLLVM.cmake

[LLVM][CMake][NFC] Use generator expression to separate CXXFLAGS (#173869)

This avoids looking at the individual sources for mixed C/C++ libraries.

The previous code was written ~2014. Generator expressions were added in
CMake 3.3 (2015). We currently require CMake 3.20 and therefore can rely
on more modern features.

Apart from simplifying the code, this is preliminary work to make more
use of pre-compiled headers (#173868).
DeltaFile
+14-42llvm/cmake/modules/AddLLVM.cmake
+14-421 files

LLVM/project 5f05793mlir/test/mlir-tblgen op-attribute.td, mlir/tools/mlir-tblgen OpDefinitionsGen.cpp

[mlir][ods] Fix ODS bug for usePropertiesForAttributes = 0 (#173006)

This fixes invalid cpp generated in the `verifyInvariantsImpl` method
for operations generated from ODS when `usePropertiesForAttributes = 0`
is set on the Dialect.

Fixes the bug introduced in
- https://github.com/llvm/llvm-project/pull/153603

Closes #171217
DeltaFile
+46-0mlir/test/mlir-tblgen/op-attribute.td
+1-1mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+47-12 files

LLVM/project f0582f7mlir/lib/Dialect/Tensor/IR ValueBoundsOpInterfaceImpl.cpp, mlir/test/Dialect/Tensor value-bounds-op-interface-impl.mlir

Reland "[mlir][tensor] Add ValueBoundsOpInterface for ExpandShapeOp and CollapseShapeOp #173356" (#173857)

The original PR #173356 was reverted (commit 5d6c40b) due to an
AddressSanitizer failure
(https://lab.llvm.org/buildbot/#/builders/52/builds/13831).

The failure was caused by incorrect use of a const reference
https://github.com/llvm/llvm-project/pull/173356#discussion_r2643027667,
which bound a reference to a temporary value returned by
`getReassociationIndices()`.

This reland drops the const reference and uses a copy instead.

Signed-off-by: Yu-Zhewen <zhewenyu at amd.com>
DeltaFile
+36-0mlir/lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp
+32-0mlir/test/Dialect/Tensor/value-bounds-op-interface-impl.mlir
+68-02 files

LLVM/project 931c0fcmlir/include/mlir/Transforms Passes.td Passes.h, mlir/lib/Transforms RemoveDeadValues.cpp

tmp commit

simple test working

draft: do not erase IR, just replace uses
DeltaFile
+203-313mlir/lib/Transforms/RemoveDeadValues.cpp
+110-45mlir/test/Transforms/remove-dead-values.mlir
+10-0mlir/include/mlir/Transforms/Passes.td
+1-0mlir/include/mlir/Transforms/Passes.h
+324-3584 files

LLVM/project abfac95mlir/docs Canonicalization.md

[mlir][docs] Add more examples for the "canonical form" (#173667)

Mention that there is no formal definition of the canonical form. Also
add more examples for users to understand what kind of transformations
the community has agreed upon in the past.

---------

Co-authored-by: Mehdi Amini <joker.eph at gmail.com>
DeltaFile
+37-20mlir/docs/Canonicalization.md
+37-201 files

LLVM/project ca73d19mlir/lib/Transforms RemoveDeadValues.cpp

[mlir][Transforms][NFC] `remove-dead-values`: Simplify dropped value handling (#173540)

`RDVFinalCleanupList::values` is used only for function op handling. The
functionality for dropping function arg uses can be incorporated into
Step 5 (function op handling). There is no need for a separate step.
DeltaFile
+7-14mlir/lib/Transforms/RemoveDeadValues.cpp
+7-141 files

LLVM/project f04dc3bclang/include/clang/Basic BuiltinsAMDGPU.def, clang/test/CodeGenOpenCL builtins-fp-atomics-gfx90a.cl

[Clang] Remove 't' from __builtin_amdgcn_flat_atomic_fmin/fmax_f64 (#173839)

Allows for type checking depending on the built-in signature.

There is no `f32` version for both builtins
DeltaFile
+17-0clang/test/SemaHIP/amdgpu-flat-atomic-fmax-err.hip
+17-0clang/test/SemaHIP/amdgpu-flat-atomic-fmin-err.hip
+4-4clang/test/CodeGenOpenCL/builtins-fp-atomics-gfx90a.cl
+2-2clang/include/clang/Basic/BuiltinsAMDGPU.def
+40-64 files

LLVM/project e44210bclang-tools-extra/clang-doc Serialize.cpp JSONGenerator.cpp, clang-tools-extra/clang-doc/assets class-template.mustache

[clang-doc] Add friends to class template

This patch also allows comments to be associated with friend
declarations. Currently, it seems like the comments for friend `RecordDecl`
are taken from the actual class declaration, while a friend
function's comments are taken from the actual `friend` declaration.
DeltaFile
+59-3clang-tools-extra/test/clang-doc/json/class.cpp
+35-0clang-tools-extra/clang-doc/assets/class-template.mustache
+5-2clang-tools-extra/clang-doc/Serialize.cpp
+5-2clang-tools-extra/clang-doc/JSONGenerator.cpp
+4-0clang-tools-extra/clang-doc/BitcodeReader.cpp
+2-0clang-tools-extra/clang-doc/BitcodeWriter.cpp
+110-71 files not shown
+111-77 files

LLVM/project 61aadebclang-tools-extra/clang-doc JSONGenerator.cpp Serialize.cpp, clang-tools-extra/clang-doc/assets class-template.mustache

[clang-doc] Add friends to class template

This patch also allows comments to be associated with friend
declarations. Currently, it seems like the comments for friend `RecordDecl`
are taken from the actual class declaration, while a friend
function's comments are taken from the actual `friend` declaration.
DeltaFile
+59-3clang-tools-extra/test/clang-doc/json/class.cpp
+35-0clang-tools-extra/clang-doc/assets/class-template.mustache
+5-2clang-tools-extra/clang-doc/JSONGenerator.cpp
+5-2clang-tools-extra/clang-doc/Serialize.cpp
+4-0clang-tools-extra/clang-doc/BitcodeReader.cpp
+2-0clang-tools-extra/clang-doc/BitcodeWriter.cpp
+110-71 files not shown
+111-77 files

LLVM/project f8e9843clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/clang-doc/assets class-template.mustache

[clang-doc] Add nested records to template

Nested records already had some tags, but they weren't
compatible with the current JSON scheme.
DeltaFile
+26-4clang-tools-extra/test/clang-doc/json/class.cpp
+12-12clang-tools-extra/clang-doc/assets/class-template.mustache
+7-1clang-tools-extra/clang-doc/JSONGenerator.cpp
+45-173 files

LLVM/project 85d5081clang-tools-extra/clang-doc/assets class-template.mustache enum-template.mustache, clang-tools-extra/test/clang-doc enum.cpp

[clang-doc] Add class member enums to template

Some Mustache tags for member enums already existed in the class
template, but they weren't compatible with the current JSON scheme.
DeltaFile
+31-12clang-tools-extra/test/clang-doc/enum.cpp
+10-12clang-tools-extra/clang-doc/assets/class-template.mustache
+1-1clang-tools-extra/clang-doc/assets/enum-template.mustache
+42-253 files

LLVM/project 26488a7clang-tools-extra/clang-doc HTMLGenerator.cpp JSONGenerator.cpp, clang-tools-extra/clang-doc/assets class-template.mustache namespace-template.mustache

[clang-doc] Add typedefs and aliases to templates

This patch also adds optional template information to the typedef info
struct.
DeltaFile
+87-0clang-tools-extra/test/clang-doc/typedef-alias.cpp
+21-7clang-tools-extra/clang-doc/assets/class-template.mustache
+22-0clang-tools-extra/clang-doc/assets/namespace-template.mustache
+12-0clang-tools-extra/clang-doc/assets/alias-template.mustache
+5-5clang-tools-extra/clang-doc/HTMLGenerator.cpp
+5-1clang-tools-extra/clang-doc/JSONGenerator.cpp
+152-139 files not shown
+174-1615 files

LLVM/project 7048bbcclang-tools-extra/clang-doc JSONGenerator.cpp BitcodeWriter.cpp, clang-tools-extra/clang-doc/assets namespace-template.mustache comment-template.mustache

[clang-doc] Add concepts to namespace template

This patch serializes concepts in HTML. This patch also includes changes
to bitcode reading/writing and JSON to serialize the concept's location,
which was missing.
DeltaFile
+88-0clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
+30-0clang-tools-extra/clang-doc/assets/namespace-template.mustache
+8-0clang-tools-extra/clang-doc/assets/comment-template.mustache
+5-1clang-tools-extra/clang-doc/JSONGenerator.cpp
+5-0clang-tools-extra/test/clang-doc/json/concept.cpp
+4-1clang-tools-extra/clang-doc/BitcodeWriter.cpp
+140-22 files not shown
+143-28 files

LLVM/project 44e32ccllvm/lib/Target/RISCV RISCVRegisterInfo.cpp, llvm/test/CodeGen/RISCV xqcibm-extract.ll

[RISCV] Add regalloc hints for QC_EXTU (#173953)

`ANDI` with a mask gets converted into `QC_EXTU` in certain cases. Add
regalloc hints to use the same source and destination register so that
we can generate the compressed `QC_C_EXTU` instruction.
DeltaFile
+54-0llvm/test/CodeGen/RISCV/xqcibm-extract.ll
+2-0llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
+56-02 files

LLVM/project d690baamlir/lib/Bindings/Python DialectQuant.cpp DialectLLVM.cpp, mlir/test/python/dialects pdl_types.py

[mlir][Python] port dialect extensions to use core PyConcreteType, PyConcreteAttribute
DeltaFile
+454-355mlir/lib/Bindings/Python/DialectQuant.cpp
+164-133mlir/lib/Bindings/Python/DialectLLVM.cpp
+125-109mlir/lib/Bindings/Python/DialectSparseTensor.cpp
+141-89mlir/lib/Bindings/Python/DialectTransform.cpp
+134-72mlir/lib/Bindings/Python/DialectPDL.cpp
+103-100mlir/test/python/dialects/pdl_types.py
+1,121-8585 files not shown
+1,386-1,01211 files

LLVM/project d4e6cadmlir/include/mlir/Bindings/Python IRAttributes.h IRTypes.h, mlir/lib/Bindings/Python IRAttributes.cpp IRTypes.cpp

[mlir][Python] move IRTypes and IRAttributes to public headers
DeltaFile
+586-1,652mlir/lib/Bindings/Python/IRAttributes.cpp
+629-1,010mlir/lib/Bindings/Python/IRTypes.cpp
+617-0mlir/include/mlir/Bindings/Python/IRAttributes.h
+611-1mlir/lib/Bindings/Python/MainModule.cpp
+464-1mlir/include/mlir/Bindings/Python/IRTypes.h
+58-71mlir/test/python/lib/PythonTestModuleNanobind.cpp
+2,965-2,7352 files not shown
+2,982-2,7398 files

LLVM/project e89bd48mlir/lib/Query/Matcher MatchFinder.cpp

[mlir] Avoid crash in mlir-query's MatchFinder class (#145049)

It was failing for cases where the location was not a FileLineColLoc and fileLoc a nullptr.

If the following query is run: 

`match getUsersByPredicate(hasOpName("memref.alloc"),
hasOpName("memref.dealloc"), true)`

on the IR illustrated below, it caused the program to crash.

``` mlir
func.func @slicing_linalg_op(%arg0 : index, %arg1 : index, %arg2 : index) {
  %a = memref.alloc(%arg0, %arg2) : memref<?x?xf32>
  %b = memref.alloc(%arg2, %arg1) : memref<?x?xf32>
  %c = memref.alloc(%arg0, %arg1) : memref<?x?xf32>
  %d = memref.alloc(%arg0, %arg1) : memref<?x?xf32>
  linalg.matmul ins(%a, %b : memref<?x?xf32>, memref<?x?xf32>)
               outs(%c : memref<?x?xf32>)

    [9 lines not shown]
DeltaFile
+13-11mlir/lib/Query/Matcher/MatchFinder.cpp
+13-111 files

LLVM/project a22262emlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python Pass.cpp

jakub's suggestion
DeltaFile
+3-4mlir/include/mlir/Bindings/Python/IRCore.h
+1-1mlir/lib/Bindings/Python/Pass.cpp
+4-52 files

LLVM/project 03f3444utils/bazel/llvm-project-overlay/mlir BUILD.bazel

Reflect rename in bazel file
DeltaFile
+2-1utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+2-11 files

LLVM/project 7a38d39utils/bazel/llvm-project-overlay/mlir BUILD.bazel

remove stray newline
DeltaFile
+0-1utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+0-11 files

LLVM/project fb48a96mlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python IRCore.cpp MainModule.cpp

move impls
DeltaFile
+454-0mlir/lib/Bindings/Python/IRCore.cpp
+65-379mlir/include/mlir/Bindings/Python/IRCore.h
+20-0mlir/lib/Bindings/Python/MainModule.cpp
+539-3793 files

LLVM/project 4fd9898mlir/cmake/modules AddMLIRPython.cmake, mlir/docs/Bindings Python.md

address
jpienaar comments
DeltaFile
+8-5mlir/include/mlir/Bindings/Python/IRCore.h
+4-4mlir/cmake/modules/AddMLIRPython.cmake
+2-2mlir/docs/Bindings/Python.md
+1-2mlir/lib/Bindings/Python/IRCore.cpp
+15-134 files

LLVM/project a84cc4amlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python MainModule.cpp IRCore.cpp

factor out more impls
DeltaFile
+22-265mlir/include/mlir/Bindings/Python/IRCore.h
+257-11mlir/lib/Bindings/Python/MainModule.cpp
+49-0mlir/lib/Bindings/Python/IRCore.cpp
+328-2763 files

LLVM/project 451ee09mlir/cmake/modules AddMLIRPython.cmake

comments
DeltaFile
+13-6mlir/cmake/modules/AddMLIRPython.cmake
+13-61 files

LLVM/project 0d3ec3cmlir/cmake/modules AddMLIRPython.cmake, mlir/docs/Bindings Python.md

address comments
DeltaFile
+35-15mlir/cmake/modules/AddMLIRPython.cmake
+7-0mlir/docs/Bindings/Python.md
+1-1mlir/python/CMakeLists.txt
+43-163 files

LLVM/project a47f171mlir/examples/standalone/test lit.cfg.py, mlir/examples/standalone/test/python smoketest.py

check standalone
DeltaFile
+5-7mlir/examples/standalone/test/lit.cfg.py
+4-4mlir/examples/standalone/test/python/smoketest.py
+3-1mlir/test/Examples/standalone/test.wheel.toy
+1-0mlir/test/Examples/standalone/test.toy
+13-124 files

LLVM/project c56b93emlir/cmake/modules AddMLIRPython.cmake

fix empty _mlir_python_support_libs
DeltaFile
+1-1mlir/cmake/modules/AddMLIRPython.cmake
+1-11 files

LLVM/project 89b5229mlir/lib/Bindings/Python Rewrite.cpp

address comments
DeltaFile
+0-31mlir/lib/Bindings/Python/Rewrite.cpp
+0-311 files

LLVM/project 9f78166mlir/cmake/modules AddMLIRPython.cmake

parameteriez add_mlir_python_modules
DeltaFile
+19-12mlir/cmake/modules/AddMLIRPython.cmake
+19-121 files

LLVM/project ba5b897mlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python MainModule.cpp Rewrite.cpp

works
DeltaFile
+71-62mlir/lib/Bindings/Python/MainModule.cpp
+24-19mlir/lib/Bindings/Python/Rewrite.cpp
+35-8mlir/include/mlir/Bindings/Python/IRCore.h
+26-13mlir/lib/Bindings/Python/Pass.cpp
+22-15mlir/lib/Bindings/Python/IRTypes.cpp
+25-9mlir/lib/Bindings/Python/IRAffine.cpp
+203-12614 files not shown
+303-17820 files