| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index 81a00dd18aa7ef54a4b30871eaae4647be5f14fd..d71ade0ce01fb570f91d5ec5020b4a5254e05372 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -407,7 +407,8 @@
|
| class JSGraphReducer final : public GraphReducer {
|
| public:
|
| JSGraphReducer(JSGraph* jsgraph, Zone* zone)
|
| - : GraphReducer(zone, jsgraph->graph(), jsgraph->Dead()) {}
|
| + : GraphReducer(zone, jsgraph->graph(), jsgraph->TheHoleConstant(),
|
| + jsgraph->Dead()) {}
|
| ~JSGraphReducer() final {}
|
| };
|
|
|
| @@ -564,8 +565,6 @@
|
|
|
| void Run(PipelineData* data, Zone* temp_zone) {
|
| JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
|
| - DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
|
| - data->common());
|
| LoadElimination load_elimination(&graph_reducer);
|
| JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph());
|
| JSTypedLowering typed_lowering(&graph_reducer, data->jsgraph(), temp_zone);
|
| @@ -576,7 +575,6 @@
|
| : JSIntrinsicLowering::kDeoptimizationDisabled);
|
| CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
|
| data->common(), data->machine());
|
| - AddReducer(data, &graph_reducer, &dead_code_elimination);
|
| AddReducer(data, &graph_reducer, &builtin_reducer);
|
| AddReducer(data, &graph_reducer, &typed_lowering);
|
| AddReducer(data, &graph_reducer, &intrinsic_lowering);
|
| @@ -595,13 +593,10 @@
|
| data->source_positions());
|
| lowering.LowerAllNodes();
|
| JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
|
| - DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
|
| - data->common());
|
| ValueNumberingReducer vn_reducer(temp_zone);
|
| MachineOperatorReducer machine_reducer(data->jsgraph());
|
| CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
|
| data->common(), data->machine());
|
| - AddReducer(data, &graph_reducer, &dead_code_elimination);
|
| AddReducer(data, &graph_reducer, &vn_reducer);
|
| AddReducer(data, &graph_reducer, &machine_reducer);
|
| AddReducer(data, &graph_reducer, &common_reducer);
|
| @@ -626,18 +621,29 @@
|
|
|
| void Run(PipelineData* data, Zone* temp_zone) {
|
| JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
|
| - DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
|
| - data->common());
|
| ValueNumberingReducer vn_reducer(temp_zone);
|
| ChangeLowering lowering(data->jsgraph());
|
| MachineOperatorReducer machine_reducer(data->jsgraph());
|
| CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
|
| data->common(), data->machine());
|
| - AddReducer(data, &graph_reducer, &dead_code_elimination);
|
| AddReducer(data, &graph_reducer, &vn_reducer);
|
| AddReducer(data, &graph_reducer, &lowering);
|
| AddReducer(data, &graph_reducer, &machine_reducer);
|
| AddReducer(data, &graph_reducer, &common_reducer);
|
| + graph_reducer.ReduceGraph();
|
| + }
|
| +};
|
| +
|
| +
|
| +struct LateControlReductionPhase {
|
| + static const char* phase_name() { return "late control reduction"; }
|
| + void Run(PipelineData* data, Zone* temp_zone) {
|
| + GraphReducer graph_reducer(temp_zone, data->graph());
|
| + DeadCodeElimination dce(&graph_reducer, data->graph(), data->common());
|
| + CommonOperatorReducer common(&graph_reducer, data->graph(), data->common(),
|
| + data->machine());
|
| + graph_reducer.AddReducer(&dce);
|
| + graph_reducer.AddReducer(&common);
|
| graph_reducer.ReduceGraph();
|
| }
|
| };
|
|
|