|
LLVM 24.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 |
| Return if this abstract state is in a valid state. | |
| bool | isAtFixpoint () const override |
| Return if this abstract state is fixed, thus does not need to be updated if information changes as it cannot change itself. | |
| ChangeStatus | indicateOptimisticFixpoint () override |
| Indicate that the abstract state should converge to the optimistic state. | |
| ChangeStatus | indicatePessimisticFixpoint () override |
| Indicate that the abstract state should converge to the pessimistic state. | |
| 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) |
| Public Member Functions inherited from llvm::AbstractState | |
| virtual | ~AbstractState ()=default |
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 3007 of file Attributor.h.
|
inline |
Definition at line 3018 of file Attributor.h.
References Assumed, BitWidth, and Known.
Referenced by getBestState(), intersectKnown(), operator&=(), operator==(), operator^=(), and unionAssumed().
|
inline |
Definition at line 3022 of file Attributor.h.
References Assumed, BitWidth, getBitWidth(), getWorstState(), and Known.
|
inline |
Return the assumed state encoding.
Definition at line 3062 of file Attributor.h.
References Assumed.
Referenced by llvm::operator<<(), operator==(), and stripAndAccumulateOffsets().
|
inlinestatic |
Definition at line 3035 of file Attributor.h.
References getBestState(), getBitWidth(), and IntegerRangeState().
|
inlinestatic |
Return the best possible representable state.
Definition at line 3032 of file Attributor.h.
References BitWidth.
Referenced by getBestState().
|
inline |
Return associated values' bit width.
Definition at line 3040 of file Attributor.h.
References BitWidth.
Referenced by getBestState(), IntegerRangeState(), and llvm::operator<<().
|
inline |
Return the known state encoding.
Definition at line 3059 of file Attributor.h.
References Known.
Referenced by llvm::operator<<(), operator==(), and stripAndAccumulateOffsets().
|
inlinestatic |
Return the worst possible representable state.
Definition at line 3027 of file Attributor.h.
References BitWidth.
Referenced by IntegerRangeState().
|
inlineoverridevirtual |
Indicate that the abstract state should converge to the optimistic state.
This will usually make the optimistically assumed state the known to be true state.
Implements llvm::AbstractState.
Definition at line 3048 of file Attributor.h.
References Assumed, llvm::CHANGED, and Known.
|
inlineoverridevirtual |
Indicate that the abstract state should converge to the pessimistic state.
This will usually revert the optimistically assumed state to the known to be true state.
Implements llvm::AbstractState.
Definition at line 3053 of file Attributor.h.
References Assumed, llvm::CHANGED, and Known.
|
inline |
Intersect known range with the passed state.
Definition at line 3076 of file Attributor.h.
References Assumed, and Known.
Referenced by intersectKnown().
|
inline |
See IntegerRangeState::intersectKnown(..).
Definition at line 3082 of file Attributor.h.
References IntegerRangeState(), and intersectKnown().
|
inlineoverridevirtual |
Return if this abstract state is fixed, thus does not need to be updated if information changes as it cannot change itself.
Implements llvm::AbstractState.
Reimplemented in llvm::StateWrapper< IntegerRangeState, AbstractAttribute, uint32_t >.
Definition at line 3046 of file Attributor.h.
|
inlineoverridevirtual |
Return if this abstract state is in a valid state.
If false, no information provided should be used.
Implements llvm::AbstractState.
Definition at line 3042 of file Attributor.h.
|
inline |
Definition at line 3101 of file Attributor.h.
References Assumed, IntegerRangeState(), and Known.
|
inline |
Equality for IntegerRangeState.
Definition at line 3087 of file Attributor.h.
References getAssumed(), getKnown(), and IntegerRangeState().
|
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 3094 of file Attributor.h.
References IntegerRangeState(), and unionAssumed().
|
inline |
Unite assumed range with the passed state.
Definition at line 3065 of file Attributor.h.
References Assumed, and Known.
Referenced by operator^=(), and unionAssumed().
|
inline |
See IntegerRangeState::unionAssumed(..).
Definition at line 3071 of file Attributor.h.
References IntegerRangeState(), and unionAssumed().
| ConstantRange llvm::IntegerRangeState::Assumed |
State representing assumed range, initially set to empty.
Definition at line 3013 of file Attributor.h.
Referenced by getAssumed(), indicateOptimisticFixpoint(), indicatePessimisticFixpoint(), IntegerRangeState(), IntegerRangeState(), intersectKnown(), isAtFixpoint(), isValidState(), operator&=(), and unionAssumed().
| uint32_t llvm::IntegerRangeState::BitWidth |
Bitwidth of the associated value.
Definition at line 3010 of file Attributor.h.
Referenced by getBestState(), getBitWidth(), getWorstState(), IntegerRangeState(), IntegerRangeState(), and isValidState().
| ConstantRange llvm::IntegerRangeState::Known |
State representing known range, initially set to [-inf, inf].
Definition at line 3016 of file Attributor.h.
Referenced by getKnown(), indicateOptimisticFixpoint(), indicatePessimisticFixpoint(), IntegerRangeState(), IntegerRangeState(), intersectKnown(), isAtFixpoint(), operator&=(), and unionAssumed().