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