aboutsummaryrefslogtreecommitdiff
path: root/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
commitd02fccfdb878436215054f79a8dc8d81aad6b915 (patch)
tree8ca2b3162a4ec583937cc59bb8e6f20e0571dc81 /lib/Transforms/LevelRaise.cpp
parente840434755e2165ac20ec55e9d5ff3d2defac2d2 (diff)
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage - Correct test ordering for GlobalValue subclass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r--lib/Transforms/LevelRaise.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp
index 8e11bf3d45..24beee5a8b 100644
--- a/lib/Transforms/LevelRaise.cpp
+++ b/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()));