Skip to content

Commit

Permalink
[flang][cuda][NFC] Make pattern names homogenous (#114156)
Browse files Browse the repository at this point in the history
Dialect name is uppercase. Make all the patterns prefix homogenous.
  • Loading branch information
clementval authored Oct 30, 2024
1 parent 9467645 commit 0d94c7b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static mlir::LogicalResult convertOpToCall(OpTy op,
return mlir::success();
}

struct CufAllocateOpConversion
struct CUFAllocateOpConversion
: public mlir::OpRewritePattern<cuf::AllocateOp> {
using OpRewritePattern::OpRewritePattern;

Expand Down Expand Up @@ -216,7 +216,7 @@ struct CufAllocateOpConversion
}
};

struct CufDeallocateOpConversion
struct CUFDeallocateOpConversion
: public mlir::OpRewritePattern<cuf::DeallocateOp> {
using OpRewritePattern::OpRewritePattern;

Expand Down Expand Up @@ -284,10 +284,10 @@ static int computeWidth(mlir::Location loc, mlir::Type type,
return width;
}

struct CufAllocOpConversion : public mlir::OpRewritePattern<cuf::AllocOp> {
struct CUFAllocOpConversion : public mlir::OpRewritePattern<cuf::AllocOp> {
using OpRewritePattern::OpRewritePattern;

CufAllocOpConversion(mlir::MLIRContext *context, mlir::DataLayout *dl,
CUFAllocOpConversion(mlir::MLIRContext *context, mlir::DataLayout *dl,
const fir::LLVMTypeConverter *typeConverter)
: OpRewritePattern(context), dl{dl}, typeConverter{typeConverter} {}

Expand Down Expand Up @@ -380,7 +380,7 @@ struct CufAllocOpConversion : public mlir::OpRewritePattern<cuf::AllocOp> {
const fir::LLVMTypeConverter *typeConverter;
};

struct CufFreeOpConversion : public mlir::OpRewritePattern<cuf::FreeOp> {
struct CUFFreeOpConversion : public mlir::OpRewritePattern<cuf::FreeOp> {
using OpRewritePattern::OpRewritePattern;

mlir::LogicalResult
Expand Down Expand Up @@ -429,11 +429,11 @@ struct CufFreeOpConversion : public mlir::OpRewritePattern<cuf::FreeOp> {
}
};

struct CufDataTransferOpConversion
struct CUFDataTransferOpConversion
: public mlir::OpRewritePattern<cuf::DataTransferOp> {
using OpRewritePattern::OpRewritePattern;

CufDataTransferOpConversion(mlir::MLIRContext *context,
CUFDataTransferOpConversion(mlir::MLIRContext *context,
const mlir::SymbolTable &symtab)
: OpRewritePattern(context), symtab{symtab} {}

Expand Down Expand Up @@ -718,9 +718,9 @@ class CUFOpConversion : public fir::impl::CUFOpConversionBase<CUFOpConversion> {
void cuf::populateCUFToFIRConversionPatterns(
const fir::LLVMTypeConverter &converter, mlir::DataLayout &dl,
const mlir::SymbolTable &symtab, mlir::RewritePatternSet &patterns) {
patterns.insert<CufAllocOpConversion>(patterns.getContext(), &dl, &converter);
patterns.insert<CufAllocateOpConversion, CufDeallocateOpConversion,
CufFreeOpConversion>(patterns.getContext());
patterns.insert<CufDataTransferOpConversion, CUFLaunchOpConversion>(
patterns.insert<CUFAllocOpConversion>(patterns.getContext(), &dl, &converter);
patterns.insert<CUFAllocateOpConversion, CUFDeallocateOpConversion,
CUFFreeOpConversion>(patterns.getContext());
patterns.insert<CUFDataTransferOpConversion, CUFLaunchOpConversion>(
patterns.getContext(), symtab);
}

0 comments on commit 0d94c7b

Please sign in to comment.