Skip to content
Commit 0fa20eca authored by Nicolas Vasilache's avatar Nicolas Vasilache
Browse files

[mlir][Affine] Add helper functions to allow reordering affine.apply operands...

[mlir][Affine] Add helper functions to allow reordering affine.apply operands and decompose the ops into smaller components

Care is taken to order operands from least hoistable to most hoistable and to process subexpressions in the same
order.

This allows exposing more oppportunities for licm, cse and strength reduction.

Such a step should typically be applied while we still have loops in the IR and just before lowering affine ops to arith.
This is because the affine.apply canonicalization currently tries to maximally compose chains of affine.apply operations
and could undo the effects of these decompositions.

Depends on: D145784

Differential Revision: https://reviews.llvm.org/D145685
parent 5b86eaeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment