[all-commits] [llvm/llvm-project] 81a79e: [mlir] Add function for checking if a block is ins...
Tom Eccles via All-commits
all-commits at lists.llvm.org
Fri Feb 10 08:26:06 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 81a79ee446fe499e217144ae1cd505ede9021712
https://github.com/llvm/llvm-project/commit/81a79ee446fe499e217144ae1cd505ede9021712
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M mlir/include/mlir/Interfaces/LoopLikeInterface.td
M mlir/lib/Interfaces/LoopLikeInterface.cpp
A mlir/test/Interfaces/LoopLikeInterface/test-block-loop.mlir
M mlir/test/lib/Interfaces/CMakeLists.txt
A mlir/test/lib/Interfaces/LoopLikeInterface/CMakeLists.txt
A mlir/test/lib/Interfaces/LoopLikeInterface/TestBlockInLoop.cpp
M mlir/tools/mlir-opt/CMakeLists.txt
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
[mlir] Add function for checking if a block is inside a loop
This function returns whether a block is nested inside of a loop. There
can be three kinds of loop:
1) The block is nested inside of a LoopLikeOpInterface
2) The block is nested inside another block which is in a loop
3) There is a cycle in the control flow graph
This will be useful for Flang's stack arrays pass, which moves array
allocations from the heap to the stack. Special handling is needed when
allocations occur inside of loops to ensure additional stack space is
not allocated on each loop iteration.
Differential Revision: https://reviews.llvm.org/D141401
More information about the All-commits
mailing list