[Mlir-commits] [mlir] [mlir][Arith] Generalize and improve -int-range-optimizations (PR #94712)
Krzysztof Drewniak
llvmlistbot at llvm.org
Fri Jun 7 08:38:36 PDT 2024
================
@@ -185,25 +176,11 @@ struct IntRangeOptimizationsPass
if (failed(solver.initializeAndRun(op)))
return signalPassFailure();
- DataFlowListener listener(solver);
-
- RewritePatternSet patterns(ctx);
- populateIntRangeOptimizationsPatterns(patterns, solver);
-
- GreedyRewriteConfig config;
- config.listener = &listener;
-
- if (failed(applyPatternsAndFoldGreedily(op, std::move(patterns), config)))
- signalPassFailure();
+ doRewrites(solver, ctx, op->getRegions());
}
};
} // namespace
-void mlir::arith::populateIntRangeOptimizationsPatterns(
----------------
krzysz00 wrote:
If you'd like these various optimizations structured as patterns and think it's safe to do so, I can do that.
(and I'm realizing the block argument constant replacements can be don from the parent op)
https://github.com/llvm/llvm-project/pull/94712
More information about the Mlir-commits
mailing list