[all-commits] [llvm/llvm-project] b73f1d: [mlir][cf-sink] Accept a callback for sinking oper...
Jeff Niu via All-commits
all-commits at lists.llvm.org
Mon Mar 28 12:31:36 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b73f1d2c5d92a923c79435e423d7db9d6fa64eac
https://github.com/llvm/llvm-project/commit/b73f1d2c5d92a923c79435e423d7db9d6fa64eac
Author: Mogball <jeffniu22 at gmail.com>
Date: 2022-03-28 (Mon, 28 Mar 2022)
Changed paths:
M mlir/include/mlir/Transforms/ControlFlowSinkUtils.h
M mlir/lib/Transforms/ControlFlowSink.cpp
M mlir/lib/Transforms/Utils/ControlFlowSinkUtils.cpp
A mlir/test/Transforms/control-flow-sink-test.mlir
M mlir/test/Transforms/control-flow-sink.mlir
M mlir/test/lib/Transforms/CMakeLists.txt
A mlir/test/lib/Transforms/TestControlFlowSink.cpp
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
[mlir][cf-sink] Accept a callback for sinking operations
(This was a TODO from the initial patch).
The control-flow sink utility accepts a callback that is used to sink an operation into a region.
The `moveIntoRegion` is called on the same operation and region that return true for `shouldMoveIntoRegion`.
The callback must preserve the dominance of the operation within the region. In the default control-flow
sink implementation, this is moving the operation to the start of the entry block.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D122445
More information about the All-commits
mailing list