Skip to content

Commit

Permalink
Enable arithmetic optimizations as part of the stream simplification …
Browse files Browse the repository at this point in the history
…pipeline.

I ran this on some relatively large models and couldn't really discern a performance difference at the whole model level.

Signed-off-by: Stella Laurenzo <stellaraccident@gmail.com>
  • Loading branch information
stellaraccident committed Oct 17, 2024
1 parent 929a7da commit 7da0955
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ static void addCleanupPatterns(OpPassManager &passManager) {
.addPass(mlir::createCanonicalizerPass)
.addPass(mlir::createCSEPass)

// Integer optimizations. These operate best on a canonical form both
// for performance (post-simplifications cause less analysis) and
// simplified pattern matching.
.addPass(IREE::Util::createOptimizeIntArithmeticPass)

// Simplify util.global accesses; this can help with data flow tracking as
// redundant store-loads are removed.
.addPass(IREE::Util::createSimplifyGlobalAccessesPass);
Expand Down

0 comments on commit 7da0955

Please sign in to comment.