LLVM 19.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

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 787 of file AttributorAttributes.cpp.

Constructor & Destructor Documentation

◆ State() [1/2]

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

◆ State() [2/2]

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

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 928 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

◆ end()

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

◆ forallInterferingAccesses() [1/2]

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

◆ forallInterferingAccesses() [2/2]

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

◆ getAccess()

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

◆ getAssumed()

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

Definition at line 801 of file AttributorAttributes.cpp.

◆ getBestState()

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

Return the best possible representable state.

Definition at line 789 of file AttributorAttributes.cpp.

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

◆ getWorstState()

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

Return the worst possible representable state.

Definition at line 792 of file AttributorAttributes.cpp.

◆ indicateOptimisticFixpoint()

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

◆ indicatePessimisticFixpoint()

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

◆ isAtFixpoint()

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

◆ isValidState()

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

◆ numOffsetBins()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ AccessList

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

◆ OffsetBins

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

◆ RemoteIMap

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

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