summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/LevelRaise.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 00:19:45 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 00:19:45 +0000
commite4de22874e989e6dc39158034ab6dcbaa33f87a5 (patch)
treed424e9771cee34842e67bd021ce05a10f8a872a9 /llvm/lib/Transforms/LevelRaise.cpp
parent30d69a5af91f3a558f0fd6edaf569970bb95f135 (diff)
downloadbcm5719-llvm-e4de22874e989e6dc39158034ab6dcbaa33f87a5.tar.gz
bcm5719-llvm-e4de22874e989e6dc39158034ab6dcbaa33f87a5.zip
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage - Correct test ordering for GlobalValue subclass llvm-svn: 14943
Diffstat (limited to 'llvm/lib/Transforms/LevelRaise.cpp')
-rw-r--r--llvm/lib/Transforms/LevelRaise.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/LevelRaise.cpp b/llvm/lib/Transforms/LevelRaise.cpp
index 8e11bf3d451..24beee5a8be 100644
--- a/llvm/lib/Transforms/LevelRaise.cpp
+++ b/llvm/lib/Transforms/LevelRaise.cpp
@@ -528,8 +528,6 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
Constant *ConstantCallSrc = 0;
if (Constant *CS = dyn_cast<Constant>(CI->getCalledValue()))
ConstantCallSrc = CS;
- else if (GlobalValue *GV = dyn_cast<GlobalValue>(CI->getCalledValue()))
- ConstantCallSrc = ConstantPointerRef::get(GV);
if (ConstantCallSrc)
NewCast = ConstantExpr::getCast(ConstantCallSrc, NewPFunTy);
@@ -537,10 +535,6 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
NewCast = new CastInst(CI->getCalledValue(), NewPFunTy,
CI->getCalledValue()->getName()+"_c",CI);
- // Strip off unneeded CPR's.
- if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(NewCast))
- NewCast = CPR->getValue();
-
// Create a new call instruction...
CallInst *NewCall = new CallInst(NewCast,
std::vector<Value*>(CI->op_begin()+1, CI->op_end()));
OpenPOWER on IntegriCloud