Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc |
| index 9de736b7795a880382e445ef12d624b5a4685a0f..a6e84895119a7d8b8a49cf5ba6bedea590ac189a 100644 |
| --- a/runtime/vm/flow_graph_optimizer.cc |
| +++ b/runtime/vm/flow_graph_optimizer.cc |
| @@ -626,7 +626,7 @@ static void EnsureSSATempIndex(FlowGraph* graph, |
| Definition* replacement) { |
| if ((replacement->ssa_temp_index() == -1) && |
| (defn->ssa_temp_index() != -1)) { |
| - replacement->set_ssa_temp_index(graph->alloc_ssa_temp_index()); |
| + graph->AllocateSSAIndexes(replacement); |
| } |
| } |
| @@ -838,7 +838,7 @@ static void UnboxPhi(PhiInstr* phi) { |
| if ((kSmiBits < 32) && |
| (unboxed == kTagged) && |
| phi->Type()->IsInt() && |
| - RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt32)) { |
| + RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt64)) { |
| // On 32-bit platforms conservatively unbox phis that: |
| // - are proven to be of type Int; |
| // - fit into 32bits range; |
|
regis
2015/10/06 17:37:24
update comment?
Florian Schneider
2015/10/07 09:44:11
Done.
regis
2015/10/07 17:23:38
Did not upload updated comment?
Florian Schneider
2015/10/08 09:39:26
Forgot at first. Added it in patchset #8.
|
| @@ -850,7 +850,7 @@ static void UnboxPhi(PhiInstr* phi) { |
| Definition* input = phi->InputAt(i)->definition(); |
| if (input->IsBox() && |
| RangeUtils::Fits(input->range(), |
| - RangeBoundary::kRangeBoundaryInt32)) { |
| + RangeBoundary::kRangeBoundaryInt64)) { |
| should_unbox = true; |
| } else if (!input->IsConstant()) { |
| should_unbox = false; |
| @@ -882,7 +882,9 @@ static void UnboxPhi(PhiInstr* phi) { |
| } |
| if (should_unbox) { |
| - unboxed = kUnboxedInt32; |
| + unboxed = |
| + RangeUtils::Fits(phi->range(), RangeBoundary::kRangeBoundaryInt32) |
| + ? kUnboxedInt32 : kUnboxedMint; |
| } |
| } |
| @@ -7073,7 +7075,7 @@ class LoadOptimizer : public ValueObject { |
| replacement->AddInputUse(input); |
| } |
| - phi->set_ssa_temp_index(graph_->alloc_ssa_temp_index()); |
| + graph_->AllocateSSAIndexes(phi); |
| phis_.Add(phi); // Postpone phi insertion until after load forwarding. |
| if (FLAG_trace_load_optimization) { |