LLVM 22.0.0git
|
Specialization of the integer state for a bit-wise encoding. 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< uint32_t, ~uint32_t(0), 0 > | |
using | base_t |
Public Member Functions | |
BitIntegerState ()=default | |
BitIntegerState (base_t Assumed) | |
bool | isKnown (base_t BitsEncoding=BestState) const |
Return true if the bits set in BitsEncoding are "known bits". | |
bool | isAssumed (base_t BitsEncoding=BestState) const |
Return true if the bits set in BitsEncoding are "assumed bits". | |
BitIntegerState & | addKnownBits (base_t Bits) |
Add the bits in BitsEncoding to the "known bits". | |
BitIntegerState & | removeAssumedBits (base_t BitsEncoding) |
Remove the bits in BitsEncoding from the "assumed bits" if not known. | |
BitIntegerState & | removeKnownBits (base_t BitsEncoding) |
Remove the bits in BitsEncoding from the "known bits". | |
BitIntegerState & | intersectAssumedBits (base_t BitsEncoding) |
Keep only "assumed bits" also set in BitsEncoding but all known ones. | |
Public Member Functions inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 > | |
IntegerStateBase ()=default | |
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 |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 > | |
static constexpr base_t | getBestState () |
Return the best possible representable state. | |
static constexpr base_t | getWorstState () |
Return the worst possible representable state. | |
Protected Member Functions inherited from llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 > | |
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< uint32_t, ~uint32_t(0), 0 > | |
base_t | Known |
The known state encoding in an integer of type base_t. | |
base_t | Assumed |
The assumed state encoding in an integer of type base_t. |
Specialization of the integer state for a bit-wise encoding.
Definition at line 2782 of file Attributor.h.
using llvm::BitIntegerState< base_ty, BestState, WorstState >::base_t = base_ty |
Definition at line 2785 of file Attributor.h.
using llvm::BitIntegerState< base_ty, BestState, WorstState >::super = IntegerStateBase<base_ty, BestState, WorstState> |
Definition at line 2784 of file Attributor.h.
|
default |
Referenced by addKnownBits(), intersectAssumedBits(), removeAssumedBits(), and removeKnownBits().
|
inline |
Definition at line 2787 of file Attributor.h.
References llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Assumed.
|
inline |
Add the bits in BitsEncoding
to the "known bits".
Definition at line 2800 of file Attributor.h.
References llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Assumed, BitIntegerState(), and llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Known.
|
inline |
Keep only "assumed bits" also set in BitsEncoding
but all known ones.
Definition at line 2819 of file Attributor.h.
References llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Assumed, BitIntegerState(), and llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Known.
Referenced by removeAssumedBits().
|
inline |
Return true if the bits set in BitsEncoding
are "assumed bits".
Definition at line 2795 of file Attributor.h.
References llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Assumed.
|
inline |
Return true if the bits set in BitsEncoding
are "known bits".
Definition at line 2790 of file Attributor.h.
References llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Known.
Referenced by llvm::Attributor::isAssumedDead().
|
inline |
Remove the bits in BitsEncoding
from the "assumed bits" if not known.
Definition at line 2808 of file Attributor.h.
References BitIntegerState(), and intersectAssumedBits().
|
inline |
Remove the bits in BitsEncoding
from the "known bits".
Definition at line 2813 of file Attributor.h.
References BitIntegerState(), and llvm::IntegerStateBase< uint32_t, ~uint32_t(0), 0 >::Known.