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/jump-threading.h" | 24 #include "src/compiler/jump-threading.h" |
| 25 #include "src/compiler/load-elimination.h" |
25 #include "src/compiler/machine-operator-reducer.h" | 26 #include "src/compiler/machine-operator-reducer.h" |
26 #include "src/compiler/move-optimizer.h" | 27 #include "src/compiler/move-optimizer.h" |
27 #include "src/compiler/pipeline-statistics.h" | 28 #include "src/compiler/pipeline-statistics.h" |
28 #include "src/compiler/register-allocator.h" | 29 #include "src/compiler/register-allocator.h" |
29 #include "src/compiler/register-allocator-verifier.h" | 30 #include "src/compiler/register-allocator-verifier.h" |
30 #include "src/compiler/schedule.h" | 31 #include "src/compiler/schedule.h" |
31 #include "src/compiler/scheduler.h" | 32 #include "src/compiler/scheduler.h" |
32 #include "src/compiler/select-lowering.h" | 33 #include "src/compiler/select-lowering.h" |
33 #include "src/compiler/simplified-lowering.h" | 34 #include "src/compiler/simplified-lowering.h" |
34 #include "src/compiler/simplified-operator-reducer.h" | 35 #include "src/compiler/simplified-operator-reducer.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 }; | 386 }; |
386 | 387 |
387 | 388 |
388 struct TypedLoweringPhase { | 389 struct TypedLoweringPhase { |
389 static const char* phase_name() { return "typed lowering"; } | 390 static const char* phase_name() { return "typed lowering"; } |
390 | 391 |
391 void Run(PipelineData* data, Zone* temp_zone) { | 392 void Run(PipelineData* data, Zone* temp_zone) { |
392 SourcePositionTable::Scope pos(data->source_positions(), | 393 SourcePositionTable::Scope pos(data->source_positions(), |
393 SourcePosition::Unknown()); | 394 SourcePosition::Unknown()); |
394 ValueNumberingReducer vn_reducer(temp_zone); | 395 ValueNumberingReducer vn_reducer(temp_zone); |
| 396 LoadElimination load_elimination; |
395 JSTypedLowering lowering(data->jsgraph()); | 397 JSTypedLowering lowering(data->jsgraph()); |
396 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); | 398 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); |
397 GraphReducer graph_reducer(data->graph(), temp_zone); | 399 GraphReducer graph_reducer(data->graph(), temp_zone); |
398 graph_reducer.AddReducer(&vn_reducer); | 400 graph_reducer.AddReducer(&vn_reducer); |
399 graph_reducer.AddReducer(&lowering); | 401 graph_reducer.AddReducer(&lowering); |
| 402 graph_reducer.AddReducer(&load_elimination); |
400 graph_reducer.AddReducer(&simple_reducer); | 403 graph_reducer.AddReducer(&simple_reducer); |
401 graph_reducer.ReduceGraph(); | 404 graph_reducer.ReduceGraph(); |
402 } | 405 } |
403 }; | 406 }; |
404 | 407 |
405 | 408 |
406 struct SimplifiedLoweringPhase { | 409 struct SimplifiedLoweringPhase { |
407 static const char* phase_name() { return "simplified lowering"; } | 410 static const char* phase_name() { return "simplified lowering"; } |
408 | 411 |
409 void Run(PipelineData* data, Zone* temp_zone) { | 412 void Run(PipelineData* data, Zone* temp_zone) { |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 } | 1031 } |
1029 | 1032 |
1030 | 1033 |
1031 void Pipeline::TearDown() { | 1034 void Pipeline::TearDown() { |
1032 InstructionOperand::TearDownCaches(); | 1035 InstructionOperand::TearDownCaches(); |
1033 } | 1036 } |
1034 | 1037 |
1035 } // namespace compiler | 1038 } // namespace compiler |
1036 } // namespace internal | 1039 } // namespace internal |
1037 } // namespace v8 | 1040 } // namespace v8 |
OLD | NEW |