LLVM 22.0.0git
|
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, MDNode *NAS) | |
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. | |
LLVM_ABI AAMDNodes | merge (const AAMDNodes &Other) const |
Given two sets of AAMDNodes applying to potentially different locations, determine the best AAMDNodes that apply to both. | |
LLVM_ABI AAMDNodes | concat (const AAMDNodes &Other) const |
Determine the best AAMDNodes after concatenating two different locations together. | |
LLVM_ABI AAMDNodes | adjustForAccess (unsigned AccessSize) |
Create a new AAMDNode for accessing AccessSize bytes of this AAMDNode. | |
LLVM_ABI AAMDNodes | adjustForAccess (size_t Offset, Type *AccessTy, const DataLayout &DL) |
LLVM_ABI AAMDNodes | adjustForAccess (size_t Offset, unsigned AccessSize) |
Static Public Member Functions | |
static LLVM_ABI MDNode * | shiftTBAA (MDNode *M, size_t off) |
static LLVM_ABI MDNode * | shiftTBAAStruct (MDNode *M, size_t off) |
static LLVM_ABI MDNode * | extendToTBAA (MDNode *TBAA, ssize_t len) |
Public Attributes | |
MDNode * | TBAA = nullptr |
The tag for type-based alias analysis. | |
MDNode * | TBAAStruct = nullptr |
The tag for type-based alias analysis (tbaa struct). | |
MDNode * | Scope = nullptr |
The tag for alias scope specification (used with noalias). | |
MDNode * | NoAlias = nullptr |
The tag specifying the noalias scope. | |
MDNode * | NoAliasAddrSpace = nullptr |
The tag specifying the noalias address spaces. |
A collection of metadata nodes that might be associated with a memory access used by the alias-analysis infrastructure.
Definition at line 760 of file Metadata.h.
|
explicitdefault |
Referenced by adjustForAccess(), adjustForAccess(), adjustForAccess(), concat(), extendTo(), intersect(), merge(), operator!=(), operator==(), and shift().
|
inlineexplicit |
Definition at line 762 of file Metadata.h.
References N, NoAlias, NoAliasAddrSpace, Scope, T, TBAA, and TBAAStruct.
AAMDNodes AAMDNodes::adjustForAccess | ( | size_t | Offset, |
Type * | AccessTy, | ||
const DataLayout & | DL ) |
Definition at line 865 of file TypeBasedAliasAnalysis.cpp.
References AAMDNodes(), DL, llvm::Offset, shift(), and Size.
Definition at line 877 of file TypeBasedAliasAnalysis.cpp.
References AAMDNodes(), llvm::Offset, and shift().
Create a new AAMDNode for accessing AccessSize
bytes of this AAMDNode.
If this AAMDNode has !tbaa.struct and AccessSize
matches the size of the field at offset 0, get the TBAA tag describing the accessed field. If such an AAMDNode already embeds !tbaa, the existing one is retrieved. Finally, !tbaa.struct is zeroed out.
Definition at line 849 of file TypeBasedAliasAnalysis.cpp.
References AAMDNodes(), llvm::cast(), llvm::mdconst::extract(), llvm::mdconst::hasa(), and llvm::isa().
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 553 of file TypeBasedAliasAnalysis.cpp.
References AAMDNodes(), llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::getMostGenericNoaliasAddrspace(), llvm::MDNode::intersect(), NoAlias, NoAliasAddrSpace, llvm::Other, and Scope.
Referenced by foldLoadsRecursive(), and mergeConsecutivePartStores().
|
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 833 of file Metadata.h.
References AAMDNodes(), extendToTBAA(), NoAlias, NoAliasAddrSpace, Scope, TBAA, and TBAAStruct.
Definition at line 815 of file TypeBasedAliasAnalysis.cpp.
References llvm::ConstantInt::equalsInt(), llvm::mdconst::extract(), llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::MDNode::getContext(), llvm::Value::getType(), isStructPathTBAA(), llvm::MDNode::operands(), and llvm::Tag.
Referenced by extendTo().
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 806 of file Metadata.h.
References AAMDNodes(), NoAlias, NoAliasAddrSpace, llvm::Other, Scope, TBAA, and TBAAStruct.
Given two sets of AAMDNodes applying to potentially different locations, determine the best AAMDNodes that apply to both.
Definition at line 542 of file TypeBasedAliasAnalysis.cpp.
References AAMDNodes(), llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::getMostGenericNoaliasAddrspace(), llvm::MDNode::getMostGenericTBAA(), llvm::MDNode::intersect(), NoAlias, NoAliasAddrSpace, llvm::Other, Scope, and TBAA.
Referenced by mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), and llvm::promoteLoopAccessesToScalars().
|
inlineexplicit |
Definition at line 772 of file Metadata.h.
References NoAlias, NoAliasAddrSpace, Scope, TBAA, and TBAAStruct.
Definition at line 770 of file Metadata.h.
References A(), and AAMDNodes().
Definition at line 765 of file Metadata.h.
References A(), AAMDNodes(), NoAlias, NoAliasAddrSpace, Scope, TBAA, and TBAAStruct.
|
inline |
Create a new AAMDNode that describes this AAMDNode after applying a constant offset to the start of the pointer.
Definition at line 819 of file Metadata.h.
References AAMDNodes(), NoAlias, NoAliasAddrSpace, llvm::Offset, Scope, shiftTBAA(), shiftTBAAStruct(), TBAA, and TBAAStruct.
Referenced by adjustForAccess(), and adjustForAccess().
Definition at line 766 of file TypeBasedAliasAnalysis.cpp.
References isStructPathTBAA(), and llvm::Offset.
Referenced by shift().
Definition at line 785 of file TypeBasedAliasAnalysis.cpp.
References llvm::mdconst::extract(), llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::MDNode::getContext(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::Value::getType(), llvm::ConstantInt::getZExtValue(), llvm::Offset, llvm::size(), and llvm::Sub.
Referenced by shift().
MDNode* llvm::AAMDNodes::NoAlias = nullptr |
The tag specifying the noalias scope.
Definition at line 786 of file Metadata.h.
Referenced by AAMDNodes(), llvm::ScopedNoAliasAAResult::alias(), concat(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), intersect(), merge(), operator bool(), operator==(), and shift().
MDNode* llvm::AAMDNodes::NoAliasAddrSpace = nullptr |
The tag specifying the noalias address spaces.
Definition at line 789 of file Metadata.h.
Referenced by AAMDNodes(), concat(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), intersect(), merge(), operator bool(), operator==(), and shift().
MDNode* llvm::AAMDNodes::Scope = nullptr |
The tag for alias scope specification (used with noalias).
Definition at line 783 of file Metadata.h.
Referenced by AAMDNodes(), llvm::ScopedNoAliasAAResult::alias(), concat(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), intersect(), merge(), operator bool(), operator==(), and shift().
MDNode* llvm::AAMDNodes::TBAA = nullptr |
The tag for type-based alias analysis.
Definition at line 777 of file Metadata.h.
Referenced by AAMDNodes(), llvm::TypeBasedAAResult::alias(), collectMemAccessInfo(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), intersect(), merge(), operator bool(), operator==(), and shift().
MDNode* llvm::AAMDNodes::TBAAStruct = nullptr |
The tag for type-based alias analysis (tbaa struct).
Definition at line 780 of file Metadata.h.
Referenced by AAMDNodes(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), intersect(), operator bool(), operator==(), and shift().