| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/base/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 }; | 479 }; |
| 480 | 480 |
| 481 | 481 |
| 482 struct TypedLoweringPhase { | 482 struct TypedLoweringPhase { |
| 483 static const char* phase_name() { return "typed lowering"; } | 483 static const char* phase_name() { return "typed lowering"; } |
| 484 | 484 |
| 485 void Run(PipelineData* data, Zone* temp_zone) { | 485 void Run(PipelineData* data, Zone* temp_zone) { |
| 486 SourcePositionTable::Scope pos(data->source_positions(), | 486 SourcePositionTable::Scope pos(data->source_positions(), |
| 487 SourcePosition::Unknown()); | 487 SourcePosition::Unknown()); |
| 488 ValueNumberingReducer vn_reducer(temp_zone); | |
| 489 LoadElimination load_elimination; | 488 LoadElimination load_elimination; |
| 490 JSBuiltinReducer builtin_reducer(data->jsgraph()); | 489 JSBuiltinReducer builtin_reducer(data->jsgraph()); |
| 491 JSTypedLowering typed_lowering(data->jsgraph(), temp_zone); | 490 JSTypedLowering typed_lowering(data->jsgraph(), temp_zone); |
| 492 JSIntrinsicLowering intrinsic_lowering(data->jsgraph()); | 491 JSIntrinsicLowering intrinsic_lowering(data->jsgraph()); |
| 493 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); | 492 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); |
| 494 CommonOperatorReducer common_reducer(data->jsgraph()); | 493 CommonOperatorReducer common_reducer(data->jsgraph()); |
| 495 GraphReducer graph_reducer(data->graph(), temp_zone); | 494 GraphReducer graph_reducer(data->graph(), temp_zone); |
| 496 AddReducer(data, &graph_reducer, &vn_reducer); | |
| 497 AddReducer(data, &graph_reducer, &builtin_reducer); | 495 AddReducer(data, &graph_reducer, &builtin_reducer); |
| 498 AddReducer(data, &graph_reducer, &typed_lowering); | 496 AddReducer(data, &graph_reducer, &typed_lowering); |
| 499 AddReducer(data, &graph_reducer, &intrinsic_lowering); | 497 AddReducer(data, &graph_reducer, &intrinsic_lowering); |
| 500 AddReducer(data, &graph_reducer, &load_elimination); | 498 AddReducer(data, &graph_reducer, &load_elimination); |
| 501 AddReducer(data, &graph_reducer, &simple_reducer); | 499 AddReducer(data, &graph_reducer, &simple_reducer); |
| 502 AddReducer(data, &graph_reducer, &common_reducer); | 500 AddReducer(data, &graph_reducer, &common_reducer); |
| 503 graph_reducer.ReduceGraph(); | 501 graph_reducer.ReduceGraph(); |
| 504 } | 502 } |
| 505 }; | 503 }; |
| 506 | 504 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 | 1193 |
| 1196 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { | 1194 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { |
| 1197 TurboCfgFile tcf(data->isolate()); | 1195 TurboCfgFile tcf(data->isolate()); |
| 1198 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); | 1196 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); |
| 1199 } | 1197 } |
| 1200 } | 1198 } |
| 1201 | 1199 |
| 1202 } // namespace compiler | 1200 } // namespace compiler |
| 1203 } // namespace internal | 1201 } // namespace internal |
| 1204 } // namespace v8 | 1202 } // namespace v8 |
| OLD | NEW |