From 9b133224b8a4cb477b045e951c5ac74c8092a19d Mon Sep 17 00:00:00 2001 From: andrej Date: Fri, 6 Sep 2024 11:03:27 -0600 Subject: [PATCH] fix assertion error caused by region simplification --- .../AIEX/Transforms/AIESubstituteShimDMAAllocations.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Dialect/AIEX/Transforms/AIESubstituteShimDMAAllocations.cpp b/lib/Dialect/AIEX/Transforms/AIESubstituteShimDMAAllocations.cpp index 7efe809e36..3db6a926e6 100644 --- a/lib/Dialect/AIEX/Transforms/AIESubstituteShimDMAAllocations.cpp +++ b/lib/Dialect/AIEX/Transforms/AIESubstituteShimDMAAllocations.cpp @@ -67,13 +67,12 @@ struct AIESubstituteShimDMAAllocationsPass // Convert DMAConfigureTaskForOps that reference shim DMA allocations // to regular DMAConfigureTaskOps - ConversionTarget target(getContext()); - target.addLegalDialect(); - target.addIllegalOp(); + GreedyRewriteConfig rewriter_config = GreedyRewriteConfig(); + rewriter_config.enableRegionSimplification = + GreedySimplifyRegionLevel::Disabled; RewritePatternSet patterns(&getContext()); patterns.insert(&getContext()); - GreedyRewriteConfig rewriter_config = GreedyRewriteConfig(); if (failed(applyPatternsAndFoldGreedily(device, std::move(patterns), rewriter_config))) { signalPassFailure();