LLVM: llvm::IntegerStateBase< base_ty, BestState, WorstState (original) (raw)

Simple state with integers encoding. More...

#include "[llvm/Transforms/IPO/Attributor.h](Attributor%5F8h%5Fsource.html)"

Public Types
using base_t = base_ty
Public Member Functions
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
Static Public Member Functions
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 &)
Protected Member Functions
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
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.

template<typename base_ty, base_ty BestState, base_ty WorstState>
struct llvm::IntegerStateBase< base_ty, BestState, WorstState >

Simple state with integers encoding.

The interface ensures that the assumed bits are always a subset of the known bits. Users can only add known bits and, except through adding known bits, they can only remove assumed bits. This should guarantee monotonicity and thereby the existence of a fixpoint (if used correctly). The fixpoint is reached when the assumed and known state/bits are equal. Users can force/inidicate a fixpoint. If an optimistic one is indicated, the known state will catch up with the assumed one, for a pessimistic fixpoint it is the other way around.

Definition at line 2681 of file Attributor.h.

base_t

template<typename base_ty, base_ty BestState, base_ty WorstState>

template<typename base_ty, base_ty BestState, base_ty WorstState>

IntegerStateBase() [2/2]

template<typename base_ty, base_ty BestState, base_ty WorstState>

getAssumed()

template<typename base_ty, base_ty BestState, base_ty WorstState>

getBestState() [1/2]

template<typename base_ty, base_ty BestState, base_ty WorstState>

getBestState() [2/2]

template<typename base_ty, base_ty BestState, base_ty WorstState>

getKnown()

template<typename base_ty, base_ty BestState, base_ty WorstState>

getWorstState() [1/2]

template<typename base_ty, base_ty BestState, base_ty WorstState>

getWorstState() [2/2]

template<typename base_ty, base_ty BestState, base_ty WorstState>

handleNewAssumedValue()

template<typename base_ty, base_ty BestState, base_ty WorstState>

virtual void llvm::IntegerStateBase< base_ty, BestState, WorstState >::handleNewAssumedValue ( base_t Value) protectedpure virtual

handleNewKnownValue()

template<typename base_ty, base_ty BestState, base_ty WorstState>

virtual void llvm::IntegerStateBase< base_ty, BestState, WorstState >::handleNewKnownValue ( base_t Value) protectedpure virtual

indicateOptimisticFixpoint()

template<typename base_ty, base_ty BestState, base_ty WorstState>

indicatePessimisticFixpoint()

template<typename base_ty, base_ty BestState, base_ty WorstState>

isAtFixpoint()

template<typename base_ty, base_ty BestState, base_ty WorstState>

isValidState()

template<typename base_ty, base_ty BestState, base_ty WorstState>

joinAND()

template<typename base_ty, base_ty BestState, base_ty WorstState>

joinOR()

template<typename base_ty, base_ty BestState, base_ty WorstState>

operator!=()

template<typename base_ty, base_ty BestState, base_ty WorstState>

operator&=()

template<typename base_ty, base_ty BestState, base_ty WorstState>

operator+=()

template<typename base_ty, base_ty BestState, base_ty WorstState>

"Clamp" this state with R.

The result is subtype dependent but it is intended that information known in either state will be known in this one afterwards.

Definition at line 2747 of file Attributor.h.

operator==()

template<typename base_ty, base_ty BestState, base_ty WorstState>

operator^=()

template<typename base_ty, base_ty BestState, base_ty WorstState>

"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 2740 of file Attributor.h.

operator|=()

template<typename base_ty, base_ty BestState, base_ty WorstState>

Assumed

template<typename base_ty, base_ty BestState, base_ty WorstState>

Known

template<typename base_ty, base_ty BestState, base_ty WorstState>


The documentation for this struct was generated from the following file: