LLVM  16.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
llvm::AAPointerInfo::OffsetAndSize Struct Reference

Helper to represent an access offset and size, with logic to deal with uncertainty and check for overlapping accesses. More...

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

Inheritance diagram for llvm::AAPointerInfo::OffsetAndSize:
Inheritance graph
[legend]
Collaboration diagram for llvm::AAPointerInfo::OffsetAndSize:
Collaboration graph
[legend]

Public Types

using BaseTy = std::pair< int64_t, int64_t >
 

Public Member Functions

 OffsetAndSize (int64_t Offset, int64_t Size)
 
 OffsetAndSize (const BaseTy &P)
 
int64_t getOffset () const
 
int64_t getSize () const
 
bool offsetOrSizeAreUnknown () const
 Return true if offset or size are unknown. More...
 
bool mayOverlap (const OffsetAndSize &OAS) const
 Return true if this offset and size pair might describe an address that overlaps with OAS. More...
 

Static Public Member Functions

static OffsetAndSize getUnknown ()
 

Static Public Attributes

static constexpr int64_t Unassigned = -1
 Constants used to represent special offsets or sizes. More...
 
static constexpr int64_t Unknown = -2
 

Detailed Description

Helper to represent an access offset and size, with logic to deal with uncertainty and check for overlapping accesses.

Definition at line 5041 of file Attributor.h.

Member Typedef Documentation

◆ BaseTy

using llvm::AAPointerInfo::OffsetAndSize::BaseTy = std::pair<int64_t, int64_t>

Definition at line 5042 of file Attributor.h.

Constructor & Destructor Documentation

◆ OffsetAndSize() [1/2]

llvm::AAPointerInfo::OffsetAndSize::OffsetAndSize ( int64_t  Offset,
int64_t  Size 
)
inline

Definition at line 5043 of file Attributor.h.

Referenced by getUnknown().

◆ OffsetAndSize() [2/2]

llvm::AAPointerInfo::OffsetAndSize::OffsetAndSize ( const BaseTy P)
inline

Definition at line 5044 of file Attributor.h.

Member Function Documentation

◆ getOffset()

int64_t llvm::AAPointerInfo::OffsetAndSize::getOffset ( ) const
inline

Definition at line 5045 of file Attributor.h.

Referenced by mayOverlap(), and offsetOrSizeAreUnknown().

◆ getSize()

int64_t llvm::AAPointerInfo::OffsetAndSize::getSize ( ) const
inline

◆ getUnknown()

static OffsetAndSize llvm::AAPointerInfo::OffsetAndSize::getUnknown ( )
inlinestatic

Definition at line 5047 of file Attributor.h.

References OffsetAndSize(), and Unknown.

◆ mayOverlap()

bool llvm::AAPointerInfo::OffsetAndSize::mayOverlap ( const OffsetAndSize OAS) const
inline

Return true if this offset and size pair might describe an address that overlaps with OAS.

Definition at line 5059 of file Attributor.h.

References getOffset(), getSize(), and offsetOrSizeAreUnknown().

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

◆ offsetOrSizeAreUnknown()

bool llvm::AAPointerInfo::OffsetAndSize::offsetOrSizeAreUnknown ( ) const
inline

Return true if offset or size are unknown.

Definition at line 5052 of file Attributor.h.

References getOffset(), getSize(), and Unknown.

Referenced by AA::PointerInfo::State::forallInterferingAccesses(), and mayOverlap().

Member Data Documentation

◆ Unassigned

constexpr int64_t llvm::AAPointerInfo::OffsetAndSize::Unassigned = -1
staticconstexpr

Constants used to represent special offsets or sizes.

Definition at line 5071 of file Attributor.h.

◆ Unknown

constexpr int64_t llvm::AAPointerInfo::OffsetAndSize::Unknown = -2
staticconstexpr

Definition at line 5072 of file Attributor.h.

Referenced by getUnknown(), and offsetOrSizeAreUnknown().


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