[mlir][mem2reg] Expose algorithm internals.
authorThéo Degioanni <theo.degioanni@nextsilicon.com>
Mon, 8 May 2023 11:42:40 +0000 (11:42 +0000)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Mon, 8 May 2023 11:48:20 +0000 (11:48 +0000)
commit91cff8a71872cf49f0c5c9e5510f8065bfefa3c3
tree669eb25245518381053239a06e82b531ab8fcd78
parentd717b3d987dfbcecfe8f9a9d570884eac4d6248f
[mlir][mem2reg] Expose algorithm internals.

This patch refactors the Mem2Reg infrastructure. It decouples
analysis from promotion, allowing for more control over the execution of
the logic. It also adjusts the interfaces to be less coupled to mem2reg
and more general. This will be useful for an upcoming revision
introducing generic SROA.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D149825
19 files changed:
mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/include/mlir/Dialect/MemRef/IR/MemRef.h
mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
mlir/include/mlir/Interfaces/CMakeLists.txt
mlir/include/mlir/Interfaces/Mem2RegInterfaces.h [deleted file]
mlir/include/mlir/Interfaces/Mem2RegInterfaces.td [deleted file]
mlir/include/mlir/Interfaces/MemorySlotInterfaces.h [new file with mode: 0644]
mlir/include/mlir/Interfaces/MemorySlotInterfaces.td [new file with mode: 0644]
mlir/include/mlir/Transforms/Mem2Reg.h
mlir/lib/Dialect/LLVMIR/CMakeLists.txt
mlir/lib/Dialect/LLVMIR/IR/LLVMMem2Reg.cpp [deleted file]
mlir/lib/Dialect/LLVMIR/IR/LLVMMemorySlot.cpp [new file with mode: 0644]
mlir/lib/Dialect/MemRef/IR/MemRefMem2Reg.cpp
mlir/lib/Interfaces/CMakeLists.txt
mlir/lib/Interfaces/Mem2RegInterfaces.cpp [deleted file]
mlir/lib/Interfaces/MemorySlotInterfaces.cpp [new file with mode: 0644]
mlir/lib/Transforms/CMakeLists.txt
mlir/lib/Transforms/Mem2Reg.cpp