Make scf.for and affine.for conditionally speculatable
authorSanjoy Das <sanjoy.das@getcruise.com>
Thu, 20 Oct 2022 06:03:14 +0000 (23:03 -0700)
committerSanjoy Das <sanjoy.das@getcruise.com>
Sun, 30 Oct 2022 23:08:42 +0000 (16:08 -0700)
commit788390c1309cbac772f318deff2c09921dadac88
tree88a74bf0337be0fb5fd63b8346647d9e9e4edcce
parent1f16107219165df4c5ba9f4df0aaaf2f973c6316
Make scf.for and affine.for conditionally speculatable

for (I = Start; I < End; I += 1) always terminates so mark
{scf|affine}.for as RecursivelySpeculatable when step is known to be
1.

Reviewed By: chelini

Differential Revision: https://reviews.llvm.org/D136376
mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
mlir/lib/Dialect/SCF/IR/SCF.cpp
mlir/test/Transforms/loop-invariant-code-motion.mlir