Skip to content

Commit

Permalink
Add empty lower add pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Sep 22, 2023
1 parent 211d94a commit e6893cf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/Conversion/PolyToStandard/PolyToStandard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ class PolyToStandardTypeConverter : public TypeConverter {
}
};

struct ConvertAdd : public OpConversionPattern<AddOp> {
ConvertAdd(mlir::MLIRContext *context)
: OpConversionPattern<AddOp>(context) {}

using OpConversionPattern::OpConversionPattern;

LogicalResult
matchAndRewrite(AddOp op, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
// TODO: implement
return success();
}
};

struct PolyToStandard : impl::PolyToStandardBase<PolyToStandard> {
using PolyToStandardBase::PolyToStandardBase;

Expand All @@ -43,6 +57,8 @@ struct PolyToStandard : impl::PolyToStandardBase<PolyToStandard> {
target.addIllegalDialect<PolyDialect>();

RewritePatternSet patterns(context);
PolyToStandardTypeConverter typeConverter(context);
patterns.add<ConvertAdd>(typeConverter, context);

if (failed(applyPartialConversion(module, target, std::move(patterns)))) {
signalPassFailure();
Expand Down

0 comments on commit e6893cf

Please sign in to comment.