LLVM  17.0.0git
Public Types | Public Member Functions | List of all members
llvm::AAPointerInfo::Access Struct Reference

An access description. More...

#include "llvm/Transforms/IPO/Attributor.h"

Public Types

using const_iterator = RangeList::const_iterator
 

Public Member Functions

 Access (Instruction *I, int64_t Offset, int64_t Size, std::optional< Value * > Content, AccessKind Kind, Type *Ty)
 
 Access (Instruction *LocalI, Instruction *RemoteI, const RangeList &Ranges, std::optional< Value * > Content, AccessKind K, Type *Ty)
 
 Access (Instruction *LocalI, Instruction *RemoteI, int64_t Offset, int64_t Size, std::optional< Value * > Content, AccessKind Kind, Type *Ty)
 
 Access (const Access &Other)=default
 
Accessoperator= (const Access &Other)=default
 
bool operator== (const Access &R) const
 
bool operator!= (const Access &R) const
 
Accessoperator&= (const Access &R)
 
void verify ()
 
AccessKind getKind () const
 Return the access kind. More...
 
bool isRead () const
 Return true if this is a read access. More...
 
bool isWrite () const
 Return true if this is a write access. More...
 
bool isWriteOrAssumption () const
 Return true if this is a write access. More...
 
bool isAssumption () const
 Return true if this is an assumption access. More...
 
bool isMustAccess () const
 
bool isMayAccess () const
 
InstructiongetLocalInst () const
 Return the instruction that causes the access with respect to the local scope of the associated attribute. More...
 
InstructiongetRemoteInst () const
 Return the actual instruction that causes the access. More...
 
bool isWrittenValueYetUndetermined () const
 Return true if the value written is not known yet. More...
 
bool isWrittenValueUnknown () const
 Return true if the value written cannot be determined at all. More...
 
void setWrittenValueUnknown ()
 Set the value written to nullptr, i.e., unknown. More...
 
TypegetType () const
 Return the type associated with the access, if known. More...
 
ValuegetWrittenValue () const
 Return the value writen, if any. More...
 
std::optional< Value * > getContent () const
 Return the written value which can be llvm::null if it is not yet determined. More...
 
bool hasUniqueRange () const
 
const AA::RangeTygetUniqueRange () const
 
void addRange (int64_t Offset, int64_t Size)
 Add a range accessed by this Access. More...
 
const RangeListgetRanges () const
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

An access description.

Definition at line 5291 of file Attributor.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 5434 of file Attributor.h.

Constructor & Destructor Documentation

◆ Access() [1/4]

llvm::AAPointerInfo::Access::Access ( Instruction I,
int64_t  Offset,
int64_t  Size,
std::optional< Value * >  Content,
AccessKind  Kind,
Type Ty 
)
inline

Definition at line 5292 of file Attributor.h.

References Content, and verify().

◆ Access() [2/4]

llvm::AAPointerInfo::Access::Access ( Instruction LocalI,
Instruction RemoteI,
const RangeList Ranges,
std::optional< Value * >  Content,
AccessKind  K,
Type Ty 
)
inline

◆ Access() [3/4]

llvm::AAPointerInfo::Access::Access ( Instruction LocalI,
Instruction RemoteI,
int64_t  Offset,
int64_t  Size,
std::optional< Value * >  Content,
AccessKind  Kind,
Type Ty 
)
inline

Definition at line 5308 of file Attributor.h.

References Content, and verify().

◆ Access() [4/4]

llvm::AAPointerInfo::Access::Access ( const Access Other)
default

Member Function Documentation

◆ addRange()

void llvm::AAPointerInfo::Access::addRange ( int64_t  Offset,
int64_t  Size 
)
inline

Add a range accessed by this Access.

If there are multiple ranges, then this is a "may access".

Definition at line 5424 of file Attributor.h.

References llvm::AAPointerInfo::AK_MAY, llvm::AAPointerInfo::AK_MUST, hasUniqueRange(), llvm::AAPointerInfo::RangeList::insert(), and llvm::Offset.

◆ begin()

const_iterator llvm::AAPointerInfo::Access::begin ( ) const
inline

Definition at line 5435 of file Attributor.h.

References llvm::AAPointerInfo::RangeList::begin().

◆ end()

const_iterator llvm::AAPointerInfo::Access::end ( ) const
inline

Definition at line 5436 of file Attributor.h.

References llvm::AAPointerInfo::RangeList::end().

◆ getContent()

std::optional<Value *> llvm::AAPointerInfo::Access::getContent ( ) const
inline

Return the written value which can be llvm::null if it is not yet determined.

Definition at line 5416 of file Attributor.h.

Referenced by getPotentialCopiesOfMemoryValue(), and llvm::operator<<().

◆ getKind()

AccessKind llvm::AAPointerInfo::Access::getKind ( ) const
inline

Return the access kind.

Definition at line 5358 of file Attributor.h.

Referenced by llvm::operator<<().

