SuccessChanges

Summary

  1. Add Operation to python bindings. (details)
  2. Implement python iteration over the operation/region/block hierarchy. (details)
  3. Add mlir python APIs for creating operations, regions and blocks. (details)
  4. NFC: Remove unused variable. (details)
  5. [mlir][ods] Custom builder with no params (details)
  6. [mlir] Remove unneeded OpBuilder params. NFC. (details)
  7. Revert "[AMDGPU] Insert waitcnt after returning from call" (details)
  8. Add missing namespace closure comment. NFCI. (details)
  9. Add missing namespace closure comments. NFCI. (details)
  10. [AArch64] Fix ldst optimization of non-immediate store offset (details)
  11. recommit [HIP] Fix -gsplit-dwarf option (details)
  12. [lldb] Remove lldb-perf remenant (details)
  13. [mlir] Add insert before/after to list-like constructs in C API (details)
Commit 7abb0ff7e0419a9554d77e9108cb7da670b7471c by stellaraccident
Add Operation to python bindings.

* Fixes a rather egregious bug with respect to the inability to return arbitrary objects from py::init (was causing aliasing of multiple py::object -> native instance).
* Makes Modules and Operations referencable types so that they can be reliably depended on.
* Uniques python operation instances within a context. Opens the door for further accounting.
* Next I will retrofit region and block to be dependent on the operation, and I will attempt to model the API to avoid detached regions/blocks, which will simplify things a lot (in that world, only operations can be detached).
* Added quite a bit of test coverage to check for leaks and reference issues.
* Supercedes: https://reviews.llvm.org/D87213

Differential Revision: https://reviews.llvm.org/D87958
The file was modifiedmlir/lib/Bindings/Python/IRModules.cpp (diff)
The file was modifiedmlir/test/Bindings/Python/ir_types.py (diff)
The file was modifiedmlir/test/Bindings/Python/ir_location.py (diff)
The file was modifiedmlir/docs/Bindings/Python.md (diff)
The file was modifiedmlir/test/Bindings/Python/ir_module.py (diff)
The file was modifiedmlir/lib/Bindings/Python/IRModules.h (diff)
The file was modifiedmlir/test/Bindings/Python/ir_operation.py (diff)
The file was modifiedmlir/test/Bindings/Python/ir_attributes.py (diff)
Commit 4cf754c4bca94e957b634a854f57f4c7ec9151fb by stellaraccident
Implement python iteration over the operation/region/block hierarchy.

* Removes the half-completed prior attempt at region/block mutation in favor of new approach to ownership.
* Will re-add mutation more correctly in a follow-on.
* Eliminates the detached state on blocks and regions, simplifying the ownership hierarchy.
* Adds both iterator and index based access at each level.

Differential Revision: https://reviews.llvm.org/D87982
The file was modifiedmlir/lib/CAPI/IR/CMakeLists.txt (diff)
The file was modifiedmlir/lib/CAPI/IR/IR.cpp (diff)
The file was modifiedmlir/include/mlir-c/IR.h (diff)
The file was modifiedmlir/lib/Bindings/Python/IRModules.cpp (diff)
The file was modifiedmlir/test/Bindings/Python/ir_operation.py (diff)
The file was modifiedmlir/lib/Bindings/Python/IRModules.h (diff)
Commit c1ded6a759913a32b44a851f0823bbb648d2a7e1 by stellaraccident
Add mlir python APIs for creating operations, regions and blocks.

* The API is a bit more verbose than I feel like it needs to be. In a follow-up I'd like to abbreviate some things and look in to creating aliases for common accessors.
* There is a lingering lifetime hazard between the module and newly added operations. We have the facilities now to solve for this but I will do that in a follow-up.
* We may need to craft a more limited API for safely referencing successors when creating operations. We need more facilities to really prove that out and should defer for now.

Differential Revision: https://reviews.llvm.org/D87996
The file was modifiedmlir/lib/Bindings/Python/IRModules.h (diff)
The file was modifiedmlir/lib/Bindings/Python/IRModules.cpp (diff)
The file was modifiedmlir/test/Bindings/Python/ir_operation.py (diff)
The file was modifiedmlir/lib/Bindings/Python/PybindUtils.h (diff)
Commit 8e84972ab7060ace889bb383e76dc2c835a47c06 by stellaraccident
NFC: Remove unused variable.
The file was modifiedmlir/lib/Dialect/OpenACC/IR/OpenACC.cpp (diff)
Commit 80deb1e106a8c3c5ba31ef0bb4d7651acb6e6b69 by jpienaar
[mlir][ods] Custom builder with no params

Incorrect generation of custom build method without any params.
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp (diff)
Commit 501d7e07e31d8f79160324e683e4931403f469d5 by jpienaar
[mlir] Remove unneeded OpBuilder params. NFC.

These are now automatically prepended.
The file was modifiedmlir/include/mlir/Dialect/PDL/IR/PDLOps.td (diff)
The file was modifiedmlir/examples/toy/Ch6/include/toy/Ops.td (diff)
The file was modifiedmlir/examples/toy/Ch3/include/toy/Ops.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td (diff)
The file was modifiedmlir/examples/toy/Ch5/include/toy/Ops.td (diff)
The file was modifiedmlir/examples/toy/Ch2/include/toy/Ops.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td (diff)
The file was modifiedmlir/examples/toy/Ch4/include/toy/Ops.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td (diff)
The file was modifiedmlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td (diff)
The file was modifiedmlir/examples/toy/Ch7/include/toy/Ops.td (diff)
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td (diff)
Commit a343b9b032772894a7e27fcd03ebec3c53faa5d9 by sebastian.neubauer
Revert "[AMDGPU] Insert waitcnt after returning from call"

