| 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" |
| 11 #include "src/compiler/ast-graph-builder.h" | 11 #include "src/compiler/ast-graph-builder.h" |
| 12 #include "src/compiler/basic-block-instrumentor.h" | 12 #include "src/compiler/basic-block-instrumentor.h" |
| 13 #include "src/compiler/bounds-check-lowering.h" |
| 13 #include "src/compiler/change-lowering.h" | 14 #include "src/compiler/change-lowering.h" |
| 14 #include "src/compiler/code-generator.h" | 15 #include "src/compiler/code-generator.h" |
| 15 #include "src/compiler/control-reducer.h" | 16 #include "src/compiler/control-reducer.h" |
| 16 #include "src/compiler/graph-replay.h" | 17 #include "src/compiler/graph-replay.h" |
| 17 #include "src/compiler/graph-visualizer.h" | 18 #include "src/compiler/graph-visualizer.h" |
| 18 #include "src/compiler/instruction.h" | 19 #include "src/compiler/instruction.h" |
| 19 #include "src/compiler/instruction-selector.h" | 20 #include "src/compiler/instruction-selector.h" |
| 20 #include "src/compiler/js-context-specialization.h" | 21 #include "src/compiler/js-context-specialization.h" |
| 21 #include "src/compiler/js-generic-lowering.h" | 22 #include "src/compiler/js-generic-lowering.h" |
| 22 #include "src/compiler/js-inlining.h" | 23 #include "src/compiler/js-inlining.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 420 |
| 420 struct ChangeLoweringPhase { | 421 struct ChangeLoweringPhase { |
| 421 static const char* phase_name() { return "change lowering"; } | 422 static const char* phase_name() { return "change lowering"; } |
| 422 | 423 |
| 423 void Run(PipelineData* data, Zone* temp_zone) { | 424 void Run(PipelineData* data, Zone* temp_zone) { |
| 424 SourcePositionTable::Scope pos(data->source_positions(), | 425 SourcePositionTable::Scope pos(data->source_positions(), |
| 425 SourcePosition::Unknown()); | 426 SourcePosition::Unknown()); |
| 426 Linkage linkage(data->graph_zone(), data->info()); | 427 Linkage linkage(data->graph_zone(), data->info()); |
| 427 ValueNumberingReducer vn_reducer(data->graph_zone()); | 428 ValueNumberingReducer vn_reducer(data->graph_zone()); |
| 428 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); | 429 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); |
| 429 ChangeLowering lowering(data->jsgraph(), &linkage); | 430 ChangeLowering change_lowering(data->jsgraph(), &linkage); |
| 431 BoundsCheckLowering bounds_check_lowering(data->jsgraph()); |
| 430 MachineOperatorReducer mach_reducer(data->jsgraph()); | 432 MachineOperatorReducer mach_reducer(data->jsgraph()); |
| 431 GraphReducer graph_reducer(data->graph(), temp_zone); | 433 GraphReducer graph_reducer(data->graph(), temp_zone); |
| 432 // TODO(titzer): Figure out if we should run all reducers at once here. | 434 // TODO(titzer): Figure out if we should run all reducers at once here. |
| 433 graph_reducer.AddReducer(&vn_reducer); | 435 graph_reducer.AddReducer(&vn_reducer); |
| 434 graph_reducer.AddReducer(&simple_reducer); | 436 graph_reducer.AddReducer(&simple_reducer); |
| 435 graph_reducer.AddReducer(&lowering); | 437 graph_reducer.AddReducer(&change_lowering); |
| 438 graph_reducer.AddReducer(&bounds_check_lowering); |
| 436 graph_reducer.AddReducer(&mach_reducer); | 439 graph_reducer.AddReducer(&mach_reducer); |
| 437 graph_reducer.ReduceGraph(); | 440 graph_reducer.ReduceGraph(); |
| 438 } | 441 } |
| 439 }; | 442 }; |
| 440 | 443 |
| 441 | 444 |
| 442 struct ControlReductionPhase { | 445 struct ControlReductionPhase { |
| 443 void Run(PipelineData* data, Zone* temp_zone) { | 446 void Run(PipelineData* data, Zone* temp_zone) { |
| 444 SourcePositionTable::Scope pos(data->source_positions(), | 447 SourcePositionTable::Scope pos(data->source_positions(), |
| 445 SourcePosition::Unknown()); | 448 SourcePosition::Unknown()); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 } | 1015 } |
| 1013 | 1016 |
| 1014 | 1017 |
| 1015 void Pipeline::TearDown() { | 1018 void Pipeline::TearDown() { |
| 1016 InstructionOperand::TearDownCaches(); | 1019 InstructionOperand::TearDownCaches(); |
| 1017 } | 1020 } |
| 1018 | 1021 |
| 1019 } // namespace compiler | 1022 } // namespace compiler |
| 1020 } // namespace internal | 1023 } // namespace internal |
| 1021 } // namespace v8 | 1024 } // namespace v8 |
| OLD | NEW |