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

insert is soft deprecated, replace with add (NFC) #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
76 changes: 38 additions & 38 deletions canonicalization_patterns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,98 +399,98 @@ class NormalizeSequenceNumbers : public mlir::OpRewritePattern<SairProgramOp> {

} // end namespace

void SairCopyOp::getCanonicalizationPatterns(mlir::RewritePatternSet &patterns,
void SairCopyOp::getCanonicalizationPatterns(mlir::RewritePatternSet &results,
mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
results.add<SimplifySairOperands>(context);
}

void SairExitOp::getCanonicalizationPatterns(mlir::RewritePatternSet &patterns,
void SairExitOp::getCanonicalizationPatterns(mlir::RewritePatternSet &results,
mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
results.add<SimplifySairOperands>(context);
}

void SairFromMemRefOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairLoadFromMemRefOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.insert<SimplifySairOperands>(context);
results.add<SimplifySairOperands>(context);
}

void SairFbyOp::getCanonicalizationPatterns(mlir::RewritePatternSet &patterns,
void SairFbyOp::getCanonicalizationPatterns(mlir::RewritePatternSet &results,
mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
patterns.insert<RemoveCyclicFby, RemoveUnreferencedDims<SairFbyOp>>(context);
results.add<SimplifySairOperands>(context);
results.add<RemoveCyclicFby, RemoveUnreferencedDims<SairFbyOp>>(context);
}

void SairFromScalarOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairMapReduceOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairProjAnyOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
patterns.insert<RemoveUnreferencedDims<SairProjAnyOp>>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
results.add<RemoveUnreferencedDims<SairProjAnyOp>>(context);
}

void SairProjLastOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
patterns.insert<RemoveUnreferencedDims<SairProjLastOp>>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
results.add<RemoveUnreferencedDims<SairProjLastOp>>(context);
}

void SairDynRangeOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairPlaceholderOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairStaticRangeOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairToMemRefOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<SimplifySairOperands>(context);
}

void SairStoreToMemRefOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.insert<SimplifySairOperands>(context);
results.add<SimplifySairOperands>(context);
}

void SairMapOp::getCanonicalizationPatterns(mlir::RewritePatternSet &patterns,
void SairMapOp::getCanonicalizationPatterns(mlir::RewritePatternSet &results,
mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
patterns.insert(DeduplicateMapInputsOutputs);
results.add<SimplifySairOperands>(context);
results.add(DeduplicateMapInputsOutputs);
}

void SairAllocOp::getCanonicalizationPatterns(mlir::RewritePatternSet &patterns,
void SairAllocOp::getCanonicalizationPatterns(mlir::RewritePatternSet &results,
mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
results.add<SimplifySairOperands>(context);
}

void SairFreeOp::getCanonicalizationPatterns(mlir::RewritePatternSet &patterns,
void SairFreeOp::getCanonicalizationPatterns(mlir::RewritePatternSet &results,
mlir::MLIRContext *context) {
patterns.insert<SimplifySairOperands>(context);
results.add<SimplifySairOperands>(context);
}

void SairProgramOp::getCanonicalizationPatterns(
mlir::RewritePatternSet &patterns, mlir::MLIRContext *context) {
patterns.insert<NormalizeSequenceNumbers>(context);
mlir::RewritePatternSet &results, mlir::MLIRContext *context) {
results.add<NormalizeSequenceNumbers>(context);
}

} // namespace sair
2 changes: 1 addition & 1 deletion transforms/lowering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class LowerToLLVMPass : public LowerToLLVMBase<LowerToLLVMPass> {
populateMemRefToLLVMConversionPatterns(converter, patterns);
populateStdToLLVMConversionPatterns(converter, patterns);
arith::populateArithmeticToLLVMConversionPatterns(converter, patterns);
patterns.insert<LowerUndef>(converter);
patterns.add<LowerUndef>(converter);

LLVMConversionTarget target(getContext());
target.addLegalOp<mlir::ModuleOp>();
Expand Down