Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
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:
[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

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

template<typename F>
bool forallInterferingAccesses (AA::RangeTy Range, F CB) const
 See AAPointerInfo::forallInterferingAccesses.
template<typename F>
bool forallInterferingAccesses (Instruction &I, F CB, AA::RangeTy &Range) const
 See AAPointerInfo::forallInterferingAccesses.

Protected Attributes

SmallVector< AAPointerInfo::AccessAccessList
AAPointerInfo::OffsetBinsTy OffsetBins
DenseMap< const Instruction *, SmallVector< unsigned > > RemoteIMap
AAPointerInfo::OffsetInfo ReturnedOffsets
 Flag to determine if the underlying pointer is reaching a return statement in the associated function or not.

Detailed Description

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

Definition at line 792 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

References State().

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

References A(), AccessList, assert(), llvm::Bin, llvm::CHANGED, llvm::dbgs(), I, llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, LLVM_DEBUG, OffsetBins, RemoteIMap, llvm::AAPointerInfo::RangeList::set_difference(), ToRemove, and llvm::UNCHANGED.

◆ begin()

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

Definition at line 861 of file AttributorAttributes.cpp.

References OffsetBins.

◆ end()

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

Definition at line 862 of file AttributorAttributes.cpp.

References OffsetBins.

◆ forallInterferingAccesses() [1/2]

template<typename F>
bool llvm::AA::PointerInfo::State::forallInterferingAccesses ( AA::RangeTy Range,
F CB ) const
inlineprotected

◆ forallInterferingAccesses() [2/2]

template<typename F>
bool llvm::AA::PointerInfo::State::forallInterferingAccesses ( Instruction & I,
F CB,
AA::RangeTy & Range ) const
inlineprotected

◆ getAccess()

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

Definition at line 865 of file AttributorAttributes.cpp.

References AccessList.

◆ getAssumed()

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

Definition at line 806 of file AttributorAttributes.cpp.

References State().

◆ getBestState()

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

Return the best possible representable state.

Definition at line 794 of file AttributorAttributes.cpp.

References State().

◆ getWorstState()

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

Return the worst possible representable state.

Definition at line 797 of file AttributorAttributes.cpp.

References State().

◆ 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

See AbstractState::isAtFixpoint().

Implements llvm::AbstractState.

Definition at line 812 of file AttributorAttributes.cpp.

◆ isValidState()

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

◆ numOffsetBins()

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

Definition at line 863 of file AttributorAttributes.cpp.

References OffsetBins.

◆ operator=() [1/2]

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

Definition at line 826 of file AttributorAttributes.cpp.

References AccessList, OffsetBins, RemoteIMap, ReturnedOffsets, and State().

◆ 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

◆ ReturnedOffsets

AAPointerInfo::OffsetInfo llvm::AA::PointerInfo::State::ReturnedOffsets
protected

Flag to determine if the underlying pointer is reaching a return statement in the associated function or not.

Returns in other functions cause invalidation.

Definition at line 889 of file AttributorAttributes.cpp.

Referenced by forallInterferingAccesses(), forallInterferingAccesses(), operator=(), and operator=().


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