| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index ff442dda9ec88a42c4bb7acdf19e6f9c40a0f88c..6022aa8e54c3de52b49db51f1967720d21029465 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -1032,6 +1032,13 @@ struct MemoryOptimizationPhase {
|
| static const char* phase_name() { return "memory optimization"; }
|
|
|
| void Run(PipelineData* data, Zone* temp_zone) {
|
| + // The memory optimizer requires the graphs to be trimmed, so trim now.
|
| + GraphTrimmer trimmer(temp_zone, data->graph());
|
| + NodeVector roots(temp_zone);
|
| + data->jsgraph()->GetCachedNodes(&roots);
|
| + trimmer.TrimGraph(roots.begin(), roots.end());
|
| +
|
| + // Optimize allocations and load/store operations.
|
| MemoryOptimizer optimizer(data->jsgraph(), temp_zone);
|
| optimizer.Optimize();
|
| }
|
|
|