File tree Expand file tree Collapse file tree 8 files changed +40
-8
lines changed
clang/lib/CIR/Dialect/Transforms
flang/lib/Optimizer/CodeGen Expand file tree Collapse file tree 8 files changed +40
-8
lines changed Original file line number Diff line number Diff line change 2626using namespace mlir ;
2727using namespace cir ;
2828
29+ namespace mlir {
30+ #define GEN_PASS_DEF_CIRCANONICALIZE
31+ #include " clang/CIR/Dialect/Passes.h.inc"
32+ } // namespace mlir
33+
2934namespace {
3035
3136// / Removes branches between two blocks if it is the only branch.
@@ -101,7 +106,8 @@ struct RemoveEmptySwitch : public OpRewritePattern<SwitchOp> {
101106// CIRCanonicalizePass
102107// ===----------------------------------------------------------------------===//
103108
104- struct CIRCanonicalizePass : public CIRCanonicalizeBase <CIRCanonicalizePass> {
109+ struct CIRCanonicalizePass
110+ : public impl::CIRCanonicalizeBase<CIRCanonicalizePass> {
105111 using CIRCanonicalizeBase::CIRCanonicalizeBase;
106112
107113 // The same operation rewriting done here could have been performed
Original file line number Diff line number Diff line change 2121using namespace mlir ;
2222using namespace cir ;
2323
24+ namespace mlir {
25+ #define GEN_PASS_DEF_CIRSIMPLIFY
26+ #include " clang/CIR/Dialect/Passes.h.inc"
27+ } // namespace mlir
28+
2429// ===----------------------------------------------------------------------===//
2530// Rewrite patterns
2631// ===----------------------------------------------------------------------===//
@@ -283,7 +288,7 @@ struct SimplifyVecSplat : public OpRewritePattern<VecSplatOp> {
283288// CIRSimplifyPass
284289// ===----------------------------------------------------------------------===//
285290
286- struct CIRSimplifyPass : public CIRSimplifyBase <CIRSimplifyPass> {
291+ struct CIRSimplifyPass : public impl :: CIRSimplifyBase<CIRSimplifyPass> {
287292 using CIRSimplifyBase::CIRSimplifyBase;
288293
289294 void runOnOperation () override ;
Original file line number Diff line number Diff line change 2626using namespace mlir ;
2727using namespace cir ;
2828
29+ namespace mlir {
30+ #define GEN_PASS_DEF_CIRFLATTENCFG
31+ #include " clang/CIR/Dialect/Passes.h.inc"
32+ } // namespace mlir
33+
2934namespace {
3035
3136// / Lowers operations with the terminator trait that have a single successor.
@@ -50,7 +55,7 @@ void walkRegionSkipping(
5055 });
5156}
5257
53- struct CIRFlattenCFGPass : public CIRFlattenCFGBase <CIRFlattenCFGPass> {
58+ struct CIRFlattenCFGPass : public impl :: CIRFlattenCFGBase<CIRFlattenCFGPass> {
5459
5560 CIRFlattenCFGPass () = default ;
5661 void runOnOperation () override ;
Original file line number Diff line number Diff line change 1414using namespace mlir ;
1515using namespace cir ;
1616
17+ namespace mlir {
18+ #define GEN_PASS_DEF_GOTOSOLVER
19+ #include " clang/CIR/Dialect/Passes.h.inc"
20+ } // namespace mlir
21+
1722namespace {
1823
19- struct GotoSolverPass : public GotoSolverBase <GotoSolverPass> {
24+ struct GotoSolverPass : public impl :: GotoSolverBase<GotoSolverPass> {
2025 GotoSolverPass () = default ;
2126 void runOnOperation () override ;
2227};
Original file line number Diff line number Diff line change 2020using namespace mlir ;
2121using namespace cir ;
2222
23+ namespace mlir {
24+ #define GEN_PASS_DEF_HOISTALLOCAS
25+ #include " clang/CIR/Dialect/Passes.h.inc"
26+ } // namespace mlir
27+
2328namespace {
2429
25- struct HoistAllocasPass : public HoistAllocasBase <HoistAllocasPass> {
30+ struct HoistAllocasPass : public impl :: HoistAllocasBase<HoistAllocasPass> {
2631
2732 HoistAllocasPass () = default ;
2833 void runOnOperation () override ;
Original file line number Diff line number Diff line change 2323using namespace mlir ;
2424using namespace cir ;
2525
26+ namespace mlir {
27+ #define GEN_PASS_DEF_LOWERINGPREPARE
28+ #include " clang/CIR/Dialect/Passes.h.inc"
29+ } // namespace mlir
30+
2631static SmallString<128 > getTransformedFileName (mlir::ModuleOp mlirModule) {
2732 SmallString<128 > fileName;
2833
@@ -53,7 +58,8 @@ static cir::FuncOp getCalledFunction(cir::CallOp callOp) {
5358}
5459
5560namespace {
56- struct LoweringPreparePass : public LoweringPrepareBase <LoweringPreparePass> {
61+ struct LoweringPreparePass
62+ : public impl::LoweringPrepareBase<LoweringPreparePass> {
5763 LoweringPreparePass () = default ;
5864 void runOnOperation () override ;
5965
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ namespace mlir {
2121template <typename ConcreteDialect>
2222void registerDialect (DialectRegistry ®istry);
2323
24- #define GEN_PASS_CLASSES
24+ #define GEN_PASS_DECL
2525#include " clang/CIR/Dialect/Passes.h.inc"
2626
2727} // namespace mlir
Original file line number Diff line number Diff line change 1818
1919namespace fir {
2020
21- #define GEN_PASS_CLASSES
21+ #define GEN_PASS_DECL
2222#include " flang/Optimizer/CodeGen/CGPasses.h.inc"
2323
2424} // namespace fir
You can’t perform that action at this time.
0 commit comments