Simplify the interface to local DCE and Constant prop
llvm-svn: 2749
diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp
index 2c9c8b3..fa2392f 100644
--- a/llvm/lib/Transforms/Scalar/DCE.cpp
+++ b/llvm/lib/Transforms/Scalar/DCE.cpp
@@ -32,7 +32,7 @@
BasicBlock::InstListType &Vals = BB->getInstList();
bool Changed = false;
for (BasicBlock::iterator DI = Vals.begin(); DI != Vals.end(); )
- if (dceInstruction(Vals, DI)) {
+ if (dceInstruction(DI)) {
Changed = true;
++DIEEliminated;
} else
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 3be163c..2e5adf6 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -184,7 +184,7 @@
visit(BB->begin()[i]);
BasicBlock::iterator It = BB->begin()+i;
- if (dceInstruction(BB->getInstList(), It))
+ if (dceInstruction(It))
Changed = true;
else
++i;