|
MLIR 22.0.0git
|
This lattice value represents the integer range of an SSA value. More...
#include "mlir/Interfaces/InferIntRangeInterface.h"
Public Member Functions | |
| IntegerValueRange (ConstantIntRanges value) | |
| Create an integer value range lattice value. | |
| IntegerValueRange (std::optional< ConstantIntRanges > value=std::nullopt) | |
| Create an integer value range lattice value. | |
| bool | isUninitialized () const |
| Whether the range is uninitialized. | |
| const ConstantIntRanges & | getValue () const |
| Get the known integer value range. | |
| bool | operator== (const IntegerValueRange &rhs) const |
| Compare two ranges. | |
| void | print (raw_ostream &os) const |
| Print the integer value range. | |
Static Public Member Functions | |
| static IntegerValueRange | getMaxRange (Value value) |
| Create a maximal range ([0, uint_max(t)] / [int_min(t), int_max(t)]) range that is used to mark the value as unable to be analyzed further, where t is the type of value. | |
| static IntegerValueRange | join (const IntegerValueRange &lhs, const IntegerValueRange &rhs) |
| Compute the least upper bound of two ranges. | |
This lattice value represents the integer range of an SSA value.
Definition at line 109 of file InferIntRangeInterface.h.
|
inline |
Create an integer value range lattice value.
Definition at line 117 of file InferIntRangeInterface.h.
Referenced by getMaxRange(), join(), and operator==().
|
inlineexplicit |
Create an integer value range lattice value.
Definition at line 120 of file InferIntRangeInterface.h.
|
static |
Create a maximal range ([0, uint_max(t)] / [int_min(t), int_max(t)]) range that is used to mark the value as unable to be analyzed further, where t is the type of value.
Definition at line 135 of file InferIntRangeInterface.cpp.
References mlir::ConstantIntRanges::getStorageBitwidth(), and IntegerValueRange().
Referenced by mlir::detail::infer_int_range_op_binder::match(), mlir::dataflow::IntegerRangeAnalysis::setToEntryState(), mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments(), and mlir::dataflow::IntegerRangeAnalysis::visitOperation().
|
inline |
Get the known integer value range.
Definition at line 129 of file InferIntRangeInterface.h.
References isUninitialized().
Referenced by mlir::intrange::inferShapedDimOpInterface(), mlir::detail::constant_int_range_predicate_matcher::match(), mlir::dataflow::IntegerValueRangeLattice::onUpdate(), and mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments().
|
inline |
Whether the range is uninitialized.
This happens when the state hasn't been set during the analysis.
Definition at line 126 of file InferIntRangeInterface.h.
Referenced by getValue(), mlir::intrange::inferShapedDimOpInterface(), mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments(), and mlir::dataflow::IntegerRangeAnalysis::visitOperation().
|
inlinestatic |
Compute the least upper bound of two ranges.
Definition at line 140 of file InferIntRangeInterface.h.
References IntegerValueRange(), lhs, and rhs.
|
inline |
Compare two ranges.
Definition at line 135 of file InferIntRangeInterface.h.
References IntegerValueRange(), and rhs.
|
inline |
Print the integer value range.
Definition at line 150 of file InferIntRangeInterface.h.
Referenced by mlir::operator<<().