LLVM 20.0.0git
|
A type to track pointer/struct usage and accesses for AAPointerInfo. More...
Public Member Functions | |
State ()=default | |
State (State &&SIS)=default | |
const State & | getAssumed () 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(). | |
State & | operator= (const State &R) |
State & | operator= (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::Access & | getAccess (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::Access > | AccessList |
AAPointerInfo::OffsetBinsTy | OffsetBins |
DenseMap< const Instruction *, SmallVector< unsigned > > | RemoteIMap |
A type to track pointer/struct usage and accesses for AAPointerInfo.
Definition at line 788 of file AttributorAttributes.cpp.
|
default |
Referenced by llvm::AA::PointerInfo::State::getBestState().
|
default |
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.
|
inline |
Definition at line 855 of file AttributorAttributes.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), and llvm::AA::PointerInfo::State::OffsetBins.
|
inline |
Definition at line 856 of file AttributorAttributes.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::AA::PointerInfo::State::OffsetBins.
|
inlineprotected |
See AAPointerInfo::forallInterferingAccesses.
Definition at line 881 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::AccessList, llvm::AA::PointerInfo::State::isValidState(), llvm::AA::PointerInfo::State::OffsetBins, and Range.
Referenced by llvm::AA::PointerInfo::State::forallInterferingAccesses().
|
inlineprotected |
See AAPointerInfo::forallInterferingAccesses.
Definition at line 902 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::AccessList, llvm::AA::PointerInfo::State::forallInterferingAccesses(), I, llvm::AA::PointerInfo::State::isValidState(), Range, and llvm::AA::PointerInfo::State::RemoteIMap.
|
inline |
Definition at line 859 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::AccessList.
Definition at line 802 of file AttributorAttributes.cpp.
Return the best possible representable state.
Definition at line 790 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::State().
Return the worst possible representable state.
Definition at line 793 of file AttributorAttributes.cpp.
|
inlineoverridevirtual |
See AbstractState::indicateOptimisticFixpoint().
Implements llvm::AbstractState.
Definition at line 811 of file AttributorAttributes.cpp.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicateOptimisticFixpoint(), and llvm::UNCHANGED.
|
inlineoverridevirtual |
See AbstractState::indicatePessimisticFixpoint().
Implements llvm::AbstractState.
Definition at line 817 of file AttributorAttributes.cpp.
References llvm::CHANGED, and llvm::IntegerStateBase< base_ty, BestState, WorstState >::indicatePessimisticFixpoint().
|
inlineoverridevirtual |
See AbstractState::isAtFixpoint().
Implements llvm::AbstractState.
Definition at line 808 of file AttributorAttributes.cpp.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isAtFixpoint().
|
inlineoverridevirtual |
See AbstractState::isValidState().
Implements llvm::AbstractState.
Definition at line 805 of file AttributorAttributes.cpp.
References llvm::IntegerStateBase< base_ty, BestState, WorstState >::isValidState().
Referenced by llvm::AA::PointerInfo::State::forallInterferingAccesses().
|
inline |
Definition at line 857 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::OffsetBins, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size().
Definition at line 822 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::AccessList, llvm::AA::PointerInfo::State::OffsetBins, and llvm::AA::PointerInfo::State::RemoteIMap.
Definition at line 832 of file AttributorAttributes.cpp.
References llvm::AA::PointerInfo::State::AccessList, llvm::AA::PointerInfo::State::OffsetBins, llvm::AA::PointerInfo::State::RemoteIMap, and std::swap().
|
protected |
Definition at line 876 of file AttributorAttributes.cpp.
Referenced by llvm::AA::PointerInfo::State::addAccess(), llvm::AA::PointerInfo::State::forallInterferingAccesses(), llvm::AA::PointerInfo::State::getAccess(), and llvm::AA::PointerInfo::State::operator=().
|
protected |
Definition at line 877 of file AttributorAttributes.cpp.
Referenced by llvm::AA::PointerInfo::State::addAccess(), llvm::AA::PointerInfo::State::begin(), llvm::AA::PointerInfo::State::end(), llvm::AA::PointerInfo::State::forallInterferingAccesses(), llvm::AA::PointerInfo::State::numOffsetBins(), and llvm::AA::PointerInfo::State::operator=().
|
protected |
Definition at line 878 of file AttributorAttributes.cpp.
Referenced by llvm::AA::PointerInfo::State::addAccess(), llvm::AA::PointerInfo::State::forallInterferingAccesses(), and llvm::AA::PointerInfo::State::operator=().