Representation for a specific memory location.

Synopsis

Declared in <llvm/Analysis/MemoryLocation.h>

class MemoryLocation;

Description

This abstraction can be used to represent a specific location in memory. The goal of the location is to represent enough information to describe abstract aliasing, modification, and reference behaviors of whatever value(s) are stored in memory at the particular location.

The primary user of this interface is LLVM's Alias Analysis, but other memory analyses such as MemoryDependence can use it as well.

Enums

Name

Description

Unnamed enum

UnknownSize ‐ This is a special value which can be used with the size arguments in alias queries to indicate that the caller does not know the sizes of the potential memory references.

Member Functions

Name

Description

MemoryLocation [constructor]

Constructors

getWithNewPtr

getWithNewSize

getWithoutAATags

print

operator==

Equality operator

Static Member Functions

Name

Description

get

Return a location with information about the memory reference by the given instruction.

getAfter

Return a location that may access any location after Ptr, while remaining within the underlying object.

getBeforeOrAfter

Return a location that may access any location before or after Ptr, while remaining within the underlying object.

getForArgument

Return a location representing a particular argument of a call.

getForDest

Return a location representing the destination of a memory set or transfer.

getForSource

Return a location representing the source of a memory transfer.

getOrNone

Data Members

Name

Description

AATags

The metadata nodes which describes the aliasing of the location (each member is null if that kind of information is unavailable).

Ptr

The address of the start of the location.

Size

The maximum size of the location, in address‐units, or UnknownSize if the size is not known.

Non-Member Functions

Name

Description

findAvailablePtrLoadStore

Scan backwards to see if we have the value of the given pointer available locally within a small number of instructions.

Created with MrDocs