[llvm-commits] CVS: llvm/lib/Transforms/LevelRaise.cpp
LLVM
llvm at cs.uiuc.edu
Sat Jul 17 17:19:55 PDT 2004
Changes in directory llvm/lib/Transforms:
LevelRaise.cpp updated: 1.98 -> 1.99
---
Log message:
bug 122: http://llvm.cs.uiuc.edu/PR122 :
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct test ordering for GlobalValue subclass
---
Diffs of the changes: (+0 -6)
Index: llvm/lib/Transforms/LevelRaise.cpp
diff -u llvm/lib/Transforms/LevelRaise.cpp:1.98 llvm/lib/Transforms/LevelRaise.cpp:1.99
--- llvm/lib/Transforms/LevelRaise.cpp:1.98 Wed Jul 14 21:06:06 2004
+++ llvm/lib/Transforms/LevelRaise.cpp Sat Jul 17 19:19:45 2004
@@ -528,18 +528,12 @@
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);
else
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,
More information about the llvm-commits
mailing list