Files
clang-p2996/mlir/lib/Transforms/CMakeLists.txt
Mogball c8457eb532 [mlir][transforms] Add a topological sort utility and pass
This patch adds a topological sort utility and pass. A topological sort reorders
the operations in a block without SSA dominance such that, as much as possible,
users of values come after their producers.

The utility function sorts topologically the operation range in a given block
with an optional user-provided callback that can be used to virtually break cycles.
The toposort pass itself recursively sorts graph regions under the target op.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D125063
2022-05-16 20:47:30 +00:00

32 lines
538 B
CMake

add_subdirectory(Utils)
add_mlir_library(MLIRTransforms
Canonicalizer.cpp
ControlFlowSink.cpp
CSE.cpp
Inliner.cpp
LocationSnapshot.cpp
LoopInvariantCodeMotion.cpp
OpStats.cpp
SCCP.cpp
StripDebugInfo.cpp
SymbolDCE.cpp
SymbolPrivatize.cpp
TopologicalSort.cpp
ViewOpGraph.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
DEPENDS
MLIRTransformsPassIncGen
LINK_LIBS PUBLIC
MLIRAnalysis
MLIRCopyOpInterface
MLIRLoopLikeInterface
MLIRPass
MLIRSupport
MLIRTransformUtils
)