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

} More...

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

Public Types

using Accesses = DenseSet< AAPointerInfo::Access, AccessAsInstructionInfo >
 We store accesses in a set with the instruction as key. More...
 
using AccessBinsTy = DenseMap< OffsetAndSize, Accesses >
 We store all accesses in bins denoted by their offset and size. More...
 

Public Member Functions

 State ()
 
 State (const State &SIS)
 
 State (State &&SIS)
 
const StategetAssumed () const
 
bool isValidState () const override
 See AbstractState::isValidState(). More...
 
bool isAtFixpoint () const override
 See AbstractState::isAtFixpoint(). More...
 
ChangeStatus indicateOptimisticFixpoint () override
 See AbstractState::indicateOptimisticFixpoint(). More...
 
ChangeStatus indicatePessimisticFixpoint () override
 See AbstractState::indicatePessimisticFixpoint(). More...
 
Stateoperator= (const State &R)
 
Stateoperator= (State &&R)
 
bool operator== (const State &R) const
 
bool operator!= (const State &R) const
 
AccessBinsTy::const_iterator begin () const
 
AccessBinsTy::const_iterator end () const
 
- Public Member Functions inherited from llvm::AbstractState
virtual ~AbstractState ()
 

Static Public Member Functions

static State getBestState (const State &SIS)
 Return the best possible representable state. More...
 
static State getWorstState (const State &SIS)
 Return the worst possible representable state. More...
 

Protected Member Functions

ChangeStatus addAccess (int64_t Offset, int64_t Size, Instruction &I, Optional< Value * > Content, AAPointerInfo::AccessKind Kind, Type *Ty, Instruction *RemoteI=nullptr, Accesses *BinPtr=nullptr)
 Add a new access to the state at offset Offset and with size Size. More...
 
bool forallInterferingAccesses (Instruction &I, function_ref< bool(const AAPointerInfo::Access &, bool)> CB) const
 See AAPointerInfo::forallInterferingAccesses. More...
 

Protected Attributes

DenseMap< OffsetAndSize, AccessesAccessBins
 The bins with all the accesses for the associated pointer. More...
 

Detailed Description

}

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

Definition at line 897 of file AttributorAttributes.cpp.

Member Typedef Documentation

◆ AccessBinsTy

We store all accesses in bins denoted by their offset and size.

Definition at line 980 of file AttributorAttributes.cpp.

◆ Accesses

We store accesses in a set with the instruction as key.

Definition at line 977 of file AttributorAttributes.cpp.

Constructor & Destructor Documentation

◆ State() [1/3]

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

◆ State() [2/3]

llvm::AA::PointerInfo::State::State ( const State SIS)
inline

Definition at line 910 of file AttributorAttributes.cpp.

◆ State() [3/3]

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

Definition at line 911 of file AttributorAttributes.cpp.

Member Function Documentation

◆ addAccess()

ChangeStatus llvm::AA::PointerInfo::State::addAccess ( int64_t  Offset,
int64_t  Size,
Instruction I,
Optional< Value * >  Content,
AAPointerInfo::AccessKind  Kind,
Type Ty,
Instruction RemoteI = nullptr,
Accesses BinPtr = nullptr 
)
inlineprotected

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. \Returns CHANGED, if the state changed, UNCHANGED otherwise.

Definition at line 993 of file AttributorAttributes.cpp.

References llvm::AA::PointerInfo::State::AccessBins, llvm::CHANGED, Content, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::end(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), Offset, llvm::Check::Size, and llvm::UNCHANGED.

◆ begin()

AccessBinsTy::const_iterator llvm::AA::PointerInfo::State::begin ( ) const
inline

◆ end()

AccessBinsTy::const_iterator llvm::AA::PointerInfo::State::end ( ) const
inline

◆ forallInterferingAccesses()

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

◆ getAssumed()

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

Definition at line 913 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 900 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 903 of file AttributorAttributes.cpp.

◆ indicateOptimisticFixpoint()

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

See AbstractState::indicateOptimisticFixpoint().

Implements llvm::AbstractState.

Definition at line 922 of file AttributorAttributes.cpp.

References llvm::UNCHANGED.

◆ indicatePessimisticFixpoint()

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

See AbstractState::indicatePessimisticFixpoint().

Implements llvm::AbstractState.

Definition at line 928 of file AttributorAttributes.cpp.

References llvm::CHANGED.

◆ isAtFixpoint()

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

See AbstractState::isAtFixpoint().

Implements llvm::AbstractState.

Definition at line 919 of file AttributorAttributes.cpp.

◆ isValidState()

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

See AbstractState::isValidState().

Implements llvm::AbstractState.

Definition at line 916 of file AttributorAttributes.cpp.

Referenced by llvm::AA::PointerInfo::State::forallInterferingAccesses().

◆ operator!=()

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

Definition at line 974 of file AttributorAttributes.cpp.

◆ 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

◆ operator==()

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

Member Data Documentation

◆ AccessBins

DenseMap<OffsetAndSize, Accesses> llvm::AA::PointerInfo::State::AccessBins
protected

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