For index type of induction variable, the indexing math is better represented using affine ops such as `affine.delinearize_index`. This also further demonstrates that some of these `affine` ops might need to move to a different dialect. For one these ops only support `IndexType` when they should be able to work with any integer type. This change also includes some canonicalization patterns for `affine.delinearize_index` operation to 1) Drop unit `basis` values 2) Remove the `delinearize_index` op when the `linear_index` is a loop induction variable of a normalized loop and the `basis` is of size 1 and is also the upper bound of the normalized loop. --------- Signed-off-by: MaheshRavishankar <mahesh.ravishankar@gmail.com>
1.9 KiB
1.9 KiB