[Mlir-commits] [mlir] [IntegerRangeAnalysis] remove constraint on integer-typed results (PR #72007)

Maksim Levental llvmlistbot at llvm.org
Mon Nov 13 19:51:40 PST 2023


makslevental wrote:

Yea so I think this is a good thing. I've wondered before why this analysis was restricted to basically arith and index ops when it seems like it could be naturally extended to e.g., shape inference for tensor/memref types, _where the results aren't integer values but still implie/map to an integer lattice_. Now I'm not proposing crossing that rubicon here (which would take rearchitecting `IntegerValueRangeLattice`), I'm just this patch is necessary for that kind of extension too.

Regarding assumptions by downstream passes such as `IntRangeOptimizationsPass` on invariants checked by this analysis, I don't see how that could happen. As you say, those passes needed to check on their own for invariants/preconditions, rather than rely on an incidental check having been performed by `IntegerRangeAnalysis`.

https://github.com/llvm/llvm-project/pull/72007


More information about the Mlir-commits mailing list