[mlir][Arith] Implement InferIntRangeInterface for arithmetic opsDepends on D124023Reviewed By: Mogball, rriddleDifferential Revision: https://reviews.llvm.org/D124022
[mlir] Fix handling of some region branch terminator successorsWhen `RegionBranchOpInterface::getSuccessorRegions` is called for anything other than the parent op, it expects the operands of the te
[mlir] Fix handling of some region branch terminator successorsWhen `RegionBranchOpInterface::getSuccessorRegions` is called for anything other than the parent op, it expects the operands of the terminator of the source region to be passed, not the operands of the parent op. This was not always respected.This fixes a bug in integer range inference and ForwardDataFlowSolver and changes `scf.while` to allow narrowing of successors using constant inputs.Fixes #55873Reviewed By: mehdi_amini, krzysz00Differential Revision: https://reviews.llvm.org/D127261
show more ...
Re-land "[mlir] Add integer range inference analysis""This reverts commit 4e5ce2056e3e85f109a074e80bdd23a10ca2bed9.This relands commit 1350c9887dca5ba80af8e3c1e61b29d6696eb240.Reinstates the ra
Re-land "[mlir] Add integer range inference analysis""This reverts commit 4e5ce2056e3e85f109a074e80bdd23a10ca2bed9.This relands commit 1350c9887dca5ba80af8e3c1e61b29d6696eb240.Reinstates the range analysis with the build issue fixed.Differential Revision: https://reviews.llvm.org/D126926
Revert "[mlir] Add integer range inference analysis"This reverts commit 1350c9887dca5ba80af8e3c1e61b29d6696eb240.Shared library build is broken with undefined references.
[mlir] Add integer range inference analysisThis commit defines a dataflow analysis for integer ranges, whichuses a newly-added InferIntRangeInterface to compute the lower andupper bounds on the r
[mlir] Add integer range inference analysisThis commit defines a dataflow analysis for integer ranges, whichuses a newly-added InferIntRangeInterface to compute the lower andupper bounds on the results of an operation from the bounds on thearguments. The range inference is a flow-insensitive dataflow analysisthat can be used to simplify code, such as by statically identifyingbounds checks that cannot fail in order to eliminate them.The InferIntRangeInterface has one method, inferResultRanges(), whichtakes a vector of inferred ranges for each argument to an opimplementing the interface and a callback allowing the implementationto define the ranges for each result. These ranges are stored asConstantIntRanges, which hold the lower and upper bounds for avalue. Bounds are tracked separately for the signed and unsignedinterpretations of a value, which ensures that the impact ofarithmetic overflows is correctly tracked during the analysis.The commit also adds a -test-int-range-inference pass to test theanalysis until it is integrated into SCCP or otherwise exposed.Finally, this commit fixes some bugs relating to the handling ofregion iteration arguments and terminators in the data flow analysisframework.Depends on D124020Depends on D124021Reviewed By: rriddle, MogballDifferential Revision: https://reviews.llvm.org/D124023