15 #ifndef LLVM_CLANG_LIB_CODEGEN_CODEGENTBAA_H 16 #define LLVM_CLANG_LIB_CODEGEN_CODEGENTBAA_H 20 #include "llvm/ADT/DenseMap.h" 21 #include "llvm/IR/MDBuilder.h" 22 #include "llvm/IR/Metadata.h" 45 llvm::MDNode *AccessType, uint64_t
Offset, uint64_t Size)
46 : Kind(Kind), BaseType(BaseType), AccessType(AccessType),
47 Offset(Offset), Size(Size)
51 uint64_t
Offset, uint64_t Size)
89 return !(*
this == Other);
92 explicit operator bool()
const {
126 llvm::MDBuilder MDHelper;
130 llvm::DenseMap<const Type *, llvm::MDNode *> MetadataCache;
132 llvm::DenseMap<const Type *, llvm::MDNode *> BaseTypeMetadataCache;
134 llvm::DenseMap<TBAAAccessInfo, llvm::MDNode *> AccessTagMetadataCache;
138 llvm::DenseMap<const Type *, llvm::MDNode *> StructMetadataCache;
149 llvm::MDNode *getChar();
153 bool CollectFields(uint64_t BaseOffset,
160 llvm::MDNode *createScalarTypeNode(StringRef Name, llvm::MDNode *
Parent,
165 llvm::MDNode *getTypeInfoHelper(
const Type *Ty);
169 llvm::MDNode *getBaseTypeInfoHelper(
const Type *Ty);
178 llvm::MDNode *getTypeInfo(
QualType QTy);
186 llvm::MDNode *getTBAAStructInfo(
QualType QTy);
190 llvm::MDNode *getBaseTypeInfo(
QualType QTy);
215 static_cast<clang::CodeGen::TBAAAccessKind>(UnsignedKey),
225 static_cast<clang::CodeGen::TBAAAccessKind>(UnsignedKey),
233 auto KindValue =
static_cast<unsigned>(Val.
Kind);
A (possibly-)qualified type.
TBAAAccessInfo(llvm::MDNode *AccessType, uint64_t Size)
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
C Language Family Type Representation.
llvm::MDNode * AccessType
AccessType - The final access type.
TBAAAccessKind Kind
Kind - The kind of the access descriptor.
static bool isEqual(const clang::CodeGen::TBAAAccessInfo &LHS, const clang::CodeGen::TBAAAccessInfo &RHS)
The base class of the type hierarchy.
TBAAAccessInfo(TBAAAccessKind Kind, llvm::MDNode *BaseType, llvm::MDNode *AccessType, uint64_t Offset, uint64_t Size)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Describes a module or submodule.
bool isIncomplete() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
static TBAAAccessInfo getIncompleteInfo()
static DeltaTreeNode * getRoot(void *Root)
static clang::CodeGen::TBAAAccessInfo getTombstoneKey()
Exposes information about the current target.
The l-value was considered opaque, so the alignment was determined from a type.
bool operator==(const TBAAAccessInfo &Other) const
llvm::MDNode * BaseType
BaseType - The base/leading access type.
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
uint64_t Size
Size - The size of access, in bytes.
bool operator!=(const TBAAAccessInfo &Other) const
Dataflow Directional Tag Classes.
static clang::CodeGen::TBAAAccessInfo getEmptyKey()
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LL...
static unsigned getHashValue(const clang::CodeGen::TBAAAccessInfo &Val)
uint64_t Offset
Offset - The byte offset of the final access within the base one.
static TBAAAccessInfo getMayAliasInfo()
TBAAAccessInfo(llvm::MDNode *BaseType, llvm::MDNode *AccessType, uint64_t Offset, uint64_t Size)