Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion clang/lib/CIR/Dialect/Transforms/CIRCanonicalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
using namespace mlir;
using namespace cir;

namespace mlir {
#define GEN_PASS_DEF_CIRCANONICALIZE
#include "clang/CIR/Dialect/Passes.h.inc"
} // namespace mlir

namespace {

/// Removes branches between two blocks if it is the only branch.
Expand Down Expand Up @@ -101,7 +106,8 @@ struct RemoveEmptySwitch : public OpRewritePattern<SwitchOp> {
// CIRCanonicalizePass
//===----------------------------------------------------------------------===//

struct CIRCanonicalizePass : public CIRCanonicalizeBase<CIRCanonicalizePass> {
struct CIRCanonicalizePass
: public impl::CIRCanonicalizeBase<CIRCanonicalizePass> {
using CIRCanonicalizeBase::CIRCanonicalizeBase;

// The same operation rewriting done here could have been performed
Expand Down
7 changes: 6 additions & 1 deletion clang/lib/CIR/Dialect/Transforms/CIRSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
using namespace mlir;
using namespace cir;

namespace mlir {
#define GEN_PASS_DEF_CIRSIMPLIFY
#include "clang/CIR/Dialect/Passes.h.inc"
} // namespace mlir

//===----------------------------------------------------------------------===//
// Rewrite patterns
//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -283,7 +288,7 @@ struct SimplifyVecSplat : public OpRewritePattern<VecSplatOp> {
// CIRSimplifyPass
//===----------------------------------------------------------------------===//

struct CIRSimplifyPass : public CIRSimplifyBase<CIRSimplifyPass> {
struct CIRSimplifyPass : public impl::CIRSimplifyBase<CIRSimplifyPass> {
using CIRSimplifyBase::CIRSimplifyBase;

void runOnOperation() override;
Expand Down
7 changes: 6 additions & 1 deletion clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
using namespace mlir;
using namespace cir;

namespace mlir {
#define GEN_PASS_DEF_CIRFLATTENCFG
#include "clang/CIR/Dialect/Passes.h.inc"
} // namespace mlir

namespace {

/// Lowers operations with the terminator trait that have a single successor.
Expand All @@ -50,7 +55,7 @@ void walkRegionSkipping(
});
}

struct CIRFlattenCFGPass : public CIRFlattenCFGBase<CIRFlattenCFGPass> {
struct CIRFlattenCFGPass : public impl::CIRFlattenCFGBase<CIRFlattenCFGPass> {

CIRFlattenCFGPass() = default;
void runOnOperation() override;
Expand Down
7 changes: 6 additions & 1 deletion clang/lib/CIR/Dialect/Transforms/GotoSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
using namespace mlir;
using namespace cir;

namespace mlir {
#define GEN_PASS_DEF_GOTOSOLVER
#include "clang/CIR/Dialect/Passes.h.inc"
} // namespace mlir

namespace {

struct GotoSolverPass : public GotoSolverBase<GotoSolverPass> {
struct GotoSolverPass : public impl::GotoSolverBase<GotoSolverPass> {
GotoSolverPass() = default;
void runOnOperation() override;
};
Expand Down
7 changes: 6 additions & 1 deletion clang/lib/CIR/Dialect/Transforms/HoistAllocas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
using namespace mlir;
using namespace cir;

namespace mlir {
#define GEN_PASS_DEF_HOISTALLOCAS
#include "clang/CIR/Dialect/Passes.h.inc"
} // namespace mlir

namespace {

struct HoistAllocasPass : public HoistAllocasBase<HoistAllocasPass> {
struct HoistAllocasPass : public impl::HoistAllocasBase<HoistAllocasPass> {

HoistAllocasPass() = default;
void runOnOperation() override;
Expand Down
8 changes: 7 additions & 1 deletion clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
using namespace mlir;
using namespace cir;

namespace mlir {
#define GEN_PASS_DEF_LOWERINGPREPARE
#include "clang/CIR/Dialect/Passes.h.inc"
} // namespace mlir

static SmallString<128> getTransformedFileName(mlir::ModuleOp mlirModule) {
SmallString<128> fileName;

Expand Down Expand Up @@ -53,7 +58,8 @@ static cir::FuncOp getCalledFunction(cir::CallOp callOp) {
}

namespace {
struct LoweringPreparePass : public LoweringPrepareBase<LoweringPreparePass> {
struct LoweringPreparePass
: public impl::LoweringPrepareBase<LoweringPreparePass> {
LoweringPreparePass() = default;
void runOnOperation() override;

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CIR/Dialect/Transforms/PassDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace mlir {
template <typename ConcreteDialect>
void registerDialect(DialectRegistry &registry);

#define GEN_PASS_CLASSES
#define GEN_PASS_DECL
#include "clang/CIR/Dialect/Passes.h.inc"

} // namespace mlir
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/CodeGen/PassDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace fir {

#define GEN_PASS_CLASSES
#define GEN_PASS_DECL
#include "flang/Optimizer/CodeGen/CGPasses.h.inc"

} // namespace fir
Expand Down
Loading