LLVM 20.0.0git
|
Specialization of the integer state for an increasing value, hence ~0u is the best state and 0 the worst. More...
#include "llvm/Transforms/IPO/Attributor.h"
Public Types | |
using | super = IntegerStateBase< base_ty, BestState, WorstState > |
using | base_t = base_ty |
Public Types inherited from llvm::IntegerStateBase< base_ty, BestState, WorstState > | |
using | base_t = base_ty |
Public Member Functions | |
IncIntegerState () | |
IncIntegerState (base_t Assumed) | |
IncIntegerState & | takeAssumedMinimum (base_t Value) |
Take minimum of assumed and Value . | |
IncIntegerState & | takeKnownMaximum (base_t Value) |
Take maximum of known and Value . | |
Public Member Functions inherited from llvm::IntegerStateBase< base_ty, BestState, WorstState > | |
IntegerStateBase ()=default | |
IntegerStateBase (base_t Assumed) | |
bool | isValidState () const override |
See AbstractState::isValidState() NOTE: For now we simply pretend that the worst possible state is invalid. | |
bool | isAtFixpoint () const override |
See AbstractState::isAtFixpoint() | |
ChangeStatus | indicateOptimisticFixpoint () override |
See AbstractState::indicateOptimisticFixpoint(...) | |
ChangeStatus | indicatePessimisticFixpoint () override |
See AbstractState::indicatePessimisticFixpoint(...) | |
base_t | getKnown () const |
Return the known state encoding. | |
base_t | getAssumed () const |
Return the assumed state encoding. | |
bool | operator== (const IntegerStateBase< base_t, BestState, WorstState > &R) const |
Equality for IntegerStateBase. | |
bool | operator!= (const IntegerStateBase< base_t, BestState, WorstState > &R) const |
Inequality for IntegerStateBase. | |
void | operator^= (const IntegerStateBase< base_t, BestState, WorstState > &R) |
"Clamp" this state with R . | |
void | operator+= (const IntegerStateBase< base_t, BestState, WorstState > &R) |
"Clamp" this state with R . | |
void | operator|= (const IntegerStateBase< base_t, BestState, WorstState > &R) |
void | operator&= (const IntegerStateBase< base_t, BestState, WorstState > &R) |
Public Member Functions inherited from llvm::AbstractState | |
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 constexpr base_t | getBestState () |
Return the best possible representable state. | |
static constexpr base_t | getBestState (const IncIntegerState< base_ty, BestState, WorstState > &) |
Static Public Member Functions inherited from llvm::IntegerStateBase< base_ty, BestState, WorstState > | |
static constexpr base_t | getBestState () |
Return the best possible representable state. | |
static constexpr base_t | getBestState (const IntegerStateBase &) |
static constexpr base_t | getWorstState () |
Return the worst possible representable state. | |
static constexpr base_t | getWorstState (const IntegerStateBase &) |
Additional Inherited Members | |
virtual void | handleNewAssumedValue (base_t Value)=0 |
Handle a new assumed value Value . Subtype dependent. | |
virtual void | handleNewKnownValue (base_t Value)=0 |
Handle a new known value Value . Subtype dependent. | |
virtual void | joinOR (base_t AssumedValue, base_t KnownValue)=0 |
Handle a value Value . Subtype dependent. | |
virtual void | joinAND (base_t AssumedValue, base_t KnownValue)=0 |
Handle a new assumed value Value . Subtype dependent. | |
Protected Attributes inherited from llvm::IntegerStateBase< base_ty, BestState, WorstState > | |
base_t | Known = getWorstState() |
The known state encoding in an integer of type base_t. | |
base_t | Assumed = getBestState() |
The assumed state encoding in an integer of type base_t. | |
Specialization of the integer state for an increasing value, hence ~0u is the best state and 0 the worst.
Definition at line 2806 of file Attributor.h.
using llvm::IncIntegerState< base_ty, BestState, WorstState >::base_t = base_ty |
Definition at line 2809 of file Attributor.h.
using llvm::IncIntegerState< base_ty, BestState, WorstState >::super = IntegerStateBase<base_ty, BestState, WorstState> |
Definition at line 2808 of file Attributor.h.
|
inline |
Definition at line 2811 of file Attributor.h.
|
inline |
Definition at line 2812 of file Attributor.h.
|
inlinestaticconstexpr |
Return the best possible representable state.
Definition at line 2815 of file Attributor.h.
Referenced by llvm::IncIntegerState< base_ty, BestState, WorstState >::getBestState().
|
inlinestaticconstexpr |
Definition at line 2817 of file Attributor.h.
References llvm::IncIntegerState< base_ty, BestState, WorstState >::getBestState().
|
inline |
Take minimum of assumed and Value
.
Definition at line 2822 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::Assumed, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::Known.
|
inline |
Take maximum of known and Value
.
Definition at line 2829 of file Attributor.h.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::Assumed, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::Known.