◆ getLocalInst()

Instruction* llvm::AAPointerInfo::Access::getLocalInst ( ) const
inline

Return the instruction that causes the access with respect to the local scope of the associated attribute.

Definition at line 5388 of file Attributor.h.

Referenced by llvm::operator<<().

◆ getRanges()

const RangeList& llvm::AAPointerInfo::Access::getRanges ( ) const
inline

Definition at line 5432 of file Attributor.h.

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

◆ getRemoteInst()

Instruction* llvm::AAPointerInfo::Access::getRemoteInst ( ) const
inline

Return the actual instruction that causes the access.

Definition at line 5391 of file Attributor.h.

Referenced by getPotentialCopiesOfMemoryValue(), and llvm::operator<<().

◆ getType()

Type* llvm::AAPointerInfo::Access::getType ( ) const
inline

Return the type associated with the access, if known.

Definition at line 5405 of file Attributor.h.

◆ getUniqueRange()

const AA::RangeTy& llvm::AAPointerInfo::Access::getUniqueRange ( ) const
inline

Definition at line 5419 of file Attributor.h.

References llvm::AAPointerInfo::RangeList::getUnique().

◆ getWrittenValue()

Value* llvm::AAPointerInfo::Access::getWrittenValue ( ) const
inline

Return the value writen, if any.

Definition at line 5408 of file Attributor.h.

References assert(), and isWrittenValueYetUndetermined().

Referenced by getPotentialCopiesOfMemoryValue().

◆ hasUniqueRange()

bool llvm::AAPointerInfo::Access::hasUniqueRange ( ) const
inline

Definition at line 5418 of file Attributor.h.

References llvm::AAPointerInfo::RangeList::isUnique().

Referenced by addRange().

◆ isAssumption()

bool llvm::AAPointerInfo::Access::isAssumption ( ) const
inline

Return true if this is an assumption access.

Definition at line 5370 of file Attributor.h.

References llvm::AAPointerInfo::AK_ASSUMPTION.

Referenced by isWriteOrAssumption(), and verify().

◆ isMayAccess()

bool llvm::AAPointerInfo::Access::isMayAccess ( ) const
inline

Definition at line 5379 of file Attributor.h.

References llvm::AAPointerInfo::AK_MAY, assert(), and llvm::AAPointerInfo::RangeList::size().

Referenced by verify().

◆ isMustAccess()

bool llvm::AAPointerInfo::Access::isMustAccess ( ) const
inline

Definition at line 5372 of file Attributor.h.

References llvm::AAPointerInfo::AK_MUST, assert(), and llvm::AAPointerInfo::RangeList::size().

Referenced by verify().

◆ isRead()

bool llvm::AAPointerInfo::Access::isRead ( ) const
inline

Return true if this is a read access.

Definition at line 5361 of file Attributor.h.

References llvm::AAPointerInfo::AK_R.

Referenced by getPotentialCopiesOfMemoryValue().

◆ isWrite()

bool llvm::AAPointerInfo::Access::isWrite ( ) const
inline

Return true if this is a write access.

Definition at line 5364 of file Attributor.h.

References llvm::AAPointerInfo::AK_W.

Referenced by isWriteOrAssumption(), and verify().

◆ isWriteOrAssumption()

bool llvm::AAPointerInfo::Access::isWriteOrAssumption ( ) const
inline

Return true if this is a write access.

Definition at line 5367 of file Attributor.h.

References isAssumption(), and isWrite().

Referenced by getPotentialCopiesOfMemoryValue().

◆ isWrittenValueUnknown()

bool llvm::AAPointerInfo::Access::isWrittenValueUnknown ( ) const
inline

Return true if the value written cannot be determined at all.

Definition at line 5397 of file Attributor.h.

Referenced by getPotentialCopiesOfMemoryValue().

◆ isWrittenValueYetUndetermined()

bool llvm::AAPointerInfo::Access::isWrittenValueYetUndetermined ( ) const
inline

Return true if the value written is not known yet.

Definition at line 5394 of file Attributor.h.

Referenced by getPotentialCopiesOfMemoryValue(), and getWrittenValue().

◆ operator!=()

bool llvm::AAPointerInfo::Access::operator!= ( const Access R) const
inline

Definition at line 5322 of file Attributor.h.

◆ operator&=()

Access& llvm::AAPointerInfo::Access::operator&= ( const Access R)
inline

◆ operator=()

Access& llvm::AAPointerInfo::Access::operator= ( const Access Other)
default

◆ operator==()

bool llvm::AAPointerInfo::Access::operator== ( const Access R) const
inline

Definition at line 5318 of file Attributor.h.

◆ setWrittenValueUnknown()

void llvm::AAPointerInfo::Access::setWrittenValueUnknown ( )
inline

Set the value written to nullptr, i.e., unknown.

Definition at line 5402 of file Attributor.h.

◆ verify()

void llvm::AAPointerInfo::Access::verify ( )
inline

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