Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: src/compiler/pipeline.cc

Issue 725083004: [turbofan] More aggressive reuse of spill slots in the register allocator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/graph-visualizer.cc ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 struct AllocateDoubleRegistersPhase { 527 struct AllocateDoubleRegistersPhase {
528 static const char* phase_name() { return "allocate double registers"; } 528 static const char* phase_name() { return "allocate double registers"; }
529 529
530 void Run(PipelineData* data, Zone* temp_zone) { 530 void Run(PipelineData* data, Zone* temp_zone) {
531 data->register_allocator()->AllocateDoubleRegisters(); 531 data->register_allocator()->AllocateDoubleRegisters();
532 } 532 }
533 }; 533 };
534 534
535 535
536 struct ReuseSpillSlotsPhase {
537 static const char* phase_name() { return "reuse spill slots"; }
538
539 void Run(PipelineData* data, Zone* temp_zone) {
540 data->register_allocator()->ReuseSpillSlots();
541 }
542 };
543
544
536 struct PopulatePointerMapsPhase { 545 struct PopulatePointerMapsPhase {
537 static const char* phase_name() { return "populate pointer maps"; } 546 static const char* phase_name() { return "populate pointer maps"; }
538 547
539 void Run(PipelineData* data, Zone* temp_zone) { 548 void Run(PipelineData* data, Zone* temp_zone) {
540 data->register_allocator()->PopulatePointerMaps(); 549 data->register_allocator()->PopulatePointerMaps();
541 } 550 }
542 }; 551 };
543 552
544 553
545 struct ConnectRangesPhase { 554 struct ConnectRangesPhase {
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 Run<AllocateGeneralRegistersPhase>(); 937 Run<AllocateGeneralRegistersPhase>();
929 if (!data->register_allocator()->AllocationOk()) { 938 if (!data->register_allocator()->AllocationOk()) {
930 data->set_compilation_failed(); 939 data->set_compilation_failed();
931 return; 940 return;
932 } 941 }
933 Run<AllocateDoubleRegistersPhase>(); 942 Run<AllocateDoubleRegistersPhase>();
934 if (!data->register_allocator()->AllocationOk()) { 943 if (!data->register_allocator()->AllocationOk()) {
935 data->set_compilation_failed(); 944 data->set_compilation_failed();
936 return; 945 return;
937 } 946 }
947 Run<ReuseSpillSlotsPhase>();
938 Run<PopulatePointerMapsPhase>(); 948 Run<PopulatePointerMapsPhase>();
939 Run<ConnectRangesPhase>(); 949 Run<ConnectRangesPhase>();
940 Run<ResolveControlFlowPhase>(); 950 Run<ResolveControlFlowPhase>();
941 951
942 if (FLAG_trace_turbo) { 952 if (FLAG_trace_turbo) {
943 OFStream os(stdout); 953 OFStream os(stdout);
944 PrintableInstructionSequence printable = {config, data->sequence()}; 954 PrintableInstructionSequence printable = {config, data->sequence()};
945 os << "----- Instruction sequence after register allocation -----\n" 955 os << "----- Instruction sequence after register allocation -----\n"
946 << printable; 956 << printable;
947 } 957 }
(...skipping 15 matching lines...) Expand all
963 } 973 }
964 974
965 975
966 void Pipeline::TearDown() { 976 void Pipeline::TearDown() {
967 InstructionOperand::TearDownCaches(); 977 InstructionOperand::TearDownCaches();
968 } 978 }
969 979
970 } // namespace compiler 980 } // namespace compiler
971 } // namespace internal 981 } // namespace internal
972 } // namespace v8 982 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/graph-visualizer.cc ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698