MLIR
20.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. More... | |
IntegerValueRange (std::optional< ConstantIntRanges > value=std::nullopt) | |
Create an integer value range lattice value. More... | |
bool | isUninitialized () const |
Whether the range is uninitialized. More... | |
const ConstantIntRanges & | getValue () const |
Get the known integer value range. More... | |
bool | operator== (const IntegerValueRange &rhs) const |
Compare two ranges. More... | |
void | print (raw_ostream &os) const |
Print the integer value range. More... | |
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 . More... | |
static IntegerValueRange | join (const IntegerValueRange &lhs, const IntegerValueRange &rhs) |
Compute the least upper bound of two ranges. More... | |
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.
|
inline |
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 132 of file InferIntRangeInterface.cpp.
References mlir::ConstantIntRanges::getStorageBitwidth(), and mlir::Value::getType().
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 128 of file InferIntRangeInterface.h.
References isUninitialized().
Referenced by join(), 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 125 of file InferIntRangeInterface.h.
Referenced by getValue(), join(), mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments(), and mlir::dataflow::IntegerRangeAnalysis::visitOperation().
|
inlinestatic |
Compute the least upper bound of two ranges.
Definition at line 139 of file InferIntRangeInterface.h.
References getValue(), isUninitialized(), and mlir::ConstantIntRanges::rangeUnion().
|
inline |
Compare two ranges.
Definition at line 134 of file InferIntRangeInterface.h.
|
inline |
Print the integer value range.
Definition at line 149 of file InferIntRangeInterface.h.
Referenced by mlir::operator<<().