LLVM 18.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::AAMDNodes Struct Reference

A collection of metadata nodes that might be associated with a memory access used by the alias-analysis infrastructure. More...

#include "llvm/IR/Metadata.h"

Public Member Functions

 AAMDNodes ()=default
 
 AAMDNodes (MDNode *T, MDNode *TS, MDNode *S, MDNode *N)
 
bool operator== (const AAMDNodes &A) const
 
bool operator!= (const AAMDNodes &A) const
 
 operator bool () const
 
AAMDNodes intersect (const AAMDNodes &Other) const
 Given two sets of AAMDNodes that apply to the same pointer, give the best AAMDNodes that are compatible with both (i.e.
 
AAMDNodes shift (size_t Offset) const
 Create a new AAMDNode that describes this AAMDNode after applying a constant offset to the start of the pointer.
 
AAMDNodes extendTo (ssize_t Len) const
 Create a new AAMDNode that describes this AAMDNode after extending it to apply to a series of bytes of length Len.
 
AAMDNodes merge (const AAMDNodes &Other) const
 Given two sets of AAMDNodes applying to potentially different locations, determine the best AAMDNodes that apply to both.
 
AAMDNodes concat (const AAMDNodes &Other) const
 Determine the best AAMDNodes after concatenating two different locations together.
 

Static Public Member Functions

static MDNodeshiftTBAA (MDNode *M, size_t off)
 
static MDNodeshiftTBAAStruct (MDNode *M, size_t off)
 
static MDNodeextendToTBAA (MDNode *TBAA, ssize_t len)
 

Public Attributes

MDNodeTBAA = nullptr
 The tag for type-based alias analysis.
 
MDNodeTBAAStruct = nullptr
 The tag for type-based alias analysis (tbaa struct).
 
MDNodeScope = nullptr
 The tag for alias scope specification (used with noalias).
 
MDNodeNoAlias = nullptr
 The tag specifying the noalias scope.
 

Detailed Description

A collection of metadata nodes that might be associated with a memory access used by the alias-analysis infrastructure.

Definition at line 738 of file Metadata.h.

Constructor & Destructor Documentation

◆ AAMDNodes() [1/2]

llvm::AAMDNodes::AAMDNodes ( )
explicitdefault

◆ AAMDNodes() [2/2]

llvm::AAMDNodes::AAMDNodes ( MDNode T,
MDNode TS,
MDNode S,
MDNode N 
)
inlineexplicit

Definition at line 740 of file Metadata.h.

Member Function Documentation

◆ concat()

AAMDNodes AAMDNodes::concat ( const AAMDNodes Other) const

Determine the best AAMDNodes after concatenating two different locations together.

Different from merge, where different locations should overlap each other, concat puts non-overlapping locations together.

Definition at line 530 of file TypeBasedAliasAnalysis.cpp.

References llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::intersect(), NoAlias, llvm::Other, and Scope.

Referenced by foldLoadsRecursive().

◆ extendTo()

AAMDNodes llvm::AAMDNodes::extendTo ( ssize_t  Len) const
inline

Create a new AAMDNode that describes this AAMDNode after extending it to apply to a series of bytes of length Len.

A size of -1 denotes an unknown size.

Definition at line 805 of file Metadata.h.

References extendToTBAA(), NoAlias, Scope, TBAA, and TBAAStruct.

◆ extendToTBAA()

MDNode * AAMDNodes::extendToTBAA ( MDNode TBAA,
ssize_t  len 
)
static

◆ intersect()

AAMDNodes llvm::AAMDNodes::intersect ( const AAMDNodes Other) const
inline

Given two sets of AAMDNodes that apply to the same pointer, give the best AAMDNodes that are compatible with both (i.e.

a set of nodes whose allowable aliasing conclusions are a subset of those allowable by both of the inputs). However, for efficiency reasons, do not create any new MDNodes.

Definition at line 781 of file Metadata.h.

References NoAlias, llvm::Other, Scope, TBAA, and TBAAStruct.

◆ merge()

AAMDNodes AAMDNodes::merge ( const AAMDNodes Other) const

◆ operator bool()

llvm::AAMDNodes::operator bool ( ) const
inlineexplicit

Definition at line 750 of file Metadata.h.

References NoAlias, Scope, TBAA, and TBAAStruct.

◆ operator!=()

bool llvm::AAMDNodes::operator!= ( const AAMDNodes A) const
inline

Definition at line 748 of file Metadata.h.

References A.

◆ operator==()

bool llvm::AAMDNodes::operator== ( const AAMDNodes A) const
inline

Definition at line 743 of file Metadata.h.

References A, NoAlias, Scope, TBAA, and TBAAStruct.

◆ shift()

AAMDNodes llvm::AAMDNodes::shift ( size_t  Offset) const
inline

Create a new AAMDNode that describes this AAMDNode after applying a constant offset to the start of the pointer.

Definition at line 792 of file Metadata.h.

References NoAlias, llvm::Offset, Scope, shiftTBAA(), shiftTBAAStruct(), TBAA, and TBAAStruct.

◆ shiftTBAA()

MDNode * AAMDNodes::shiftTBAA ( MDNode M,
size_t  off 
)
static

Definition at line 738 of file TypeBasedAliasAnalysis.cpp.

References isStructPathTBAA(), and llvm::Offset.

Referenced by shift().

◆ shiftTBAAStruct()

MDNode * AAMDNodes::shiftTBAAStruct ( MDNode M,
size_t  off 
)
static

Member Data Documentation

◆ NoAlias

MDNode* llvm::AAMDNodes::NoAlias = nullptr

◆ Scope

MDNode* llvm::AAMDNodes::Scope = nullptr

◆ TBAA

MDNode* llvm::AAMDNodes::TBAA = nullptr

◆ TBAAStruct

MDNode* llvm::AAMDNodes::TBAAStruct = nullptr

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