Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 57a186280b1713b9d9c65d91d4dc6b7bed2bea0a..e725b38291ac06d49838a91e6c6d1346d1740d82 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1298,14 +1298,33 @@ void HPhi::InitRealUses(int phi_id) { |
for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
HValue* value = it.value(); |
if (!value->IsPhi()) { |
- Representation rep = value->RequiredInputRepresentation(it.index()); |
+ Representation rep = value->ObservedInputRepresentation(it.index()); |
non_phi_uses_[rep.kind()] += value->LoopWeight(); |
+ if (FLAG_trace_representation) { |
+ PrintF("%d %s is used by %d %s as %s\n", |
+ this->id(), |
+ this->Mnemonic(), |
+ value->id(), |
+ value->Mnemonic(), |
+ rep.Mnemonic()); |
+ } |
} |
} |
} |
void HPhi::AddNonPhiUsesFrom(HPhi* other) { |
+ if (FLAG_trace_representation) { |
+ PrintF("adding to %d %s uses of %d %s: i%d d%d t%d\n", |
+ this->id(), |
+ this->Mnemonic(), |
+ other->id(), |
+ other->Mnemonic(), |
+ other->non_phi_uses_[Representation::kInteger32], |
+ other->non_phi_uses_[Representation::kDouble], |
+ other->non_phi_uses_[Representation::kTagged]); |
+ } |
+ |
for (int i = 0; i < Representation::kNumRepresentations; i++) { |
indirect_uses_[i] += other->non_phi_uses_[i]; |
} |