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 | 9c61abafb856367492d45c0ec2fb858d5014dbc5 (patch) | |
tree | 5355772ee91e6ae30d8073344496e2bac580fee5 /lib/CodeGen/CodeGenModule.h | |
parent | c64aa1bff66eaa08d18f0704502ac0b45610f218 (diff) | |
download | clang-9c61abafb856367492d45c0ec2fb858d5014dbc5.tar.gz |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 8b2fc8d2a8..33b622972d 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/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, |