diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-03 11:31:42 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-03 11:31:42 +0000 |
commit | 6292fe071a84f95f2d6cf0fd39c0c9715248316f (patch) | |
tree | c6c6d6944da01c55d1adaf3c84136a513f6a8584 | |
parent | 582ed924e54bfb0dbcdbab1c59e7b0d0092d4170 (diff) |
[CodeGen] Fix propagation of TBAA info for atomic accesses
This patch fixes clang to propagate complete TBAA information for
atomic accesses and not just the final access types. Prepared
against D38456 and requires it to be committed first.
This is part of D37826 reworked to be a separate patch to
simplify review.
Differential Revision: https://reviews.llvm.org/D38460
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314784 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGAtomic.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGAtomic.cpp b/lib/CodeGen/CGAtomic.cpp index 73d76e35fd..c03e06d571 100644 --- a/lib/CodeGen/CGAtomic.cpp +++ b/lib/CodeGen/CGAtomic.cpp @@ -98,7 +98,7 @@ namespace { LVal = LValue::MakeBitfield(Address(Addr, lvalue.getAlignment()), BFI, lvalue.getType(), lvalue.getBaseInfo()); - LVal.setTBAAAccessType(lvalue.getTBAAAccessType()); + LVal.setTBAAInfo(lvalue.getTBAAInfo()); AtomicTy = C.getIntTypeForBitwidth(AtomicSizeInBits, OrigBFI.IsSigned); if (AtomicTy.isNull()) { llvm::APInt Size( @@ -1692,8 +1692,8 @@ EmitAtomicUpdateValue(CodeGenFunction &CGF, AtomicInfo &Atomics, RValue OldRVal, DesiredAddr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(), AtomicLVal.getBaseInfo()); } - UpdateLVal.setTBAAAccessType(AtomicLVal.getTBAAAccessType()); - DesiredLVal.setTBAAAccessType(AtomicLVal.getTBAAAccessType()); + UpdateLVal.setTBAAInfo(AtomicLVal.getTBAAInfo()); + DesiredLVal.setTBAAInfo(AtomicLVal.getTBAAInfo()); UpRVal = CGF.EmitLoadOfLValue(UpdateLVal, SourceLocation()); } // Store new value in the corresponding memory area @@ -1789,7 +1789,7 @@ static void EmitAtomicUpdateValue(CodeGenFunction &CGF, AtomicInfo &Atomics, DesiredAddr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(), AtomicLVal.getBaseInfo()); } - DesiredLVal.setTBAAAccessType(AtomicLVal.getTBAAAccessType()); + DesiredLVal.setTBAAInfo(AtomicLVal.getTBAAInfo()); // Store new value in the corresponding memory area assert(UpdateRVal.isScalar()); CGF.EmitStoreThroughLValue(UpdateRVal, DesiredLVal); |