This reverts commit ca907bfb57d8ad3ec3bcc2cff2abab7b1b933af6.

According to michel.daenzer,
> This completely broke the Mesa radeonsi driver on Navi 14. Xorg +
> xterm come up with major corruption & psychedelic colours.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fadd.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/fmin_legacy.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.tbuffer.load.ll (diff)
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_generated_funcs.ll.generated.expected (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/image_ls_mipmap_zero.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i128.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/memcpy-fixed-align.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.1d.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/zextload.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-uniform.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2darraymsaa.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/call-argument-types.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.d16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/mubuf-global.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/localizer.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fmin.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/offset-split-global.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.format.ll (diff)
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_generated_funcs.ll.nogenerated.expected (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/call-preserved-registers.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/sibling-call.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/smrd.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.getresinfo.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.implicit.buffer.ptr.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.ordered.add.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/shl.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/global-saddr-atomics.gfx1030.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-local.96.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/divergent-control-flow.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/store-weird-sizes.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/non-entry-alloca.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/vector_shuffle.packed.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.3d.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.o.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.getlod.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-global-non-entry-func.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/mad-mix-hi.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2darraymsaa.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/offset-split-flat.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.ordered.swap.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/imm16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.encode.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/function-returns.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-local.128.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.tbuffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/fmax_legacy.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_store_local.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/infer-uniform-load-shader.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.load.format.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/call-waitcnt.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.global.atomic.fadd.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/ret_jump.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.a16.encode.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.g16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.global.atomic.csub.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.format.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.3d.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/lds-global-non-entry-func.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/function-args.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/visit-physreg-vgpr-imm-folding-bug.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-lo16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-local.96.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-frame-setup.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-hi16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.gather4.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/stack-realign.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.2d.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/global-saddr-load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/cross-block-use-is-not-abi-copy.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/store-hi16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.implicitarg.ptr.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.load.1d.d16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.atomic.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.a16.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-constant.96.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.gather4.dim.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/global-saddr-atomics.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-unaligned.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.buffer.load.dwordx3.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.getresinfo.a16.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.tbuffer.load.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/undefined-subreg-liverange.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/wave32.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_load_local.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/load-local.128.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/nested-calls.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ds.fmax.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/vgpr-tuple-allocation.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/scalar-store-cache-flush.mir (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa-func.ll (diff)
Commit 474dc33d075ae6b136bcaa4e4c5014d3deda5d25 by llvm-dev
Add missing namespace closure comment. NFCI.

Fixes clang-tidy llvm-namespace-comment warning.
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)
Commit 91589cf679c7946edfb5b33d1eb94d723ad99e2b by llvm-dev
Add missing namespace closure comments. NFCI.

Fixes some clang-tidy llvm-namespace-comment warnings.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp (diff)
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombinePHI.cpp (diff)
Commit c2deacd929dabded734a478e78c1eef23aa459c5 by weiwei64
[AArch64] Fix ldst optimization of non-immediate store offset

When matching store instruction for ldst opt, we should make sure store instr is in 'reg+imm' form as load instr,
otherwise, it will have assertion in isLdOffsetInRangeOfSt since it will use getImm() directly.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87905
The file was addedllvm/test/CodeGen/AArch64/ldst-opt-non-imm-offset.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp (diff)
Commit e6d50b4f22dc6bbf0b0b40cfdab172bf5c1694e1 by Yaxun.Liu
recommit [HIP] Fix -gsplit-dwarf option

recommit e50465ecefc964e5700df26fc7e02a673eed085a with fix for
regression in lldb tests.

Two issues:

1. the directory part of original .dwo file was dropped
2. if the stem of the .dwo file contains '.', the last dot
and strings after that were removed

This recommit fixes those two issues.
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.h (diff)
The file was addedclang/test/Driver/hip-gsplit-dwarf-options.hip
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp (diff)
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp (diff)
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp (diff)
The file was modifiedclang/lib/Driver/ToolChains/MinGW.cpp (diff)
Commit 9abd1e8f4e5ddd6e5e592306432fb32dd68f4c14 by davelee.com
[lldb] Remove lldb-perf remenant

Delete a file remaining from the deletion of lldb-perf in D64362.

Differential Revision: https://reviews.llvm.org/D88119
The file was removedlldb/tools/lldb-perf/darwin/sketch/foobar.sketch2
Commit c538169ee99516c178ecc00a5ec5187d78941fac by zinenko
[mlir] Add insert before/after to list-like constructs in C API

Blocks in a region and operations in a block are organized in a linked list.
The C API only provides functions to append or to insert elements at the
specified numeric position in the list. The latter is expensive since it
requires to traverse the list. Add insert before/after functionality with low
cost that relies on the iplist elements being convertible to iterators.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D88148
The file was modifiedmlir/test/CAPI/ir.c (diff)
The file was modifiedmlir/include/mlir-c/IR.h (diff)
The file was modifiedmlir/lib/CAPI/IR/IR.cpp (diff)