[llvm-commits] [llvm] r49786 - in /llvm/branches/ggreif/use-diet/lib/Transforms: IPO/GlobalDCE.cpp IPO/IPConstantPropagation.cpp Scalar/DCE.cpp Scalar/InstructionCombining.cpp
Gabor Greif
ggreif at gmail.com
Wed Apr 16 03:46:59 PDT 2008
Author: ggreif
Date: Wed Apr 16 05:46:48 2008
New Revision: 49786
URL: http://llvm.org/viewvc/llvm-project?rev=49786&view=rev
Log:
back out r49697, it is not needed any more
Modified:
llvm/branches/ggreif/use-diet/lib/Transforms/IPO/GlobalDCE.cpp
llvm/branches/ggreif/use-diet/lib/Transforms/IPO/IPConstantPropagation.cpp
llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/DCE.cpp
llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/branches/ggreif/use-diet/lib/Transforms/IPO/GlobalDCE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Transforms/IPO/GlobalDCE.cpp?rev=49786&r1=49785&r2=49786&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Transforms/IPO/GlobalDCE.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Transforms/IPO/GlobalDCE.cpp Wed Apr 16 05:46:48 2008
@@ -158,9 +158,9 @@
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
// For all operands...
for (User::op_iterator U = I->op_begin(), E = I->op_end(); U != E; ++U)
- if (GlobalValue *GV = dyn_cast<GlobalValue>(U->get()))
+ if (GlobalValue *GV = dyn_cast<GlobalValue>(*U))
GlobalIsNeeded(GV);
- else if (Constant *C = dyn_cast<Constant>(U->get()))
+ else if (Constant *C = dyn_cast<Constant>(*U))
MarkUsedGlobalsAsNeeded(C);
}
}
Modified: llvm/branches/ggreif/use-diet/lib/Transforms/IPO/IPConstantPropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Transforms/IPO/IPConstantPropagation.cpp?rev=49786&r1=49785&r2=49786&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Transforms/IPO/IPConstantPropagation.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Transforms/IPO/IPConstantPropagation.cpp Wed Apr 16 05:46:48 2008
@@ -98,7 +98,7 @@
if (*AI == &F) return false; // Passes the function into itself
if (!ArgumentConstants[i].second) {
- if (Constant *C = dyn_cast<Constant>(AI->get())) {
+ if (Constant *C = dyn_cast<Constant>(*AI)) {
if (!ArgumentConstants[i].first)
ArgumentConstants[i].first = C;
else if (ArgumentConstants[i].first != C) {
Modified: llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/DCE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/DCE.cpp?rev=49786&r1=49785&r2=49786&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/DCE.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/DCE.cpp Wed Apr 16 05:46:48 2008
@@ -102,7 +102,7 @@
// go dead after this one is removed.
//
for (User::op_iterator OI = I->op_begin(), E = I->op_end(); OI != E; ++OI)
- if (Instruction *Used = dyn_cast<Instruction>(OI->get()))
+ if (Instruction *Used = dyn_cast<Instruction>(*OI))
WorkList.push_back(Used);
// Remove the instruction.
Modified: llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/InstructionCombining.cpp?rev=49786&r1=49785&r2=49786&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Transforms/Scalar/InstructionCombining.cpp Wed Apr 16 05:46:48 2008
@@ -8484,7 +8484,7 @@
// the call.
for (CallSite::arg_iterator I = CS.arg_begin()+FTy->getNumParams(),
E = CS.arg_end(); I != E; ++I)
- if (CastInst *CI = dyn_cast<CastInst>(I->get())) {
+ if (CastInst *CI = dyn_cast<CastInst>(*I)) {
// If this cast does not effect the value passed through the varargs
// area, we can eliminate the use of the cast.
Value *Op = CI->getOperand(0);
@@ -8575,7 +8575,7 @@
if (CallerPAL.getParamAttrs(i + 1) & ParamAttr::typeIncompatible(ParamTy))
return false; // Attribute not compatible with transformed value.
- ConstantInt *c = dyn_cast<ConstantInt>(AI->get());
+ ConstantInt *c = dyn_cast<ConstantInt>(*AI);
// Some conversions are safe even if we do not have a body.
// Either we can cast directly, or we can upconvert the argument
bool isConvertible = ActTy == ParamTy ||
More information about the llvm-commits
mailing list