LLVM 17.0.0git
|
State for an integer range. More...
#include "llvm/Transforms/IPO/Attributor.h"
Public Member Functions | |
IntegerRangeState (uint32_t BitWidth) | |
IntegerRangeState (const ConstantRange &CR) | |
uint32_t | getBitWidth () const |
Return associated values' bit width. | |
bool | isValidState () const override |
See AbstractState::isValidState() | |
bool | isAtFixpoint () const override |
See AbstractState::isAtFixpoint() | |
ChangeStatus | indicateOptimisticFixpoint () override |
See AbstractState::indicateOptimisticFixpoint(...) | |
ChangeStatus | indicatePessimisticFixpoint () override |
See AbstractState::indicatePessimisticFixpoint(...) | |
ConstantRange | getKnown () const |
Return the known state encoding. | |
ConstantRange | getAssumed () const |
Return the assumed state encoding. | |
void | unionAssumed (const ConstantRange &R) |
Unite assumed range with the passed state. | |
void | unionAssumed (const IntegerRangeState &R) |
See IntegerRangeState::unionAssumed(..). | |
void | intersectKnown (const ConstantRange &R) |
Intersect known range with the passed state. | |
void | intersectKnown (const IntegerRangeState &R) |
See IntegerRangeState::intersectKnown(..). | |
bool | operator== (const IntegerRangeState &R) const |
Equality for IntegerRangeState. | |
IntegerRangeState | operator^= (const IntegerRangeState &R) |
"Clamp" this state with R . | |
IntegerRangeState | operator&= (const IntegerRangeState &R) |
![]() | |
virtual | ~AbstractState ()=default |
virtual bool | isValidState () const =0 |
Return if this abstract state is in a valid state. | |
virtual bool | isAtFixpoint () const =0 |
Return if this abstract state is fixed, thus does not need to be updated if information changes as it cannot change itself. | |
virtual ChangeStatus | indicateOptimisticFixpoint ()=0 |
Indicate that the abstract state should converge to the optimistic state. | |
virtual ChangeStatus | indicatePessimisticFixpoint ()=0 |
Indicate that the abstract state should converge to the pessimistic state. | |
Static Public Member Functions | |
static ConstantRange | getWorstState (uint32_t BitWidth) |
Return the worst possible representable state. | |
static ConstantRange | getBestState (uint32_t BitWidth) |
Return the best possible representable state. | |
static ConstantRange | getBestState (const IntegerRangeState &IRS) |
Public Attributes | |
uint32_t | BitWidth |
Bitwidth of the associated value. | |
ConstantRange | Assumed |
State representing assumed range, initially set to empty. | |
ConstantRange | Known |
State representing known range, initially set to [-inf, inf]. | |
State for an integer range.
Definition at line 2754 of file Attributor.h.
|
inline |
Definition at line 2765 of file Attributor.h.
|
inline |
Definition at line 2769 of file Attributor.h.
|
inline |
Return the assumed state encoding.
Definition at line 2813 of file Attributor.h.
References Assumed.
Referenced by llvm::operator<<(), operator==(), and stripAndAccumulateOffsets().
|
inlinestatic |
Definition at line 2782 of file Attributor.h.
References getBestState(), and getBitWidth().
|
inlinestatic |
Return the best possible representable state.
Definition at line 2779 of file Attributor.h.
References BitWidth.
Referenced by getBestState().
|
inline |
Return associated values' bit width.
Definition at line 2787 of file Attributor.h.
References BitWidth.
Referenced by getBestState(), and llvm::operator<<().
|
inline |
Return the known state encoding.
Definition at line 2810 of file Attributor.h.
References Known.
Referenced by llvm::operator<<(), operator==(), and stripAndAccumulateOffsets().
|
inlinestatic |
Return the worst possible representable state.
Definition at line 2774 of file Attributor.h.
References BitWidth.
|
inlineoverridevirtual |
See AbstractState::indicateOptimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 2798 of file Attributor.h.
References Assumed, llvm::CHANGED, and Known.
|
inlineoverridevirtual |
See AbstractState::indicatePessimisticFixpoint(...)
Implements llvm::AbstractState.
Definition at line 2804 of file Attributor.h.
References Assumed, llvm::CHANGED, and Known.
|
inline |
Intersect known range with the passed state.
Definition at line 2827 of file Attributor.h.
References Assumed, llvm::ConstantRange::intersectWith(), and Known.
Referenced by intersectKnown().
|
inline |
See IntegerRangeState::intersectKnown(..).
Definition at line 2833 of file Attributor.h.
References intersectKnown().
|
inlineoverridevirtual |
See AbstractState::isAtFixpoint()
Implements llvm::AbstractState.
Definition at line 2795 of file Attributor.h.
|
inlineoverridevirtual |
See AbstractState::isValidState()
Implements llvm::AbstractState.
Definition at line 2790 of file Attributor.h.
References Assumed, BitWidth, and llvm::ConstantRange::isFullSet().
|
inline |
Definition at line 2852 of file Attributor.h.
References Assumed, Known, and llvm::ConstantRange::unionWith().
|
inline |
Equality for IntegerRangeState.
Definition at line 2838 of file Attributor.h.
References getAssumed(), and getKnown().
|
inline |
"Clamp" this state with R
.
The result is subtype dependent but it is intended that only information assumed in both states will be assumed in this one afterwards.
Definition at line 2845 of file Attributor.h.
References unionAssumed().
|
inline |
Unite assumed range with the passed state.
Definition at line 2816 of file Attributor.h.
References Assumed, llvm::ConstantRange::intersectWith(), Known, and llvm::ConstantRange::unionWith().
Referenced by operator^=(), and unionAssumed().
|
inline |
See IntegerRangeState::unionAssumed(..).
Definition at line 2822 of file Attributor.h.
References unionAssumed().
ConstantRange llvm::IntegerRangeState::Assumed |
State representing assumed range, initially set to empty.
Definition at line 2760 of file Attributor.h.
Referenced by getAssumed(), indicateOptimisticFixpoint(), indicatePessimisticFixpoint(), intersectKnown(), isAtFixpoint(), isValidState(), operator&=(), and unionAssumed().
uint32_t llvm::IntegerRangeState::BitWidth |
Bitwidth of the associated value.
Definition at line 2757 of file Attributor.h.
Referenced by getBestState(), getBitWidth(), getWorstState(), and isValidState().
ConstantRange llvm::IntegerRangeState::Known |
State representing known range, initially set to [-inf, inf].
Definition at line 2763 of file Attributor.h.
Referenced by getKnown(), indicateOptimisticFixpoint(), indicatePessimisticFixpoint(), intersectKnown(), isAtFixpoint(), operator&=(), and unionAssumed().