| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index dc2e042a7305b0a24498473c529923a768aaacdd..63882a5080eb2442230c154a80d960f20f453fe5 100644
|
| --- a/runtime/vm/compiler.cc
|
| +++ b/runtime/vm/compiler.cc
|
| @@ -291,7 +291,14 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
|
| propagator.Propagate();
|
| DEBUG_ASSERT(flow_graph->VerifyUseLists());
|
| }
|
| - optimizer.Canonicalize();
|
| + if (optimizer.Canonicalize()) {
|
| + // To fully remove redundant boxing (e.g. BoxDouble used only in
|
| + // environments and UnboxDouble instructions) instruction we
|
| + // first need to replace all their uses and then fold them away.
|
| + // For now we just repeat Canonicalize twice to do that.
|
| + // TODO(vegorov): implement a separate representation folding pass.
|
| + optimizer.Canonicalize();
|
| + }
|
| DEBUG_ASSERT(flow_graph->VerifyUseLists());
|
|
|
| // Perform register allocation on the SSA graph.
|
|
|