| 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/change-lowering.h" | 13 #include "src/compiler/change-lowering.h" |
| 14 #include "src/compiler/code-generator.h" | 14 #include "src/compiler/code-generator.h" |
| 15 #include "src/compiler/control-reducer.h" | 15 #include "src/compiler/control-reducer.h" |
| 16 #include "src/compiler/graph-replay.h" | 16 #include "src/compiler/graph-replay.h" |
| 17 #include "src/compiler/graph-visualizer.h" | 17 #include "src/compiler/graph-visualizer.h" |
| 18 #include "src/compiler/instruction.h" | 18 #include "src/compiler/instruction.h" |
| 19 #include "src/compiler/instruction-selector.h" | 19 #include "src/compiler/instruction-selector.h" |
| 20 #include "src/compiler/js-context-specialization.h" | 20 #include "src/compiler/js-context-specialization.h" |
| 21 #include "src/compiler/js-generic-lowering.h" | 21 #include "src/compiler/js-generic-lowering.h" |
| 22 #include "src/compiler/js-inlining.h" | 22 #include "src/compiler/js-inlining.h" |
| 23 #include "src/compiler/js-typed-lowering.h" | 23 #include "src/compiler/js-typed-lowering.h" |
| 24 #include "src/compiler/machine-operator-reducer.h" | 24 #include "src/compiler/machine-operator-reducer.h" |
| 25 #include "src/compiler/pipeline-statistics.h" | 25 #include "src/compiler/pipeline-statistics.h" |
| 26 #include "src/compiler/register-allocator.h" | 26 #include "src/compiler/register-allocator.h" |
| 27 #include "src/compiler/schedule.h" | 27 #include "src/compiler/schedule.h" |
| 28 #include "src/compiler/scheduler.h" | 28 #include "src/compiler/scheduler.h" |
| 29 #include "src/compiler/select-lowering.h" |
| 29 #include "src/compiler/simplified-lowering.h" | 30 #include "src/compiler/simplified-lowering.h" |
| 30 #include "src/compiler/simplified-operator-reducer.h" | 31 #include "src/compiler/simplified-operator-reducer.h" |
| 31 #include "src/compiler/typer.h" | 32 #include "src/compiler/typer.h" |
| 32 #include "src/compiler/value-numbering-reducer.h" | 33 #include "src/compiler/value-numbering-reducer.h" |
| 33 #include "src/compiler/verifier.h" | 34 #include "src/compiler/verifier.h" |
| 34 #include "src/compiler/zone-pool.h" | 35 #include "src/compiler/zone-pool.h" |
| 35 #include "src/ostreams.h" | 36 #include "src/ostreams.h" |
| 36 #include "src/utils.h" | 37 #include "src/utils.h" |
| 37 | 38 |
| 38 namespace v8 { | 39 namespace v8 { |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 444 |
| 444 VerifyAndPrintGraph(data.graph(), "Late Control reduced"); | 445 VerifyAndPrintGraph(data.graph(), "Late Control reduced"); |
| 445 } | 446 } |
| 446 } | 447 } |
| 447 | 448 |
| 448 { | 449 { |
| 449 // Lower any remaining generic JSOperators. | 450 // Lower any remaining generic JSOperators. |
| 450 PhaseScope phase_scope(pipeline_statistics.get(), "generic lowering"); | 451 PhaseScope phase_scope(pipeline_statistics.get(), "generic lowering"); |
| 451 SourcePositionTable::Scope pos(data.source_positions(), | 452 SourcePositionTable::Scope pos(data.source_positions(), |
| 452 SourcePosition::Unknown()); | 453 SourcePosition::Unknown()); |
| 453 JSGenericLowering lowering(info(), data.jsgraph()); | 454 JSGenericLowering generic(info(), data.jsgraph()); |
| 455 SelectLowering select(data.jsgraph()->graph(), data.jsgraph()->common()); |
| 454 GraphReducer graph_reducer(data.graph()); | 456 GraphReducer graph_reducer(data.graph()); |
| 455 graph_reducer.AddReducer(&lowering); | 457 graph_reducer.AddReducer(&generic); |
| 458 graph_reducer.AddReducer(&select); |
| 456 graph_reducer.ReduceGraph(); | 459 graph_reducer.ReduceGraph(); |
| 457 | 460 |
| 458 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. | 461 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. |
| 459 VerifyAndPrintGraph(data.graph(), "Lowered generic", true); | 462 VerifyAndPrintGraph(data.graph(), "Lowered generic", true); |
| 460 } | 463 } |
| 461 | 464 |
| 462 if (!pipeline_statistics.is_empty()) { | 465 if (!pipeline_statistics.is_empty()) { |
| 463 pipeline_statistics->BeginPhaseKind("block building"); | 466 pipeline_statistics->BeginPhaseKind("block building"); |
| 464 } | 467 } |
| 465 | 468 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 } | 633 } |
| 631 | 634 |
| 632 | 635 |
| 633 void Pipeline::TearDown() { | 636 void Pipeline::TearDown() { |
| 634 InstructionOperand::TearDownCaches(); | 637 InstructionOperand::TearDownCaches(); |
| 635 } | 638 } |
| 636 | 639 |
| 637 } // namespace compiler | 640 } // namespace compiler |
| 638 } // namespace internal | 641 } // namespace internal |
| 639 } // namespace v8 | 642 } // namespace v8 |
| OLD | NEW |