LLVM 17.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) | |
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 MDNode * | shiftTBAA (MDNode *M, size_t off) |
static MDNode * | shiftTBAAStruct (MDNode *M, size_t off) |
static 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. | |
A collection of metadata nodes that might be associated with a memory access used by the alias-analysis infrastructure.
Definition at line 651 of file Metadata.h.
|
explicitdefault |
Definition at line 653 of file Metadata.h.
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 531 of file TypeBasedAliasAnalysis.cpp.
References llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::intersect(), NoAlias, llvm::Other, and Scope.
Referenced by foldLoadsRecursive().
|
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 718 of file Metadata.h.
References extendToTBAA(), NoAlias, Scope, TBAA, and TBAAStruct.
Definition at line 788 of file TypeBasedAliasAnalysis.cpp.
References llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), llvm::ConstantInt::equalsInt(), llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::ConstantInt::get(), llvm::MDNode::getContext(), llvm::ConstantInt::getType(), isStructPathTBAA(), and llvm::MDNode::operands().
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 694 of file Metadata.h.
References NoAlias, 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 522 of file TypeBasedAliasAnalysis.cpp.
References llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::getMostGenericTBAA(), llvm::MDNode::intersect(), NoAlias, llvm::Other, Scope, and TBAA.
Referenced by mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), and llvm::promoteLoopAccessesToScalars().
|
inlineexplicit |
Definition at line 663 of file Metadata.h.
References NoAlias, Scope, TBAA, and TBAAStruct.
Definition at line 661 of file Metadata.h.
References A.
Definition at line 656 of file Metadata.h.
References A, NoAlias, 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 705 of file Metadata.h.
References NoAlias, llvm::Offset, Scope, shiftTBAA(), shiftTBAAStruct(), TBAA, and TBAAStruct.
Definition at line 739 of file TypeBasedAliasAnalysis.cpp.
References isStructPathTBAA(), and llvm::Offset.
Referenced by shift().
Definition at line 758 of file TypeBasedAliasAnalysis.cpp.
References llvm::ConstantAsMetadata::get(), llvm::MDNode::get(), llvm::ConstantInt::get(), llvm::MDNode::getContext(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::ConstantInt::getType(), llvm::ConstantInt::getZExtValue(), llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::size().
Referenced by shift().
MDNode* llvm::AAMDNodes::NoAlias = nullptr |
The tag specifying the noalias scope.
Definition at line 677 of file Metadata.h.
Referenced by llvm::ScopedNoAliasAAResult::alias(), concat(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), llvm::ScopedNoAliasAAResult::getModRefInfo(), intersect(), merge(), operator bool(), operator==(), llvm::MachineMemOperand::print(), and shift().
MDNode* llvm::AAMDNodes::Scope = nullptr |
The tag for alias scope specification (used with noalias).
Definition at line 674 of file Metadata.h.
Referenced by llvm::ScopedNoAliasAAResult::alias(), concat(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), llvm::ScopedNoAliasAAResult::getModRefInfo(), intersect(), merge(), operator bool(), operator==(), llvm::MachineMemOperand::print(), and shift().
MDNode* llvm::AAMDNodes::TBAA = nullptr |
The tag for type-based alias analysis.
Definition at line 668 of file Metadata.h.
Referenced by llvm::TypeBasedAAResult::alias(), extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), llvm::TypeBasedAAResult::getModRefInfo(), llvm::TypeBasedAAResult::getModRefInfoMask(), intersect(), merge(), operator bool(), operator==(), llvm::MachineMemOperand::print(), and shift().
MDNode* llvm::AAMDNodes::TBAAStruct = nullptr |
The tag for type-based alias analysis (tbaa struct).
Definition at line 671 of file Metadata.h.
Referenced by extendTo(), llvm::DenseMapInfo< AAMDNodes >::getHashValue(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), intersect(), operator bool(), operator==(), and shift().