summaryrefslogtreecommitdiff
path: root/mlir/test/lib/Interfaces/LoopLikeInterface/TestBlockInLoop.cpp
AgeCommit message (Collapse)Author
2023-02-10[mlir] Add function for checking if a block is inside a loopTom Eccles
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
2023-02-09Revert "[mlir] Add function for checking if a block is inside a loop"Kiran Chandramohan
Reverting since the shared library builds are failing. This reverts commit dcee187522c6e2e1a56ffc9b58bfe11c6ac44662.
2023-02-09[mlir] Add function for checking if a block is inside a loopTom Eccles
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