LLVM  15.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 Unknown = 1 << 31
 Constant used to represent unknown offset or sizes. More...
 

Detailed Description

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

Definition at line 4935 of file Attributor.h.

Member Typedef Documentation

◆ BaseTy

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

Definition at line 4936 of file Attributor.h.

Constructor & Destructor Documentation

◆ OffsetAndSize() [1/2]

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

Definition at line 4937 of file Attributor.h.

Referenced by getUnknown().

◆ OffsetAndSize() [2/2]

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

Definition at line 4938 of file Attributor.h.

Member Function Documentation

◆ getOffset()

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

Definition at line 4939 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 4941 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 4953 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 4946 of file Attributor.h.

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

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

Member Data Documentation

◆ Unknown

constexpr int64_t llvm::AAPointerInfo::OffsetAndSize::Unknown = 1 << 31
staticconstexpr

Constant used to represent unknown offset or sizes.

Definition at line 4965 of file Attributor.h.

Referenced by getUnknown(), and offsetOrSizeAreUnknown().


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