clang
6.0.0
|
CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types. More...
#include "/work/www-prereleases/6.0.0/rc3/llvm.src/tools/clang/lib/CodeGen/CodeGenTBAA.h"
Public Member Functions | |
CodeGenTBAA (ASTContext &Ctx, llvm::Module &M, const CodeGenOptions &CGO, const LangOptions &Features, MangleContext &MContext) | |
~CodeGenTBAA () | |
llvm::MDNode * | getTypeInfo (QualType QTy) |
getTypeInfo - Get metadata used to describe accesses to objects of the given type. More... | |
TBAAAccessInfo | getVTablePtrAccessInfo (llvm::Type *VTablePtrType) |
getVTablePtrAccessInfo - Get the TBAA information that describes an access to a virtual table pointer. More... | |
llvm::MDNode * | getTBAAStructInfo (QualType QTy) |
getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of the given type. More... | |
llvm::MDNode * | getBaseTypeInfo (QualType QTy) |
getBaseTypeInfo - Get metadata that describes the given base access type. More... | |
llvm::MDNode * | getAccessTagInfo (TBAAAccessInfo Info) |
getAccessTagInfo - Get TBAA tag for a given memory access. More... | |
TBAAAccessInfo | mergeTBAAInfoForCast (TBAAAccessInfo SourceInfo, TBAAAccessInfo TargetInfo) |
mergeTBAAInfoForCast - Get merged TBAA information for the purpose of type casts. More... | |
TBAAAccessInfo | mergeTBAAInfoForConditionalOperator (TBAAAccessInfo InfoA, TBAAAccessInfo InfoB) |
mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the purpose of conditional operator. More... | |
CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types.
Definition at line 118 of file CodeGenTBAA.h.
CodeGenTBAA::CodeGenTBAA | ( | ASTContext & | Ctx, |
llvm::Module & | M, | ||
const CodeGenOptions & | CGO, | ||
const LangOptions & | Features, | ||
MangleContext & | MContext | ||
) |
Definition at line 33 of file CodeGenTBAA.cpp.
CodeGenTBAA::~CodeGenTBAA | ( | ) |
Definition at line 41 of file CodeGenTBAA.cpp.
llvm::MDNode * CodeGenTBAA::getAccessTagInfo | ( | TBAAAccessInfo | Info | ) |
getAccessTagInfo - Get TBAA tag for a given memory access.
Definition at line 342 of file CodeGenTBAA.cpp.
References clang::CodeGen::TBAAAccessInfo::AccessType, clang::CodeGen::TBAAAccessInfo::BaseType, clang::CodeGen::TBAAAccessInfo::isIncomplete(), clang::CodeGen::TBAAAccessInfo::isMayAlias(), clang::CodeGen::TBAAAccessInfo::Offset, and clang::CodeGen::TBAAAccessInfo::Size.
Referenced by getVTablePtrAccessInfo().
llvm::MDNode * CodeGenTBAA::getBaseTypeInfo | ( | QualType | QTy | ) |
getBaseTypeInfo - Get metadata that describes the given base access type.
Return null if the type is not suitable for use in TBAA access tags.
Definition at line 327 of file CodeGenTBAA.cpp.
References clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getTypePtr(), and isValidBaseType().
Referenced by getTBAAStructInfo(), and getTypeInfo().
llvm::MDNode * CodeGenTBAA::getTBAAStructInfo | ( | QualType | QTy | ) |
getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of the given type.
Definition at line 268 of file CodeGenTBAA.cpp.
References clang::RecordDecl::fields(), clang::ASTContext::getASTRecordLayout(), getBaseTypeInfo(), clang::ASTContext::getCanonicalType(), clang::RecordDecl::getDefinition(), clang::ASTRecordLayout::getFieldOffset(), clang::NamedDecl::getName(), clang::CharUnits::getQuantity(), getTypeInfo(), clang::CanQual< T >::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), Id, isValidBaseType(), clang::MangleContext::mangleTypeName(), Parent, clang::ASTContext::toCharUnitsFromBits(), and TypeHasMayAlias().
llvm::MDNode * CodeGenTBAA::getTypeInfo | ( | QualType | QTy | ) |
getTypeInfo - Get metadata used to describe accesses to objects of the given type.
Definition at line 188 of file CodeGenTBAA.cpp.
References getBaseTypeInfo(), clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getTypePtr(), isValidBaseType(), and TypeHasMayAlias().
Referenced by getTBAAStructInfo(), getVTablePtrAccessInfo(), and isValidBaseType().
TBAAAccessInfo CodeGenTBAA::getVTablePtrAccessInfo | ( | llvm::Type * | VTablePtrType | ) |
getVTablePtrAccessInfo - Get the TBAA information that describes an access to a virtual table pointer.
Definition at line 218 of file CodeGenTBAA.cpp.
References clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), getAccessTagInfo(), clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::ASTContext::getCharWidth(), clang::RecordDecl::getDefinition(), clang::ASTRecordLayout::getFieldOffset(), clang::CharUnits::getQuantity(), getTypeInfo(), clang::ASTContext::getTypeSizeInChars(), clang::RecordDecl::hasFlexibleArrayMember(), clang::CodeGen::MayAlias, and TypeHasMayAlias().
TBAAAccessInfo CodeGenTBAA::mergeTBAAInfoForCast | ( | TBAAAccessInfo | SourceInfo, |
TBAAAccessInfo | TargetInfo | ||
) |
mergeTBAAInfoForCast - Get merged TBAA information for the purpose of type casts.
Definition at line 370 of file CodeGenTBAA.cpp.
References clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CodeGen::TBAAAccessInfo::isMayAlias().
TBAAAccessInfo CodeGenTBAA::mergeTBAAInfoForConditionalOperator | ( | TBAAAccessInfo | InfoA, |
TBAAAccessInfo | InfoB | ||
) |
mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the purpose of conditional operator.
Definition at line 378 of file CodeGenTBAA.cpp.
References clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CodeGen::TBAAAccessInfo::isMayAlias().