Update examples post OwningRewritePatternList change

This commit is contained in:
Jacques Pienaar 2021-03-21 15:15:34 -07:00
parent 2554b95db5
commit 113baa2b9f
5 changed files with 9 additions and 9 deletions

View File

@ -297,7 +297,7 @@ void ToyToAffineLoweringPass::runOnFunction() {
// Now that the conversion target has been defined, we just need to provide
// the set of patterns that will lower the Toy operations.
OwningRewritePatternList patterns;
OwningRewritePatternList patterns(&getContext());
patterns.insert<AddOpLowering, ConstantOpLowering, MulOpLowering,
ReturnOpLowering, TransposeOpLowering>(&getContext());

View File

@ -296,7 +296,7 @@ void ToyToAffineLoweringPass::runOnFunction() {
// Now that the conversion target has been defined, we just need to provide
// the set of patterns that will lower the Toy operations.
OwningRewritePatternList patterns;
OwningRewritePatternList patterns(&getContext());
patterns.insert<AddOpLowering, ConstantOpLowering, MulOpLowering,
ReturnOpLowering, TransposeOpLowering>(&getContext());

View File

@ -191,9 +191,9 @@ void ToyToLLVMLoweringPass::runOnOperation() {
// lowerings. Transitive lowering, or A->B->C lowering, is when multiple
// patterns must be applied to fully transform an illegal operation into a
// set of legal ones.
OwningRewritePatternList patterns;
populateAffineToStdConversionPatterns(patterns, &getContext());
populateLoopToStdConversionPatterns(patterns, &getContext());
OwningRewritePatternList patterns(&getContext());
populateAffineToStdConversionPatterns(patterns);
populateLoopToStdConversionPatterns(patterns);
populateStdToLLVMConversionPatterns(typeConverter, patterns);
// The only remaining operation to lower from the `toy` dialect, is the

View File

@ -297,7 +297,7 @@ void ToyToAffineLoweringPass::runOnFunction() {
// Now that the conversion target has been defined, we just need to provide
// the set of patterns that will lower the Toy operations.
OwningRewritePatternList patterns;
OwningRewritePatternList patterns(&getContext());
patterns.insert<AddOpLowering, ConstantOpLowering, MulOpLowering,
ReturnOpLowering, TransposeOpLowering>(&getContext());

View File

@ -191,9 +191,9 @@ void ToyToLLVMLoweringPass::runOnOperation() {
// lowerings. Transitive lowering, or A->B->C lowering, is when multiple
// patterns must be applied to fully transform an illegal operation into a
// set of legal ones.
OwningRewritePatternList patterns;
populateAffineToStdConversionPatterns(patterns, &getContext());
populateLoopToStdConversionPatterns(patterns, &getContext());
OwningRewritePatternList patterns(&getContext());
populateAffineToStdConversionPatterns(patterns);
populateLoopToStdConversionPatterns(patterns);
populateStdToLLVMConversionPatterns(typeConverter, patterns);
// The only remaining operation to lower from the `toy` dialect, is the