LLVM: lib/Analysis/TypeBasedAliasAnalysis.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
static bool isStructPathTBAA (const MDNode *MD)
Check the first operand of the tbaa tag node, if it is a MDNode, we treat it as struct-path aware TBAA format, otherwise, we treat it as scalar TBAA format.
static bool matchAccessTags (const MDNode *A, const MDNode *B, const MDNode **GenericTag)
matchTags - Return true if the given couple of accesses are allowed to overlap.
static const MDNode * getLeastCommonType (const MDNode *A, const MDNode *B)
static const MDNode * createAccessTag (const MDNode *AccessType)
static bool hasField (TBAAStructTypeNode BaseType, TBAAStructTypeNode FieldType)
static bool mayBeAccessToSubobjectOf (TBAAStructTagNode BaseTag, TBAAStructTagNode SubobjectTag, const MDNode *CommonType, const MDNode **GenericTag, bool &MayAlias)
Return true if for two given accesses, one of the accessed objects may be a subobject of the other.
INITIALIZE_PASS (TypeBasedAAWrapperPass, "tbaa", "Type-Based Alias Analysis", false, true) ImmutablePass *llvm

createAccessTag()

getLeastCommonType()

Definition at line 483 of file TypeBasedAliasAnalysis.cpp.

References A, B, llvm::SetVector< T, Vector, Set, N >::insert(), llvm::report_fatal_error(), and llvm::SetVector< T, Vector, Set, N >::size().

Referenced by matchAccessTags().

hasField()

static bool hasField ( TBAAStructTypeNode BaseType, TBAAStructTypeNode FieldType ) static

INITIALIZE_PASS()

isStructPathTBAA()

Check the first operand of the tbaa tag node, if it is a MDNode, we treat it as struct-path aware TBAA format, otherwise, we treat it as scalar TBAA format.

Definition at line 369 of file TypeBasedAliasAnalysis.cpp.

References llvm::MDNode::getNumOperands(), and llvm::MDNode::getOperand().

Referenced by llvm::AAMDNodes::extendToTBAA(), llvm::TypeBasedAAResult::getMemoryEffects(), llvm::TypeBasedAAResult::getModRefInfoMask(), llvm::MDNode::isTBAAVtableAccess(), matchAccessTags(), and llvm::AAMDNodes::shiftTBAA().

matchAccessTags()

mayBeAccessToSubobjectOf()

static bool mayBeAccessToSubobjectOf ( TBAAStructTagNode BaseTag, TBAAStructTagNode SubobjectTag, const MDNode * CommonType, const MDNode ** GenericTag, bool & MayAlias ) static

Return true if for two given accesses, one of the accessed objects may be a subobject of the other.

The BaseTag and SubobjectTag parameters describe the accesses to the base object and the subobject respectively. CommonType must be the metadata node describing the common type of the accessed objects. On return, MayAlias is set to true iff these accesses may alias and Generic, if not null, points to the most generic access tag for the given two.

Definition at line 583 of file TypeBasedAliasAnalysis.cpp.

References assert(), createAccessTag(), and hasField().

Referenced by matchAccessTags().

EnableTBAA

cl::opt< bool > EnableTBAA("enable-tbaa", cl::init(true), cl::Hidden) ( "enable-tbaa" , cl::init(true) , cl::Hidden ) static