| 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/adapters.h" | 10 #include "src/base/adapters.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "src/compiler/move-optimizer.h" | 37 #include "src/compiler/move-optimizer.h" |
| 38 #include "src/compiler/osr.h" | 38 #include "src/compiler/osr.h" |
| 39 #include "src/compiler/pipeline-statistics.h" | 39 #include "src/compiler/pipeline-statistics.h" |
| 40 #include "src/compiler/register-allocator.h" | 40 #include "src/compiler/register-allocator.h" |
| 41 #include "src/compiler/register-allocator-verifier.h" | 41 #include "src/compiler/register-allocator-verifier.h" |
| 42 #include "src/compiler/schedule.h" | 42 #include "src/compiler/schedule.h" |
| 43 #include "src/compiler/scheduler.h" | 43 #include "src/compiler/scheduler.h" |
| 44 #include "src/compiler/select-lowering.h" | 44 #include "src/compiler/select-lowering.h" |
| 45 #include "src/compiler/simplified-lowering.h" | 45 #include "src/compiler/simplified-lowering.h" |
| 46 #include "src/compiler/simplified-operator-reducer.h" | 46 #include "src/compiler/simplified-operator-reducer.h" |
| 47 #include "src/compiler/tail-call-optimization.h" |
| 47 #include "src/compiler/typer.h" | 48 #include "src/compiler/typer.h" |
| 48 #include "src/compiler/value-numbering-reducer.h" | 49 #include "src/compiler/value-numbering-reducer.h" |
| 49 #include "src/compiler/verifier.h" | 50 #include "src/compiler/verifier.h" |
| 50 #include "src/compiler/zone-pool.h" | 51 #include "src/compiler/zone-pool.h" |
| 51 #include "src/ostreams.h" | 52 #include "src/ostreams.h" |
| 52 #include "src/type-info.h" | 53 #include "src/type-info.h" |
| 53 #include "src/utils.h" | 54 #include "src/utils.h" |
| 54 | 55 |
| 55 namespace v8 { | 56 namespace v8 { |
| 56 namespace internal { | 57 namespace internal { |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 | 682 |
| 682 struct GenericLoweringPhase { | 683 struct GenericLoweringPhase { |
| 683 static const char* phase_name() { return "generic lowering"; } | 684 static const char* phase_name() { return "generic lowering"; } |
| 684 | 685 |
| 685 void Run(PipelineData* data, Zone* temp_zone) { | 686 void Run(PipelineData* data, Zone* temp_zone) { |
| 686 SourcePositionTable::Scope pos(data->source_positions(), | 687 SourcePositionTable::Scope pos(data->source_positions(), |
| 687 SourcePosition::Unknown()); | 688 SourcePosition::Unknown()); |
| 688 JSGenericLowering generic(data->info()->is_typing_enabled(), | 689 JSGenericLowering generic(data->info()->is_typing_enabled(), |
| 689 data->jsgraph()); | 690 data->jsgraph()); |
| 690 SelectLowering select(data->jsgraph()->graph(), data->jsgraph()->common()); | 691 SelectLowering select(data->jsgraph()->graph(), data->jsgraph()->common()); |
| 692 TailCallOptimization tco(data->common(), data->graph()); |
| 691 GraphReducer graph_reducer(data->graph(), temp_zone); | 693 GraphReducer graph_reducer(data->graph(), temp_zone); |
| 692 AddReducer(data, &graph_reducer, &generic); | 694 AddReducer(data, &graph_reducer, &generic); |
| 693 AddReducer(data, &graph_reducer, &select); | 695 AddReducer(data, &graph_reducer, &select); |
| 696 // TODO(turbofan): TCO is currently limited to stubs. |
| 697 if (data->info()->IsStub()) AddReducer(data, &graph_reducer, &tco); |
| 694 graph_reducer.ReduceGraph(); | 698 graph_reducer.ReduceGraph(); |
| 695 } | 699 } |
| 696 }; | 700 }; |
| 697 | 701 |
| 698 | 702 |
| 699 struct ComputeSchedulePhase { | 703 struct ComputeSchedulePhase { |
| 700 static const char* phase_name() { return "scheduling"; } | 704 static const char* phase_name() { return "scheduling"; } |
| 701 | 705 |
| 702 void Run(PipelineData* data, Zone* temp_zone) { | 706 void Run(PipelineData* data, Zone* temp_zone) { |
| 703 Schedule* schedule = Scheduler::ComputeSchedule( | 707 Schedule* schedule = Scheduler::ComputeSchedule( |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 tcf << AsC1VRegisterAllocationData("CodeGen", | 1348 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1345 data->register_allocation_data()); | 1349 data->register_allocation_data()); |
| 1346 } | 1350 } |
| 1347 | 1351 |
| 1348 data->DeleteRegisterAllocationZone(); | 1352 data->DeleteRegisterAllocationZone(); |
| 1349 } | 1353 } |
| 1350 | 1354 |
| 1351 } // namespace compiler | 1355 } // namespace compiler |
| 1352 } // namespace internal | 1356 } // namespace internal |
| 1353 } // namespace v8 | 1357 } // namespace v8 |
| OLD | NEW |