LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::AA::PointerInfo::State Struct Reference

A type to track pointer/struct usage and accesses for AAPointerInfo. More...

Inheritance diagram for llvm::AA::PointerInfo::State:
Inheritance graph
[legend]

Public Member Functions

 State ()=default
 
 State (State &&SIS)=default
 
const StategetAssumed () const
 
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().
 
Stateoperator= (const State &R)
 
Stateoperator= (State &&R)
 
ChangeStatus addAccess (Attributor &A, const AAPointerInfo::RangeList &Ranges, Instruction &I, std::optional< Value * > Content, AAPointerInfo::AccessKind Kind, Type *Ty, Instruction *RemoteI=nullptr)
 Add a new Access to the state at offset Offset and with size Size.
 
AAPointerInfo::const_bin_iterator begin () const
 
AAPointerInfo::const_bin_iterator end () const
 
int64_t numOffsetBins () const
 
const AAPointerInfo::AccessgetAccess (unsigned Index) const
 
- 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 State getBestState (const State &SIS)
 Return the best possible representable state.
 
static State getWorstState (const State &SIS)
 Return the worst possible representable state.
 

Protected Member Functions

bool forallInterferingAccesses (AA::RangeTy Range, function_ref< bool(const AAPointerInfo::Access &, bool)> CB) const
 See AAPointerInfo::forallInterferingAccesses.
 
bool forallInterferingAccesses (Instruction &I, function_ref< bool(const AAPointerInfo::Access &, bool)> CB, AA::RangeTy &Range) const
 See AAPointerInfo::forallInterferingAccesses.
 

Protected Attributes

SmallVector< AAPointerInfo::AccessAccessList
 
AAPointerInfo::OffsetBinsTy OffsetBins
 
DenseMap< const Instruction *, SmallVector< unsigned > > RemoteIMap
 

Detailed Description

A type to track pointer/struct usage and accesses for AAPointerInfo.

Definition at line 788 of file AttributorAttributes.cpp.

Constructor & Destructor Documentation

◆ State() [1/2]

llvm::AA::PointerInfo::State::State ( )
default

◆ State() [2/2]

llvm::AA::PointerInfo::State::State ( State &&  SIS)
default

Member Function Documentation

◆ addAccess()

ChangeStatus llvm::AA::PointerInfo::State::addAccess ( Attributor A,
const AAPointerInfo::RangeList Ranges,
Instruction I,
std::optional< Value * >  Content,
AAPointerInfo::AccessKind  Kind,
Type Ty,
Instruction RemoteI = nullptr 
)

Add a new Access to the state at offset Offset and with size Size.

The access is associated with I, writes Content (if anything), and is of kind Kind. If an Access already exists for the same I and same RemoteI, the two are combined, potentially losing information about offset and size. The resulting access must now be moved from its original OffsetBin to the bin for its new offset.

\Returns CHANGED, if the state changed, UNCHANGED otherwise.

Definition at line 929 of file AttributorAttributes.cpp.

References A, llvm::AA::PointerInfo::State::AccessList, assert(), Before, llvm::Bin, llvm::CHANGED, Content, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::dbgs(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), LLVM_DEBUG, llvm::AA::PointerInfo::State::OffsetBins, llvm::AA::PointerInfo::State::RemoteIMap, llvm::AAPointerInfo::RangeList::set_difference(), ToRemove, and llvm::UNCHANGED.

◆ begin()

AAPointerInfo::const_bin_iterator llvm::AA::PointerInfo::State::begin ( ) const
inline

◆ end()

AAPointerInfo::const_bin_iterator llvm::AA::PointerInfo::State::end ( ) const
inline

◆ forallInterferingAccesses() [1/2]

bool llvm::AA::PointerInfo::State::forallInterferingAccesses ( AA::RangeTy  Range,
function_ref< bool(const AAPointerInfo::Access &, bool)>  CB 
) const
inlineprotected

◆ forallInterferingAccesses() [2/2]

bool llvm::AA::PointerInfo::State::forallInterferingAccesses ( Instruction I,
function_ref< bool(const AAPointerInfo::Access &, bool)>  CB,
AA::RangeTy Range 
) const
inlineprotected

◆ getAccess()

const AAPointerInfo::Access & llvm::AA::PointerInfo::State::getAccess ( unsigned  Index) const
inline

◆ getAssumed()

const State & llvm::AA::PointerInfo::State::getAssumed ( ) const
inline

Definition at line 802 of file AttributorAttributes.cpp.

◆ getBestState()

static State llvm::AA::PointerInfo::State::getBestState ( const State SIS)
inlinestatic

Return the best possible representable state.

Definition at line 790 of file AttributorAttributes.cpp.

References llvm::AA::PointerInfo::State::State().

◆ getWorstState()

static State llvm::AA::PointerInfo::State::getWorstState ( const State SIS)
inlinestatic

Return the worst possible representable state.

Definition at line 793 of file AttributorAttributes.cpp.

◆ indicateOptimisticFixpoint()

ChangeStatus llvm::AA::PointerInfo::State::indicateOptimisticFixpoint ( )
inlineoverridevirtual

◆ indicatePessimisticFixpoint()

ChangeStatus llvm::AA::PointerInfo::State::indicatePessimisticFixpoint ( )
inlineoverridevirtual

◆ isAtFixpoint()

bool llvm::AA::PointerInfo::State::isAtFixpoint ( ) const
inlineoverridevirtual

◆ isValidState()

bool llvm::AA::PointerInfo::State::isValidState ( ) const
inlineoverridevirtual

◆ numOffsetBins()

int64_t llvm::AA::PointerInfo::State::numOffsetBins ( ) const
inline

◆ operator=() [1/2]

State & llvm::AA::PointerInfo::State::operator= ( const State R)
inline

◆ operator=() [2/2]

State & llvm::AA::PointerInfo::State::operator= ( State &&  R)
inline

Member Data Documentation

◆ AccessList

SmallVector<AAPointerInfo::Access> llvm::AA::PointerInfo::State::AccessList
protected

◆ OffsetBins

AAPointerInfo::OffsetBinsTy llvm::AA::PointerInfo::State::OffsetBins
protected

◆ RemoteIMap

DenseMap<const Instruction *, SmallVector<unsigned> > llvm::AA::PointerInfo::State::RemoteIMap
protected

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