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

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

Issue 1087983007: [turbofan] Cleanup register allocator a little after split. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months 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 | « no previous file | 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 builder.BuildLiveRanges(); 740 builder.BuildLiveRanges();
741 } 741 }
742 }; 742 };
743 743
744 744
745 struct AllocateGeneralRegistersPhase { 745 struct AllocateGeneralRegistersPhase {
746 static const char* phase_name() { return "allocate general registers"; } 746 static const char* phase_name() { return "allocate general registers"; }
747 747
748 void Run(PipelineData* data, Zone* temp_zone) { 748 void Run(PipelineData* data, Zone* temp_zone) {
749 LinearScanAllocator allocator(data->register_allocation_data(), 749 LinearScanAllocator allocator(data->register_allocation_data(),
750 GENERAL_REGISTERS); 750 GENERAL_REGISTERS, temp_zone);
751 allocator.AllocateRegisters(); 751 allocator.AllocateRegisters();
752 } 752 }
753 }; 753 };
754 754
755 755
756 struct AllocateDoubleRegistersPhase { 756 struct AllocateDoubleRegistersPhase {
757 static const char* phase_name() { return "allocate double registers"; } 757 static const char* phase_name() { return "allocate double registers"; }
758 758
759 void Run(PipelineData* data, Zone* temp_zone) { 759 void Run(PipelineData* data, Zone* temp_zone) {
760 LinearScanAllocator allocator(data->register_allocation_data(), 760 LinearScanAllocator allocator(data->register_allocation_data(),
761 DOUBLE_REGISTERS); 761 DOUBLE_REGISTERS, temp_zone);
762 allocator.AllocateRegisters(); 762 allocator.AllocateRegisters();
763 } 763 }
764 }; 764 };
765 765
766 766
767 struct AssignSpillSlotsPhase { 767 struct AssignSpillSlotsPhase {
768 static const char* phase_name() { return "assign spill slots"; } 768 static const char* phase_name() { return "assign spill slots"; }
769 769
770 void Run(PipelineData* data, Zone* temp_zone) { 770 void Run(PipelineData* data, Zone* temp_zone) {
771 OperandAssigner assigner(data->register_allocation_data()); 771 OperandAssigner assigner(data->register_allocation_data());
(...skipping 30 matching lines...) Expand all
802 connector.ConnectRanges(temp_zone); 802 connector.ConnectRanges(temp_zone);
803 } 803 }
804 }; 804 };
805 805
806 806
807 struct ResolveControlFlowPhase { 807 struct ResolveControlFlowPhase {
808 static const char* phase_name() { return "resolve control flow"; } 808 static const char* phase_name() { return "resolve control flow"; }
809 809
810 void Run(PipelineData* data, Zone* temp_zone) { 810 void Run(PipelineData* data, Zone* temp_zone) {
811 LiveRangeConnector connector(data->register_allocation_data()); 811 LiveRangeConnector connector(data->register_allocation_data());
812 connector.ResolveControlFlow(); 812 connector.ResolveControlFlow(temp_zone);
813 } 813 }
814 }; 814 };
815 815
816 816
817 struct OptimizeMovesPhase { 817 struct OptimizeMovesPhase {
818 static const char* phase_name() { return "optimize moves"; } 818 static const char* phase_name() { return "optimize moves"; }
819 819
820 void Run(PipelineData* data, Zone* temp_zone) { 820 void Run(PipelineData* data, Zone* temp_zone) {
821 MoveOptimizer move_optimizer(temp_zone, data->sequence()); 821 MoveOptimizer move_optimizer(temp_zone, data->sequence());
822 move_optimizer.Run(); 822 move_optimizer.Run();
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 tcf << AsC1VRegisterAllocationData("CodeGen", 1298 tcf << AsC1VRegisterAllocationData("CodeGen",
1299 data->register_allocation_data()); 1299 data->register_allocation_data());
1300 } 1300 }
1301 1301
1302 data->DeleteRegisterAllocationZone(); 1302 data->DeleteRegisterAllocationZone();
1303 } 1303 }
1304 1304
1305 } // namespace compiler 1305 } // namespace compiler
1306 } // namespace internal 1306 } // namespace internal
1307 } // namespace v8 1307 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698