aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineDebugify.cpp
diff options
context:
space:
mode:
authorThéo Degioanni <theo.degioanni@nextsilicon.com>2023-04-27 06:00:39 +0000
committerTobias Gysi <tobias.gysi@nextsilicon.com>2023-04-27 06:00:48 +0000
commitf88f8fd0bca34dc8e5571cb828b1a159a50fd504 (patch)
treeffa24b2b6200845f4e641da7cac0689a28d3d2d4 /llvm/lib/CodeGen/MachineDebugify.cpp
parentc00b7c84c7cb1d528464bf68305fd23a9755768c (diff)
downloadllvm-f88f8fd0bca34dc8e5571cb828b1a159a50fd504.zip
llvm-f88f8fd0bca34dc8e5571cb828b1a159a50fd504.tar.gz
llvm-f88f8fd0bca34dc8e5571cb828b1a159a50fd504.tar.bz2
[mlir] Add a generic mem2reg implementation.
This patch introduces a generic implementation of mem2reg on unstructured control-flow, along with a specialization for LLVM IR. This is achieved by defining three new interfaces, representing 1. allocating operations, 2. operations doing memory accesses, 3. operations that can be rewired and/or deleted to stop using a specific use. The file containing the core implementation of the algorithm (`Mem2Reg.cpp`) contains a detailed explanation of how the algorithm works. The contract for this pass is that given a memory slot with a single non-aliased pointer, the pass will either remove all the uses of the pointer or not change anything. To help review this patch, I recommend starting by looking at the interfaces defined in `Mem2Reg.td`, along with their reference implementation for LLVM IR defined in `LLVMMem2Reg.cpp`. Then, the core algorithm is implemented in `Mem2Reg.cpp`. If this is all good I also have an implementation of the interfaces for 0-dimensional memref promotion that I can upstream afterwards. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D148109
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugify.cpp')
0 files changed, 0 insertions, 0 deletions