summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-26 23:35:25 +0000
committerChris Lattner <sabre@nondot.org>2010-02-26 23:35:25 +0000
commitda5fcdace014f6cffa0160146f6d52a52577b131 (patch)
tree448ae5bf025ab82eef2494721437b66041638191 /llvm/lib/Transforms/IPO/GlobalOpt.cpp
parent6005bd821c0fe1290a5aaa1f00d6a6c762724f53 (diff)
downloadbcm5719-llvm-da5fcdace014f6cffa0160146f6d52a52577b131.tar.gz
bcm5719-llvm-da5fcdace014f6cffa0160146f6d52a52577b131.zip
remove dead code, by this point all uses of CI are gone.
llvm-svn: 97283
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalOpt.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 73a5504a314..2ba7ed9fe99 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -543,7 +543,7 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV, const TargetData &TD) {
if (NewGlobals.empty())
return 0;
-
+
DEBUG(dbgs() << "PERFORMING GLOBAL SRA ON: " << *GV);
Constant *NullInt =Constant::getNullValue(Type::getInt32Ty(GV->getContext()));
@@ -855,9 +855,6 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
}
}
- // Update Anything else that used the malloc or its bitcast now uses the global directly.
- CI->replaceAllUsesWith(new BitCastInst(NewGV, CI->getType(), "newgv", CI));
-
Constant *RepValue = NewGV;
if (NewGV->getType() != GV->getType()->getElementType())
RepValue = ConstantExpr::getBitCast(RepValue,
OpenPOWER on IntegriCloud