forked from OSchip/llvm-project
Don't pass false (default) for isVolatile parameter to CreateLoad.
llvm-svn: 90098
This commit is contained in:
parent
3efc050ac4
commit
c76493a65d
|
@ -291,7 +291,7 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) {
|
|||
(VD->getType().isObjCGCWeak() ? BLOCK_FIELD_IS_WEAK : 0);
|
||||
llvm::Value *Loc = LocalDeclMap[VD];
|
||||
Loc = Builder.CreateStructGEP(Loc, 1, "forwarding");
|
||||
Loc = Builder.CreateLoad(Loc, false);
|
||||
Loc = Builder.CreateLoad(Loc);
|
||||
Builder.CreateStore(Loc, Addr);
|
||||
++helpersize;
|
||||
continue;
|
||||
|
@ -331,7 +331,7 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) {
|
|||
"block.literal");
|
||||
Ty = llvm::PointerType::get(Ty, 0);
|
||||
Loc = Builder.CreateBitCast(Loc, Ty);
|
||||
Loc = Builder.CreateLoad(Loc, false);
|
||||
Loc = Builder.CreateLoad(Loc);
|
||||
// Loc = Builder.CreateBitCast(Loc, Ty);
|
||||
}
|
||||
Builder.CreateStore(Loc, Addr);
|
||||
|
@ -494,7 +494,7 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) {
|
|||
E->arg_begin(), E->arg_end());
|
||||
|
||||
// Load the function.
|
||||
llvm::Value *Func = Builder.CreateLoad(FuncPtr, false, "tmp");
|
||||
llvm::Value *Func = Builder.CreateLoad(FuncPtr, "tmp");
|
||||
|
||||
QualType ResultType = FnType->getAs<FunctionType>()->getResultType();
|
||||
|
||||
|
@ -551,9 +551,9 @@ llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const BlockDeclRefExpr *E) {
|
|||
const llvm::Type *Ty = PtrStructTy;
|
||||
Ty = llvm::PointerType::get(Ty, 0);
|
||||
V = Builder.CreateBitCast(V, Ty);
|
||||
V = Builder.CreateLoad(V, false);
|
||||
V = Builder.CreateLoad(V);
|
||||
V = Builder.CreateStructGEP(V, 1, "forwarding");
|
||||
V = Builder.CreateLoad(V, false);
|
||||
V = Builder.CreateLoad(V);
|
||||
V = Builder.CreateBitCast(V, PtrStructTy);
|
||||
V = Builder.CreateStructGEP(V, getByRefValueLLVMField(VD),
|
||||
VD->getNameAsString());
|
||||
|
|
|
@ -568,7 +568,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
|
|||
if (needsDispose && CGM.getLangOptions().getGCMode() != LangOptions::GCOnly) {
|
||||
DelayedCleanupBlock scope(*this);
|
||||
llvm::Value *V = Builder.CreateStructGEP(DeclPtr, 1, "forwarding");
|
||||
V = Builder.CreateLoad(V, false);
|
||||
V = Builder.CreateLoad(V);
|
||||
BuildBlockRelease(V);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,9 +312,12 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) {
|
|||
|
||||
llvm::Value *CodeGenFunction::EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
|
||||
QualType Ty) {
|
||||
llvm::Value *V = Builder.CreateLoad(Addr, Volatile, "tmp");
|
||||
llvm::LoadInst *Load = Builder.CreateLoad(Addr, "tmp");
|
||||
if (Volatile)
|
||||
Load->setVolatile(true);
|
||||
|
||||
// Bool can have different representation in memory than in registers.
|
||||
llvm::Value *V = Load;
|
||||
if (Ty->isBooleanType())
|
||||
if (V->getType() != llvm::Type::getInt1Ty(VMContext))
|
||||
V = Builder.CreateTrunc(V, llvm::Type::getInt1Ty(VMContext), "tobool");
|
||||
|
@ -867,7 +870,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
|
|||
|
||||
if (VD->hasAttr<BlocksAttr>()) {
|
||||
V = Builder.CreateStructGEP(V, 1, "forwarding");
|
||||
V = Builder.CreateLoad(V, false);
|
||||
V = Builder.CreateLoad(V);
|
||||
V = Builder.CreateStructGEP(V, getByRefValueLLVMField(VD),
|
||||
VD->getNameAsString());
|
||||
}
|
||||
|
|
|
@ -1015,7 +1015,7 @@ Value *ScalarExprEmitter::VisitBlockDeclRefExpr(const BlockDeclRefExpr *E) {
|
|||
llvm::Value *V = CGF.GetAddrOfBlockDecl(E);
|
||||
if (E->getType().isObjCGCWeak())
|
||||
return CGF.CGM.getObjCRuntime().EmitObjCWeakRead(CGF, V);
|
||||
return Builder.CreateLoad(V, false, "tmp");
|
||||
return Builder.CreateLoad(V, "tmp");
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -2993,7 +2993,7 @@ llvm::Value *CGObjCMac::EmitClassRef(CGBuilderTy &Builder,
|
|||
4, true);
|
||||
}
|
||||
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
}
|
||||
|
||||
llvm::Value *CGObjCMac::EmitSelector(CGBuilderTy &Builder, Selector Sel) {
|
||||
|
@ -3009,7 +3009,7 @@ llvm::Value *CGObjCMac::EmitSelector(CGBuilderTy &Builder, Selector Sel) {
|
|||
4, true);
|
||||
}
|
||||
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
}
|
||||
|
||||
llvm::Constant *CGObjCCommonMac::GetClassName(IdentifierInfo *Ident) {
|
||||
|
@ -4516,7 +4516,7 @@ llvm::Value *CGObjCNonFragileABIMac::GenerateProtocolRef(CGBuilderTy &Builder,
|
|||
|
||||
llvm::GlobalVariable *PTGV = CGM.getModule().getGlobalVariable(ProtocolName);
|
||||
if (PTGV)
|
||||
return Builder.CreateLoad(PTGV, false, "tmp");
|
||||
return Builder.CreateLoad(PTGV, "tmp");
|
||||
PTGV = new llvm::GlobalVariable(
|
||||
CGM.getModule(),
|
||||
Init->getType(), false,
|
||||
|
@ -4526,7 +4526,7 @@ llvm::Value *CGObjCNonFragileABIMac::GenerateProtocolRef(CGBuilderTy &Builder,
|
|||
PTGV->setSection("__DATA, __objc_protorefs, coalesced, no_dead_strip");
|
||||
PTGV->setVisibility(llvm::GlobalValue::HiddenVisibility);
|
||||
CGM.AddUsedGlobal(PTGV);
|
||||
return Builder.CreateLoad(PTGV, false, "tmp");
|
||||
return Builder.CreateLoad(PTGV, "tmp");
|
||||
}
|
||||
|
||||
/// GenerateCategory - Build metadata for a category implementation.
|
||||
|
@ -5031,8 +5031,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitIvarOffset(
|
|||
CodeGen::CodeGenFunction &CGF,
|
||||
const ObjCInterfaceDecl *Interface,
|
||||
const ObjCIvarDecl *Ivar) {
|
||||
return CGF.Builder.CreateLoad(ObjCIvarOffsetVariable(Interface, Ivar),
|
||||
false, "ivar");
|
||||
return CGF.Builder.CreateLoad(ObjCIvarOffsetVariable(Interface, Ivar),"ivar");
|
||||
}
|
||||
|
||||
CodeGen::RValue CGObjCNonFragileABIMac::EmitMessageSend(
|
||||
|
@ -5187,7 +5186,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitClassRef(CGBuilderTy &Builder,
|
|||
CGM.AddUsedGlobal(Entry);
|
||||
}
|
||||
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
}
|
||||
|
||||
llvm::Value *
|
||||
|
@ -5210,7 +5209,7 @@ CGObjCNonFragileABIMac::EmitSuperClassRef(CGBuilderTy &Builder,
|
|||
CGM.AddUsedGlobal(Entry);
|
||||
}
|
||||
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
}
|
||||
|
||||
/// EmitMetaClassRef - Return a Value * of the address of _class_t
|
||||
|
@ -5220,7 +5219,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitMetaClassRef(CGBuilderTy &Builder,
|
|||
const ObjCInterfaceDecl *ID) {
|
||||
llvm::GlobalVariable * &Entry = MetaClassReferences[ID->getIdentifier()];
|
||||
if (Entry)
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
|
||||
std::string MetaClassName(getMetaclassSymbolPrefix() + ID->getNameAsString());
|
||||
llvm::GlobalVariable *MetaClassGV = GetClassGlobal(MetaClassName);
|
||||
|
@ -5236,7 +5235,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitMetaClassRef(CGBuilderTy &Builder,
|
|||
Entry->setSection("__DATA, __objc_superrefs, regular, no_dead_strip");
|
||||
CGM.AddUsedGlobal(Entry);
|
||||
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
}
|
||||
|
||||
/// GetClass - Return a reference to the class for the given interface
|
||||
|
@ -5323,7 +5322,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitSelector(CGBuilderTy &Builder,
|
|||
CGM.AddUsedGlobal(Entry);
|
||||
}
|
||||
|
||||
return Builder.CreateLoad(Entry, false, "tmp");
|
||||
return Builder.CreateLoad(Entry, "tmp");
|
||||
}
|
||||
/// EmitObjCIvarAssign - Code gen for assigning to a __strong object.
|
||||
/// objc_assign_ivar (id src, id *dst, ptrdiff_t)
|
||||
|
|
Loading…
Reference in New Issue