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:
3cc86cc
)
Fix another instance where PHI nodes need special treatment.
author
Owen Anderson
<resistor@mac.com>
Tue, 13 Jun 2006 20:50:09 +0000
(20:50 +0000)
committer
Owen Anderson
<resistor@mac.com>
Tue, 13 Jun 2006 20:50:09 +0000
(20:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28774
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/LCSSA.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/LCSSA.cpp
b/lib/Transforms/Utils/LCSSA.cpp
index
37ab7ee
..
3c70f73
100644
(file)
--- a/
lib/Transforms/Utils/LCSSA.cpp
+++ b/
lib/Transforms/Utils/LCSSA.cpp
@@
-215,6
+215,12
@@
void LCSSA::processInstruction(Instruction* Instr,
for (Instruction::use_iterator UI = Instr->use_begin(), UE = Instr->use_end();
UI != UE; ++UI) {
Instruction* use = cast<Instruction>(*UI);
+ BasicBlock* UserBB = use->getParent();
+ if (PHINode* p = dyn_cast<PHINode>(use)) {
+ unsigned OperandNo = UI.getOperandNo();
+ UserBB = p->getIncomingBlock(OperandNo/2);
+ }
+
// Don't need to update uses within the loop body.
if (!inLoop(use->getParent()))
Uses.push_back(use);