Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIR][NFC] Canonicalize the names of the lowering classes #392

Merged
merged 1 commit into from
Jan 10, 2024
Merged
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
19 changes: 10 additions & 9 deletions clang/lib/CIR/Lowering/ThroughMLIR/LowerCIRToMLIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct ConvertCIRToMLIRPass
virtual StringRef getArgument() const override { return "cir-to-mlir"; }
};

class CIRCallLowering : public mlir::OpConversionPattern<mlir::cir::CallOp> {
class CIRCallOpLowering : public mlir::OpConversionPattern<mlir::cir::CallOp> {
public:
using OpConversionPattern<mlir::cir::CallOp>::OpConversionPattern;

Expand All @@ -91,7 +91,7 @@ class CIRCallLowering : public mlir::OpConversionPattern<mlir::cir::CallOp> {
}
};

class CIRAllocaLowering
class CIRAllocaOpLowering
: public mlir::OpConversionPattern<mlir::cir::AllocaOp> {
public:
using OpConversionPattern<mlir::cir::AllocaOp>::OpConversionPattern;
Expand All @@ -109,7 +109,7 @@ class CIRAllocaLowering
}
};

class CIRLoadLowering : public mlir::OpConversionPattern<mlir::cir::LoadOp> {
class CIRLoadOpLowering : public mlir::OpConversionPattern<mlir::cir::LoadOp> {
public:
using OpConversionPattern<mlir::cir::LoadOp>::OpConversionPattern;

Expand All @@ -121,7 +121,8 @@ class CIRLoadLowering : public mlir::OpConversionPattern<mlir::cir::LoadOp> {
}
};

class CIRStoreLowering : public mlir::OpConversionPattern<mlir::cir::StoreOp> {
class CIRStoreOpLowering
: public mlir::OpConversionPattern<mlir::cir::StoreOp> {
public:
using OpConversionPattern<mlir::cir::StoreOp>::OpConversionPattern;

Expand All @@ -134,7 +135,7 @@ class CIRStoreLowering : public mlir::OpConversionPattern<mlir::cir::StoreOp> {
}
};

class CIRConstantLowering
class CIRConstantOpLowering
: public mlir::OpConversionPattern<mlir::cir::ConstantOp> {
public:
using OpConversionPattern<mlir::cir::ConstantOp>::OpConversionPattern;
Expand All @@ -158,7 +159,7 @@ class CIRConstantLowering
}
};

class CIRFuncLowering : public mlir::OpConversionPattern<mlir::cir::FuncOp> {
class CIRFuncOpLowering : public mlir::OpConversionPattern<mlir::cir::FuncOp> {
public:
using OpConversionPattern<mlir::cir::FuncOp>::OpConversionPattern;

Expand Down Expand Up @@ -602,9 +603,9 @@ void populateCIRToMLIRConversionPatterns(mlir::RewritePatternSet &patterns,
mlir::TypeConverter &converter) {
patterns.add<CIRReturnLowering, CIRBrOpLowering>(patterns.getContext());

patterns.add<CIRCmpOpLowering, CIRCallLowering, CIRUnaryOpLowering,
CIRBinOpLowering, CIRLoadLowering, CIRConstantLowering,
CIRStoreLowering, CIRAllocaLowering, CIRFuncLowering,
patterns.add<CIRCmpOpLowering, CIRCallOpLowering, CIRUnaryOpLowering,
CIRBinOpLowering, CIRLoadOpLowering, CIRConstantOpLowering,
CIRStoreOpLowering, CIRAllocaOpLowering, CIRFuncOpLowering,
CIRScopeOpLowering, CIRBrCondOpLowering, CIRTernaryOpLowering,
CIRYieldOpLowering>(converter, patterns.getContext());
}
Expand Down