projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[X86][Haswell][SchedModel] Add architecture specific scheduling models.
[oota-llvm.git]
/
lib
/
CodeGen
/
UnreachableBlockElim.cpp
diff --git
a/lib/CodeGen/UnreachableBlockElim.cpp
b/lib/CodeGen/UnreachableBlockElim.cpp
index 0476a1292f84ba3620701b563bcd38429e70f9d6..2e220820b9211d8c815a08f9663bd5dc3b0889bd 100644
(file)
--- a/
lib/CodeGen/UnreachableBlockElim.cpp
+++ b/
lib/CodeGen/UnreachableBlockElim.cpp
@@
-79,8
+79,8
@@
bool UnreachableBlockElim::runOnFunction(Function &F) {
PN->replaceAllUsesWith(Constant::getNullValue(PN->getType()));
BB->getInstList().pop_front();
}
PN->replaceAllUsesWith(Constant::getNullValue(PN->getType()));
BB->getInstList().pop_front();
}
- for (
BasicBlock *S : successors(BB)
)
-
S
->removePredecessor(BB);
+ for (
succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI
)
+
(*SI)
->removePredecessor(BB);
BB->dropAllReferences();
}
BB->dropAllReferences();
}