Index: src/hydrogen-gvn.cc |
diff --git a/src/hydrogen-gvn.cc b/src/hydrogen-gvn.cc |
index b27b86f14b623da9a96cc395fe21219d64b8c031..d9dd740c34a03f4ed432eda35c6fdd107fd7ea63 100644 |
--- a/src/hydrogen-gvn.cc |
+++ b/src/hydrogen-gvn.cc |
@@ -397,17 +397,16 @@ void HGlobalValueNumberer::ComputeBlockSideEffects() { |
for (int i = graph_->blocks()->length() - 1; i >= 0; --i) { |
// Compute side effects for the block. |
HBasicBlock* block = graph_->blocks()->at(i); |
- HInstruction* instr = block->first(); |
int id = block->block_id(); |
GVNFlagSet side_effects; |
- while (instr != NULL) { |
+ for (HInstructionIterator it(block); !it.Done(); it.Advance()) { |
+ HInstruction* instr = it.Current(); |
side_effects.Add(instr->ChangesFlags()); |
if (instr->IsSoftDeoptimize()) { |
block_side_effects_[id].RemoveAll(); |
side_effects.RemoveAll(); |
break; |
} |
- instr = instr->next(); |
} |
block_side_effects_[id].Add(side_effects); |