| 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 578 |
| 579 struct ReuseSpillSlotsPhase { | 579 struct ReuseSpillSlotsPhase { |
| 580 static const char* phase_name() { return "reuse spill slots"; } | 580 static const char* phase_name() { return "reuse spill slots"; } |
| 581 | 581 |
| 582 void Run(PipelineData* data, Zone* temp_zone) { | 582 void Run(PipelineData* data, Zone* temp_zone) { |
| 583 data->register_allocator()->ReuseSpillSlots(); | 583 data->register_allocator()->ReuseSpillSlots(); |
| 584 } | 584 } |
| 585 }; | 585 }; |
| 586 | 586 |
| 587 | 587 |
| 588 struct CommitAssignmentPhase { |
| 589 static const char* phase_name() { return "commit assignment"; } |
| 590 |
| 591 void Run(PipelineData* data, Zone* temp_zone) { |
| 592 data->register_allocator()->CommitAssignment(); |
| 593 } |
| 594 }; |
| 595 |
| 596 |
| 588 struct PopulatePointerMapsPhase { | 597 struct PopulatePointerMapsPhase { |
| 589 static const char* phase_name() { return "populate pointer maps"; } | 598 static const char* phase_name() { return "populate pointer maps"; } |
| 590 | 599 |
| 591 void Run(PipelineData* data, Zone* temp_zone) { | 600 void Run(PipelineData* data, Zone* temp_zone) { |
| 592 data->register_allocator()->PopulatePointerMaps(); | 601 data->register_allocator()->PopulatePointerMaps(); |
| 593 } | 602 } |
| 594 }; | 603 }; |
| 595 | 604 |
| 596 | 605 |
| 597 struct ConnectRangesPhase { | 606 struct ConnectRangesPhase { |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 return; | 1038 return; |
| 1030 } | 1039 } |
| 1031 Run<AllocateDoubleRegistersPhase>(); | 1040 Run<AllocateDoubleRegistersPhase>(); |
| 1032 if (!data->register_allocator()->AllocationOk()) { | 1041 if (!data->register_allocator()->AllocationOk()) { |
| 1033 data->set_compilation_failed(); | 1042 data->set_compilation_failed(); |
| 1034 return; | 1043 return; |
| 1035 } | 1044 } |
| 1036 if (FLAG_turbo_reuse_spill_slots) { | 1045 if (FLAG_turbo_reuse_spill_slots) { |
| 1037 Run<ReuseSpillSlotsPhase>(); | 1046 Run<ReuseSpillSlotsPhase>(); |
| 1038 } | 1047 } |
| 1048 Run<CommitAssignmentPhase>(); |
| 1039 Run<PopulatePointerMapsPhase>(); | 1049 Run<PopulatePointerMapsPhase>(); |
| 1040 Run<ConnectRangesPhase>(); | 1050 Run<ConnectRangesPhase>(); |
| 1041 Run<ResolveControlFlowPhase>(); | 1051 Run<ResolveControlFlowPhase>(); |
| 1042 Run<OptimizeMovesPhase>(); | 1052 Run<OptimizeMovesPhase>(); |
| 1043 | 1053 |
| 1044 if (FLAG_trace_turbo_graph) { | 1054 if (FLAG_trace_turbo_graph) { |
| 1045 OFStream os(stdout); | 1055 OFStream os(stdout); |
| 1046 PrintableInstructionSequence printable = {config, data->sequence()}; | 1056 PrintableInstructionSequence printable = {config, data->sequence()}; |
| 1047 os << "----- Instruction sequence after register allocation -----\n" | 1057 os << "----- Instruction sequence after register allocation -----\n" |
| 1048 << printable; | 1058 << printable; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1065 } | 1075 } |
| 1066 | 1076 |
| 1067 | 1077 |
| 1068 void Pipeline::TearDown() { | 1078 void Pipeline::TearDown() { |
| 1069 InstructionOperand::TearDownCaches(); | 1079 InstructionOperand::TearDownCaches(); |
| 1070 } | 1080 } |
| 1071 | 1081 |
| 1072 } // namespace compiler | 1082 } // namespace compiler |
| 1073 } // namespace internal | 1083 } // namespace internal |
| 1074 } // namespace v8 | 1084 } // namespace v8 |
| OLD | NEW |