OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13a68e4
)
When asked not to delete useless PHIs, really don't delete them, no matter how
author
Owen Anderson
<resistor@mac.com>
Wed, 14 Jun 2006 04:43:14 +0000
(
04:43
+0000)
committer
Owen Anderson
<resistor@mac.com>
Wed, 14 Jun 2006 04:43:14 +0000
(
04:43
+0000)
redundant they are.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28777
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/BasicBlock.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/BasicBlock.cpp
b/lib/VMCore/BasicBlock.cpp
index
18a90d6
..
1b7100c
100644
(file)
--- a/
lib/VMCore/BasicBlock.cpp
+++ b/
lib/VMCore/BasicBlock.cpp
@@
-213,7
+213,8
@@
void BasicBlock::removePredecessor(BasicBlock *Pred,
PN->removeIncomingValue(Pred, false);
// If all incoming values to the Phi are the same, we can replace the Phi
// with that value.
- if (Value *PNV = PN->hasConstantValue()) {
+ Value* PNV = 0;
+ if (!DontDeleteUselessPHIs && (PNV = PN->hasConstantValue())) {
PN->replaceAllUsesWith(PNV);
PN->eraseFromParent();
}