diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-05 11:05:43 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-05 11:05:43 +0000 |
commit | afc074cc4149d8e16230fc0870458ed455c5e3ba (patch) | |
tree | b5662b30e602ab0041638809dac208cd825007b4 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 6fa20cfea320bfcc45e7fa70a2ead481df8a4ce8 (diff) | |
download | bcm5719-llvm-afc074cc4149d8e16230fc0870458ed455c5e3ba.tar.gz bcm5719-llvm-afc074cc4149d8e16230fc0870458ed455c5e3ba.zip |
Revert r314977 "[CodeGen] Unify generation of scalar and struct-path TBAA tags"
D37826 has been mistakenly committed where it should be the patch from D38503.
Differential Revision: https://reviews.llvm.org/D38503
llvm-svn: 314978
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 8b2fc8d2a8c..33b622972d9 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -656,36 +656,28 @@ public: /// the given type. llvm::MDNode *getTBAATypeInfo(QualType QTy); - /// getTBAAAccessInfo - Get TBAA information that describes an access to - /// an object of the given type. - TBAAAccessInfo getTBAAAccessInfo(QualType AccessType); - - /// getTBAAVTablePtrAccessInfo - Get the TBAA information that describes an - /// access to a virtual table pointer. - TBAAAccessInfo getTBAAVTablePtrAccessInfo(); - + llvm::MDNode *getTBAAInfoForVTablePtr(); llvm::MDNode *getTBAAStructInfo(QualType QTy); - /// getTBAABaseTypeMetadata - Get metadata that describes the given base - /// access type. Return null if the type is not suitable for use in TBAA - /// access tags. - llvm::MDNode *getTBAABaseTypeInfo(QualType QTy); - - /// getTBAAAccessTagInfo - Get TBAA tag for a given memory access. - llvm::MDNode *getTBAAAccessTagInfo(TBAAAccessInfo Info); + /// Get path-aware TBAA tag for a given memory access. + llvm::MDNode *getTBAAStructTagInfo(TBAAAccessInfo Info); - /// getTBAAMayAliasAccessInfo - Get TBAA information that represents + /// getTBAAMayAliasTypeInfo - Get TBAA information that represents /// may-alias accesses. - TBAAAccessInfo getTBAAMayAliasAccessInfo(); + llvm::MDNode *getTBAAMayAliasTypeInfo(); bool isTypeConstant(QualType QTy, bool ExcludeCtorDtor); bool isPaddedAtomicType(QualType type); bool isPaddedAtomicType(const AtomicType *type); - /// DecorateInstructionWithTBAA - Decorate the instruction with a TBAA tag. + /// Decorate the instruction with a TBAA tag. For scalar TBAA, the tag + /// is the same as the type. For struct-path aware TBAA, the tag + /// is different from the type: base type, access type and offset. + /// When ConvertTypeToTag is true, we create a tag based on the scalar type. void DecorateInstructionWithTBAA(llvm::Instruction *Inst, - TBAAAccessInfo TBAAInfo); + llvm::MDNode *TBAAInfo, + bool ConvertTypeToTag = true); /// Adds !invariant.barrier !tag to instruction void DecorateInstructionWithInvariantGroup(llvm::Instruction *I, |