From 2be8af8f0e0780901213b6fd3013a5268ddc3359 Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Tue, 30 Aug 2022 21:56:31 +0200 Subject: [MLIR] Update pass declarations to new autogenerated files The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure. Reviewed By: mehdi_amini, rriddle Differential Review: https://reviews.llvm.org/D132838 --- mlir/lib/Transforms/ControlFlowSink.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'mlir/lib/Transforms/ControlFlowSink.cpp') diff --git a/mlir/lib/Transforms/ControlFlowSink.cpp b/mlir/lib/Transforms/ControlFlowSink.cpp index 5b0cfc2..960a035 100644 --- a/mlir/lib/Transforms/ControlFlowSink.cpp +++ b/mlir/lib/Transforms/ControlFlowSink.cpp @@ -13,24 +13,32 @@ // //===----------------------------------------------------------------------===// -#include "PassDetail.h" +#include "mlir/Transforms/Passes.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 ControlFlowSink : public ControlFlowSinkBase { +struct ControlFlowSinkPass + : public impl::ControlFlowSinkPassBase { + using ControlFlowSinkPassBase::ControlFlowSinkPassBase; + void runOnOperation() override; }; } // end anonymous namespace -void ControlFlowSink::runOnOperation() { +void ControlFlowSinkPass::runOnOperation() { auto &domInfo = getAnalysis(); getOperation()->walk([&](RegionBranchOpInterface branch) { SmallVector regionsToSink; @@ -48,7 +56,3 @@ void ControlFlowSink::runOnOperation() { }); }); } - -std::unique_ptr mlir::createControlFlowSinkPass() { - return std::make_unique(); -} -- cgit v1.1