summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGAtomic.cpp
diff options
context:
space:
mode:
authorIvan A. Kosarev <ikosarev@accesssoftek.com>2017-10-03 11:31:42 +0000
committerIvan A. Kosarev <ikosarev@accesssoftek.com>2017-10-03 11:31:42 +0000
commitc12b48ecb615c48065eafd1bc22addafb09912c6 (patch)
tree110cd072c46b34f3557031d3aecfc27ee3ffabdc /clang/lib/CodeGen/CGAtomic.cpp
parentb2b019f727728464c810fcd1eeee515cea5fc611 (diff)
downloadbcm5719-llvm-c12b48ecb615c48065eafd1bc22addafb09912c6.tar.gz
bcm5719-llvm-c12b48ecb615c48065eafd1bc22addafb09912c6.zip
[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 llvm-svn: 314784
Diffstat (limited to 'clang/lib/CodeGen/CGAtomic.cpp')
-rw-r--r--clang/lib/CodeGen/CGAtomic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp
index 73d76e35fd5..c03e06d571e 100644
--- a/clang/lib/CodeGen/CGAtomic.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud