aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/LevelRaise.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-04 08:12:53 +0000
committerChris Lattner <sabre@nondot.org>2001-12-04 08:12:53 +0000
commit4b770a3145378bd5436b35dc52cce4e2d2868ea0 (patch)
treec31698df474fb9a864cbe711eedb2365df46b71b /lib/Transforms/LevelRaise.cpp
parent621c9920c7343d2a74e2541871a1e56da41781dc (diff)
Remove printouts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r--lib/Transforms/LevelRaise.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp
index ff16f7df0e..bf80c2d72c 100644
--- a/lib/Transforms/LevelRaise.cpp
+++ b/lib/Transforms/LevelRaise.cpp
@@ -505,7 +505,9 @@ static bool DoInsertArrayCast(Value *V, BasicBlock *BB,
new CastInst(Constant::getNullConstant(V->getType()), DestTy, V->getName());
BB->getInstList().insert(InsertBefore, TheCast);
+#ifdef DEBUG_PEEPHOLE_INSTS
cerr << "Inserting cast for " << V << endl;
+#endif
// Convert users of the old value over to use the cast result...
ValueMapCache VMC;
@@ -514,7 +516,9 @@ static bool DoInsertArrayCast(Value *V, BasicBlock *BB,
// The cast is the only thing that is allowed to reference the value...
TheCast->setOperand(0, V);
+#ifdef DEBUG_PEEPHOLE_INSTS
cerr << "Inserted ptr-array cast: " << TheCast;
+#endif
return true; // Made a change!
}
@@ -560,11 +564,12 @@ bool RaisePointerReferences::doit(Method *M) {
// arrays...
//
bool Changed = false, LocalChange;
- do {
- LocalChange = DoInsertArrayCasts(M);
+ Changed |= DoInsertArrayCasts(M);
+ do {
// Iterate over the method, refining it, until it converges on a stable
// state
+ bool LocalChange = false;
while (DoRaisePass(M)) LocalChange = true;
Changed |= LocalChange;