|
@@ -96,9 +96,8 @@ namespace {
|
|
|
BFI.StorageSize = AtomicSizeInBits;
|
|
|
BFI.StorageOffset += OffsetInChars;
|
|
|
LVal = LValue::MakeBitfield(Address(Addr, lvalue.getAlignment()),
|
|
|
- BFI, lvalue.getType(),
|
|
|
- lvalue.getBaseInfo());
|
|
|
- LVal.setTBAAInfo(lvalue.getTBAAInfo());
|
|
|
+ BFI, lvalue.getType(), lvalue.getBaseInfo(),
|
|
|
+ lvalue.getTBAAInfo());
|
|
|
AtomicTy = C.getIntTypeForBitwidth(AtomicSizeInBits, OrigBFI.IsSigned);
|
|
|
if (AtomicTy.isNull()) {
|
|
|
llvm::APInt Size(
|
|
@@ -1346,15 +1345,15 @@ RValue AtomicInfo::convertAtomicTempToRValue(Address addr,
|
|
|
if (LVal.isBitField())
|
|
|
return CGF.EmitLoadOfBitfieldLValue(
|
|
|
LValue::MakeBitfield(addr, LVal.getBitFieldInfo(), LVal.getType(),
|
|
|
- LVal.getBaseInfo()), loc);
|
|
|
+ LVal.getBaseInfo(), TBAAAccessInfo()), loc);
|
|
|
if (LVal.isVectorElt())
|
|
|
return CGF.EmitLoadOfLValue(
|
|
|
LValue::MakeVectorElt(addr, LVal.getVectorIdx(), LVal.getType(),
|
|
|
- LVal.getBaseInfo()), loc);
|
|
|
+ LVal.getBaseInfo(), TBAAAccessInfo()), loc);
|
|
|
assert(LVal.isExtVectorElt());
|
|
|
return CGF.EmitLoadOfExtVectorElementLValue(LValue::MakeExtVectorElt(
|
|
|
addr, LVal.getExtVectorElts(), LVal.getType(),
|
|
|
- LVal.getBaseInfo()));
|
|
|
+ LVal.getBaseInfo(), TBAAAccessInfo()));
|
|
|
}
|
|
|
|
|
|
RValue AtomicInfo::ConvertIntToValueOrAtomic(llvm::Value *IntVal,
|
|
@@ -1670,29 +1669,30 @@ EmitAtomicUpdateValue(CodeGenFunction &CGF, AtomicInfo &Atomics, RValue OldRVal,
|
|
|
UpdateLVal =
|
|
|
LValue::MakeBitfield(Ptr, AtomicLVal.getBitFieldInfo(),
|
|
|
AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getBaseInfo(),
|
|
|
+ AtomicLVal.getTBAAInfo());
|
|
|
DesiredLVal =
|
|
|
LValue::MakeBitfield(DesiredAddr, AtomicLVal.getBitFieldInfo(),
|
|
|
- AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getType(), AtomicLVal.getBaseInfo(),
|
|
|
+ AtomicLVal.getTBAAInfo());
|
|
|
} else if (AtomicLVal.isVectorElt()) {
|
|
|
UpdateLVal = LValue::MakeVectorElt(Ptr, AtomicLVal.getVectorIdx(),
|
|
|
AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getBaseInfo(),
|
|
|
+ AtomicLVal.getTBAAInfo());
|
|
|
DesiredLVal = LValue::MakeVectorElt(
|
|
|
DesiredAddr, AtomicLVal.getVectorIdx(), AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getBaseInfo(), AtomicLVal.getTBAAInfo());
|
|
|
} else {
|
|
|
assert(AtomicLVal.isExtVectorElt());
|
|
|
UpdateLVal = LValue::MakeExtVectorElt(Ptr, AtomicLVal.getExtVectorElts(),
|
|
|
AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getBaseInfo(),
|
|
|
+ AtomicLVal.getTBAAInfo());
|
|
|
DesiredLVal = LValue::MakeExtVectorElt(
|
|
|
DesiredAddr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getBaseInfo(), AtomicLVal.getTBAAInfo());
|
|
|
}
|
|
|
- UpdateLVal.setTBAAInfo(AtomicLVal.getTBAAInfo());
|
|
|
- DesiredLVal.setTBAAInfo(AtomicLVal.getTBAAInfo());
|
|
|
UpRVal = CGF.EmitLoadOfLValue(UpdateLVal, SourceLocation());
|
|
|
}
|
|
|
// Store new value in the corresponding memory area
|
|
@@ -1775,20 +1775,19 @@ static void EmitAtomicUpdateValue(CodeGenFunction &CGF, AtomicInfo &Atomics,
|
|
|
if (AtomicLVal.isBitField()) {
|
|
|
DesiredLVal =
|
|
|
LValue::MakeBitfield(DesiredAddr, AtomicLVal.getBitFieldInfo(),
|
|
|
- AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getType(), AtomicLVal.getBaseInfo(),
|
|
|
+ AtomicLVal.getTBAAInfo());
|
|
|
} else if (AtomicLVal.isVectorElt()) {
|
|
|
DesiredLVal =
|
|
|
LValue::MakeVectorElt(DesiredAddr, AtomicLVal.getVectorIdx(),
|
|
|
- AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getType(), AtomicLVal.getBaseInfo(),
|
|
|
+ AtomicLVal.getTBAAInfo());
|
|
|
} else {
|
|
|
assert(AtomicLVal.isExtVectorElt());
|
|
|
DesiredLVal = LValue::MakeExtVectorElt(
|
|
|
DesiredAddr, AtomicLVal.getExtVectorElts(), AtomicLVal.getType(),
|
|
|
- AtomicLVal.getBaseInfo());
|
|
|
+ AtomicLVal.getBaseInfo(), AtomicLVal.getTBAAInfo());
|
|
|
}
|
|
|
- DesiredLVal.setTBAAInfo(AtomicLVal.getTBAAInfo());
|
|
|
// Store new value in the corresponding memory area
|
|
|
assert(UpdateRVal.isScalar());
|
|
|
CGF.EmitStoreThroughLValue(UpdateRVal, DesiredLVal);
|