class CodeGenTBAA
Declaration
class CodeGenTBAA { /* full declaration omitted */ };
Description
CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:116
Member Variables
- private clang::ASTContext& Context
- private llvm::Module& Module
- private const clang::CodeGenOptions& CodeGenOpts
- private const clang::LangOptions& Features
- private clang::MangleContext& MContext
- private llvm::MDBuilder MDHelper
- private llvm::DenseMap<const Type*, llvm::MDNode*> MetadataCache
- MetadataCache - This maps clang::Types to scalar llvm::MDNodes describing them.
- private llvm::DenseMap<const Type*, llvm::MDNode*> BaseTypeMetadataCache
- This maps clang::Types to a base access type in the type DAG.
- private llvm::DenseMap<TBAAAccessInfo, llvm::MDNode*> AccessTagMetadataCache
- This maps TBAA access descriptors to tag nodes.
- private llvm::DenseMap<const Type*, llvm::MDNode*> StructMetadataCache
- StructMetadataCache - This maps clang::Types to llvm::MDNodes describing them for struct assignments.
- private llvm::MDNode* Root
- private llvm::MDNode* Char
Method Overview
- public CodeGenTBAA(clang::ASTContext & Ctx, llvm::Module & M, const clang::CodeGenOptions & CGO, const clang::LangOptions & Features, clang::MangleContext & MContext)
- private bool CollectFields(uint64_t BaseOffset, clang::QualType Ty, SmallVectorImpl<llvm::MDBuilder::TBAAStructField> & Fields, bool MayAlias)
- private llvm::MDNode * createScalarTypeNode(llvm::StringRef Name, llvm::MDNode * Parent, uint64_t Size)
- public clang::CodeGen::TBAAAccessInfo getAccessInfo(clang::QualType AccessType)
- public llvm::MDNode * getAccessTagInfo(clang::CodeGen::TBAAAccessInfo Info)
- public llvm::MDNode * getBaseTypeInfo(clang::QualType QTy)
- private llvm::MDNode * getBaseTypeInfoHelper(const clang::Type * Ty)
- private llvm::MDNode * getChar()
- private llvm::MDNode * getRoot()
- public llvm::MDNode * getTBAAStructInfo(clang::QualType QTy)
- public llvm::MDNode * getTypeInfo(clang::QualType QTy)
- private llvm::MDNode * getTypeInfoHelper(const clang::Type * Ty)
- public clang::CodeGen::TBAAAccessInfo getVTablePtrAccessInfo(llvm::Type * VTablePtrType)
- public clang::CodeGen::TBAAAccessInfo mergeTBAAInfoForCast(clang::CodeGen::TBAAAccessInfo SourceInfo, clang::CodeGen::TBAAAccessInfo TargetInfo)
- public clang::CodeGen::TBAAAccessInfo mergeTBAAInfoForConditionalOperator(clang::CodeGen::TBAAAccessInfo InfoA, clang::CodeGen::TBAAAccessInfo InfoB)
- public clang::CodeGen::TBAAAccessInfo mergeTBAAInfoForMemoryTransfer(clang::CodeGen::TBAAAccessInfo DestInfo, clang::CodeGen::TBAAAccessInfo SrcInfo)
- public ~CodeGenTBAA()
Methods
¶CodeGenTBAA(clang::ASTContext& Ctx,
llvm::Module& M,
const clang::CodeGenOptions& CGO,
const clang::LangOptions& Features,
clang::MangleContext& MContext)
CodeGenTBAA(clang::ASTContext& Ctx,
llvm::Module& M,
const clang::CodeGenOptions& CGO,
const clang::LangOptions& Features,
clang::MangleContext& MContext)
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:170
Parameters
- clang::ASTContext& Ctx
- llvm::Module& M
- const clang::CodeGenOptions& CGO
- const clang::LangOptions& Features
- clang::MangleContext& MContext
¶bool CollectFields(
uint64_t BaseOffset,
clang::QualType Ty,
SmallVectorImpl<
llvm::MDBuilder::TBAAStructField>& Fields,
bool MayAlias)
bool CollectFields(
uint64_t BaseOffset,
clang::QualType Ty,
SmallVectorImpl<
llvm::MDBuilder::TBAAStructField>& Fields,
bool MayAlias)
Description
CollectFields - Collect information about the fields of a type for !tbaa.struct metadata formation. Return false for an unsupported type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:151
Parameters
- uint64_t BaseOffset
- clang::QualType Ty
- SmallVectorImpl<llvm::MDBuilder::TBAAStructField>& Fields
- bool MayAlias
¶llvm::MDNode* createScalarTypeNode(
llvm::StringRef Name,
llvm::MDNode* Parent,
uint64_t Size)
llvm::MDNode* createScalarTypeNode(
llvm::StringRef Name,
llvm::MDNode* Parent,
uint64_t Size)
Description
createScalarTypeNode - A wrapper function to create a metadata node describing a scalar type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:158
Parameters
- llvm::StringRef Name
- llvm::MDNode* Parent
- uint64_t Size
¶clang::CodeGen::TBAAAccessInfo getAccessInfo(
clang::QualType AccessType)
clang::CodeGen::TBAAAccessInfo getAccessInfo(
clang::QualType AccessType)
Description
getAccessInfo - Get TBAA information that describes an access to an object of the given type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:180
Parameters
- clang::QualType AccessType
¶llvm::MDNode* getAccessTagInfo(
clang::CodeGen::TBAAAccessInfo Info)
llvm::MDNode* getAccessTagInfo(
clang::CodeGen::TBAAAccessInfo Info)
Description
getAccessTagInfo - Get TBAA tag for a given memory access.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:195
Parameters
¶llvm::MDNode* getBaseTypeInfo(clang::QualType QTy)
llvm::MDNode* getBaseTypeInfo(clang::QualType QTy)
Description
getBaseTypeInfo - Get metadata that describes the given base access type. Return null if the type is not suitable for use in TBAA access tags.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:192
Parameters
- clang::QualType QTy
¶llvm::MDNode* getBaseTypeInfoHelper(
const clang::Type* Ty)
llvm::MDNode* getBaseTypeInfoHelper(
const clang::Type* Ty)
Description
getBaseTypeInfoHelper - An internal helper function to generate metadata used to describe accesses to objects of the given base type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:167
Parameters
- const clang::Type* Ty
¶llvm::MDNode* getChar()
llvm::MDNode* getChar()
Description
getChar - This is the mdnode for "char", which is special, and any types considered to be equivalent to it.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:147
¶llvm::MDNode* getRoot()
llvm::MDNode* getRoot()
Description
getRoot - This is the mdnode for the root of the metadata type graph for this translation unit.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:143
¶llvm::MDNode* getTBAAStructInfo(
clang::QualType QTy)
llvm::MDNode* getTBAAStructInfo(
clang::QualType QTy)
Description
getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of the given type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:188
Parameters
- clang::QualType QTy
¶llvm::MDNode* getTypeInfo(clang::QualType QTy)
llvm::MDNode* getTypeInfo(clang::QualType QTy)
Description
getTypeInfo - Get metadata used to describe accesses to objects of the given type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:176
Parameters
- clang::QualType QTy
¶llvm::MDNode* getTypeInfoHelper(
const clang::Type* Ty)
llvm::MDNode* getTypeInfoHelper(
const clang::Type* Ty)
Description
getTypeInfoHelper - An internal helper function to generate metadata used to describe accesses to objects of the given type.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:163
Parameters
- const clang::Type* Ty
¶clang::CodeGen::TBAAAccessInfo
getVTablePtrAccessInfo(llvm::Type* VTablePtrType)
clang::CodeGen::TBAAAccessInfo
getVTablePtrAccessInfo(llvm::Type* VTablePtrType)
Description
getVTablePtrAccessInfo - Get the TBAA information that describes an access to a virtual table pointer.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:184
Parameters
- llvm::Type* VTablePtrType
¶clang::CodeGen::TBAAAccessInfo
mergeTBAAInfoForCast(
clang::CodeGen::TBAAAccessInfo SourceInfo,
clang::CodeGen::TBAAAccessInfo TargetInfo)
clang::CodeGen::TBAAAccessInfo
mergeTBAAInfoForCast(
clang::CodeGen::TBAAAccessInfo SourceInfo,
clang::CodeGen::TBAAAccessInfo TargetInfo)
Description
mergeTBAAInfoForCast - Get merged TBAA information for the purpose of type casts.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:199
Parameters
- clang::CodeGen::TBAAAccessInfo SourceInfo
- clang::CodeGen::TBAAAccessInfo TargetInfo
¶clang::CodeGen::TBAAAccessInfo
mergeTBAAInfoForConditionalOperator(
clang::CodeGen::TBAAAccessInfo InfoA,
clang::CodeGen::TBAAAccessInfo InfoB)
clang::CodeGen::TBAAAccessInfo
mergeTBAAInfoForConditionalOperator(
clang::CodeGen::TBAAAccessInfo InfoA,
clang::CodeGen::TBAAAccessInfo InfoB)
Description
mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the purpose of conditional operator.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:204
Parameters
¶clang::CodeGen::TBAAAccessInfo
mergeTBAAInfoForMemoryTransfer(
clang::CodeGen::TBAAAccessInfo DestInfo,
clang::CodeGen::TBAAAccessInfo SrcInfo)
clang::CodeGen::TBAAAccessInfo
mergeTBAAInfoForMemoryTransfer(
clang::CodeGen::TBAAAccessInfo DestInfo,
clang::CodeGen::TBAAAccessInfo SrcInfo)
Description
mergeTBAAInfoForMemoryTransfer - Get merged TBAA information for the purpose of memory transfer calls.
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:209
Parameters
- clang::CodeGen::TBAAAccessInfo DestInfo
- clang::CodeGen::TBAAAccessInfo SrcInfo
¶~CodeGenTBAA()
~CodeGenTBAA()
Declared at: clang/lib/CodeGen/CodeGenTBAA.h:172