From 039b969b32b64b64123dce30dd28ec4e343d893f Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Tue, 30 Aug 2022 22:20:36 +0200 Subject: Revert "[MLIR] Update pass declarations to new autogenerated files" This reverts commit 2be8af8f0e0780901213b6fd3013a5268ddc3359. --- mlir/lib/Transforms/ControlFlowSink.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'mlir/lib/Transforms/ControlFlowSink.cpp') diff --git a/mlir/lib/Transforms/ControlFlowSink.cpp b/mlir/lib/Transforms/ControlFlowSink.cpp index 960a035..5b0cfc2 100644 --- a/mlir/lib/Transforms/ControlFlowSink.cpp +++ b/mlir/lib/Transforms/ControlFlowSink.cpp @@ -13,32 +13,24 @@ // //===----------------------------------------------------------------------===// -#include "mlir/Transforms/Passes.h" - +#include "PassDetail.h" #include "mlir/IR/Dominance.h" #include "mlir/Interfaces/ControlFlowInterfaces.h" #include "mlir/Interfaces/SideEffectInterfaces.h" #include "mlir/Transforms/ControlFlowSinkUtils.h" +#include "mlir/Transforms/Passes.h" #include "mlir/Transforms/SideEffectUtils.h" -namespace mlir { -#define GEN_PASS_DEF_CONTROLFLOWSINKPASS -#include "mlir/Transforms/Passes.h.inc" -} // namespace mlir - using namespace mlir; namespace { /// A control-flow sink pass. -struct ControlFlowSinkPass - : public impl::ControlFlowSinkPassBase { - using ControlFlowSinkPassBase::ControlFlowSinkPassBase; - +struct ControlFlowSink : public ControlFlowSinkBase { void runOnOperation() override; }; } // end anonymous namespace -void ControlFlowSinkPass::runOnOperation() { +void ControlFlowSink::runOnOperation() { auto &domInfo = getAnalysis(); getOperation()->walk([&](RegionBranchOpInterface branch) { SmallVector regionsToSink; @@ -56,3 +48,7 @@ void ControlFlowSinkPass::runOnOperation() { }); }); } + +std::unique_ptr mlir::createControlFlowSinkPass() { + return std::make_unique(); +} -- cgit v1.1