Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_optimizer.cc (revision 33112) |
| +++ runtime/vm/flow_graph_optimizer.cc (working copy) |
| @@ -5624,7 +5624,6 @@ |
| result->id()); |
| } |
| } |
| - |
| phi_moves->CreateOutgoingMove(block->PredecessorAt(j), |
| result->id(), |
| place->id()); |
| @@ -5770,8 +5769,6 @@ |
| // Loads that are locally redundant will be replaced as we go through |
| // instructions. |
| void ComputeInitialSets() { |
| - BitVector* forwarded_loads = new BitVector(aliased_set_->max_place_id()); |
| - |
| for (BlockIterator block_it = graph_->reverse_postorder_iterator(); |
| !block_it.Done(); |
| block_it.Advance()) { |
| @@ -5930,12 +5927,6 @@ |
| (*out_values)[place_id] = defn; |
| } |
| - PhiPlaceMoves::MovesList phi_moves = |
| - aliased_set_->phi_moves()->GetOutgoingMoves(block); |
| - if (phi_moves != NULL) { |
| - PerformPhiMoves(phi_moves, gen, forwarded_loads); |
| - } |
| - |
| exposed_values_[preorder_number] = exposed_values; |
| out_values_[preorder_number] = out_values; |
| } |
| @@ -5972,6 +5963,7 @@ |
| void ComputeOutSets() { |
| BitVector* temp = new BitVector(aliased_set_->max_place_id()); |
| BitVector* forwarded_loads = new BitVector(aliased_set_->max_place_id()); |
| + BitVector* temp_out = new BitVector(aliased_set_->max_place_id()); |
| bool changed = true; |
| while (changed) { |
| @@ -6000,7 +5992,17 @@ |
| BlockEntryInstr* pred = block->PredecessorAt(i); |
| BitVector* pred_out = out_[pred->preorder_number()]; |
| if (pred_out != NULL) { |
|
Vyacheslav Egorov (Chromium)
2014/02/27 16:25:09
I would write it slightly differently:
if (pred_o
Florian Schneider
2014/02/28 13:38:57
Done.
|
| - temp->Intersect(pred_out); |
| + PhiPlaceMoves::MovesList phi_moves = |
| + aliased_set_->phi_moves()->GetOutgoingMoves(pred); |
| + if (phi_moves != NULL) { |
| + // If there are phi moves, perform intersection with |
| + // a copy of pred_out where the phi moves are applied. |
| + temp_out->CopyFrom(pred_out); |
| + PerformPhiMoves(phi_moves, temp_out, forwarded_loads); |
| + temp->Intersect(temp_out); |
| + } else { |
| + temp->Intersect(pred_out); |
| + } |
| } |
| } |
| } |
| @@ -6012,12 +6014,6 @@ |
| temp->RemoveAll(block_kill); |
| temp->AddAll(block_gen); |
| - PhiPlaceMoves::MovesList phi_moves = |
| - aliased_set_->phi_moves()->GetOutgoingMoves(block); |
| - if (phi_moves != NULL) { |
| - PerformPhiMoves(phi_moves, temp, forwarded_loads); |
| - } |
| - |
| if ((block_out == NULL) || !block_out->Equals(*temp)) { |
| if (block_out == NULL) { |
| block_out = out_[preorder_number] = |