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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 | 730 |
731 struct CommitAssignmentPhase { | 731 struct CommitAssignmentPhase { |
732 static const char* phase_name() { return "commit assignment"; } | 732 static const char* phase_name() { return "commit assignment"; } |
733 | 733 |
734 void Run(PipelineData* data, Zone* temp_zone) { | 734 void Run(PipelineData* data, Zone* temp_zone) { |
735 data->register_allocator()->CommitAssignment(); | 735 data->register_allocator()->CommitAssignment(); |
736 } | 736 } |
737 }; | 737 }; |
738 | 738 |
739 | 739 |
740 struct PopulatePointerMapsPhase { | 740 struct PopulateReferenceMapsPhase { |
741 static const char* phase_name() { return "populate pointer maps"; } | 741 static const char* phase_name() { return "populate pointer maps"; } |
742 | 742 |
743 void Run(PipelineData* data, Zone* temp_zone) { | 743 void Run(PipelineData* data, Zone* temp_zone) { |
744 data->register_allocator()->PopulatePointerMaps(); | 744 data->register_allocator()->PopulateReferenceMaps(); |
745 } | 745 } |
746 }; | 746 }; |
747 | 747 |
748 | 748 |
749 struct ConnectRangesPhase { | 749 struct ConnectRangesPhase { |
750 static const char* phase_name() { return "connect ranges"; } | 750 static const char* phase_name() { return "connect ranges"; } |
751 | 751 |
752 void Run(PipelineData* data, Zone* temp_zone) { | 752 void Run(PipelineData* data, Zone* temp_zone) { |
753 data->register_allocator()->ConnectRanges(); | 753 data->register_allocator()->ConnectRanges(); |
754 } | 754 } |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 << printable; | 1210 << printable; |
1211 } | 1211 } |
1212 if (verifier != nullptr) { | 1212 if (verifier != nullptr) { |
1213 CHECK(!data->register_allocator()->ExistsUseWithoutDefinition()); | 1213 CHECK(!data->register_allocator()->ExistsUseWithoutDefinition()); |
1214 } | 1214 } |
1215 Run<AllocateGeneralRegistersPhase>(); | 1215 Run<AllocateGeneralRegistersPhase>(); |
1216 Run<AllocateDoubleRegistersPhase>(); | 1216 Run<AllocateDoubleRegistersPhase>(); |
1217 Run<AssignSpillSlotsPhase>(); | 1217 Run<AssignSpillSlotsPhase>(); |
1218 | 1218 |
1219 Run<CommitAssignmentPhase>(); | 1219 Run<CommitAssignmentPhase>(); |
1220 Run<PopulatePointerMapsPhase>(); | 1220 Run<PopulateReferenceMapsPhase>(); |
1221 Run<ConnectRangesPhase>(); | 1221 Run<ConnectRangesPhase>(); |
1222 Run<ResolveControlFlowPhase>(); | 1222 Run<ResolveControlFlowPhase>(); |
1223 if (FLAG_turbo_move_optimization) { | 1223 if (FLAG_turbo_move_optimization) { |
1224 Run<OptimizeMovesPhase>(); | 1224 Run<OptimizeMovesPhase>(); |
1225 } | 1225 } |
1226 | 1226 |
1227 if (FLAG_trace_turbo_graph) { | 1227 if (FLAG_trace_turbo_graph) { |
1228 OFStream os(stdout); | 1228 OFStream os(stdout); |
1229 PrintableInstructionSequence printable = {config, data->sequence()}; | 1229 PrintableInstructionSequence printable = {config, data->sequence()}; |
1230 os << "----- Instruction sequence after register allocation -----\n" | 1230 os << "----- Instruction sequence after register allocation -----\n" |
1231 << printable; | 1231 << printable; |
1232 } | 1232 } |
1233 | 1233 |
1234 if (verifier != nullptr) { | 1234 if (verifier != nullptr) { |
1235 verifier->VerifyAssignment(); | 1235 verifier->VerifyAssignment(); |
1236 verifier->VerifyGapMoves(); | 1236 verifier->VerifyGapMoves(); |
1237 } | 1237 } |
1238 | 1238 |
1239 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { | 1239 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { |
1240 TurboCfgFile tcf(data->isolate()); | 1240 TurboCfgFile tcf(data->isolate()); |
1241 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); | 1241 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); |
1242 } | 1242 } |
1243 } | 1243 } |
1244 | 1244 |
1245 } // namespace compiler | 1245 } // namespace compiler |
1246 } // namespace internal | 1246 } // namespace internal |
1247 } // namespace v8 | 1247 } // namespace v8 |
OLD | NEW |