(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
22 lines
441 B
CMake
22 lines
441 B
CMake
# Exclude tests from libMLIR.so
|
|
add_mlir_library(MLIRTestTransforms
|
|
TestConstantFold.cpp
|
|
TestControlFlowSink.cpp
|
|
TestInlining.cpp
|
|
|
|
EXCLUDE_FROM_LIBMLIR
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRTestDialect
|
|
MLIRTransforms
|
|
)
|
|
|
|
target_include_directories(MLIRTestTransforms
|
|
PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../Dialect/Test
|
|
${CMAKE_CURRENT_BINARY_DIR}/../Dialect/Test
|
|
)
|