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 751543002: [turbofan] put late ssa deconstruction in register allocator behind a flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 1 month 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 struct MeetRegisterConstraintsPhase { 500 struct MeetRegisterConstraintsPhase {
501 static const char* phase_name() { return "meet register constraints"; } 501 static const char* phase_name() { return "meet register constraints"; }
502 502
503 void Run(PipelineData* data, Zone* temp_zone) { 503 void Run(PipelineData* data, Zone* temp_zone) {
504 data->register_allocator()->MeetRegisterConstraints(); 504 data->register_allocator()->MeetRegisterConstraints();
505 } 505 }
506 }; 506 };
507 507
508 508
509 struct ResolvePhisPhase {
510 static const char* phase_name() { return "resolve phis"; }
511
512 void Run(PipelineData* data, Zone* temp_zone) {
513 data->register_allocator()->ResolvePhis();
514 }
515 };
516
517
509 struct BuildLiveRangesPhase { 518 struct BuildLiveRangesPhase {
510 static const char* phase_name() { return "build live ranges"; } 519 static const char* phase_name() { return "build live ranges"; }
511 520
512 void Run(PipelineData* data, Zone* temp_zone) { 521 void Run(PipelineData* data, Zone* temp_zone) {
513 data->register_allocator()->BuildLiveRanges(); 522 data->register_allocator()->BuildLiveRanges();
514 } 523 }
515 }; 524 };
516 525
517 526
518 struct AllocateGeneralRegistersPhase { 527 struct AllocateGeneralRegistersPhase {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 SmartArrayPointer<char> debug_name; 928 SmartArrayPointer<char> debug_name;
920 #ifdef DEBUG 929 #ifdef DEBUG
921 debug_name = GetDebugName(data->info()); 930 debug_name = GetDebugName(data->info());
922 #endif 931 #endif
923 932
924 ZonePool::Scope zone_scope(data->zone_pool()); 933 ZonePool::Scope zone_scope(data->zone_pool());
925 data->InitializeRegisterAllocator(zone_scope.zone(), config, 934 data->InitializeRegisterAllocator(zone_scope.zone(), config,
926 debug_name.get()); 935 debug_name.get());
927 936
928 Run<MeetRegisterConstraintsPhase>(); 937 Run<MeetRegisterConstraintsPhase>();
938 Run<ResolvePhisPhase>();
929 Run<BuildLiveRangesPhase>(); 939 Run<BuildLiveRangesPhase>();
930 if (FLAG_trace_turbo) { 940 if (FLAG_trace_turbo) {
931 OFStream os(stdout); 941 OFStream os(stdout);
932 PrintableInstructionSequence printable = {config, data->sequence()}; 942 PrintableInstructionSequence printable = {config, data->sequence()};
933 os << "----- Instruction sequence before register allocation -----\n" 943 os << "----- Instruction sequence before register allocation -----\n"
934 << printable; 944 << printable;
935 } 945 }
936 DCHECK(!data->register_allocator()->ExistsUseWithoutDefinition()); 946 DCHECK(!data->register_allocator()->ExistsUseWithoutDefinition());
937 Run<AllocateGeneralRegistersPhase>(); 947 Run<AllocateGeneralRegistersPhase>();
938 if (!data->register_allocator()->AllocationOk()) { 948 if (!data->register_allocator()->AllocationOk()) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 } 985 }
976 986
977 987
978 void Pipeline::TearDown() { 988 void Pipeline::TearDown() {
979 InstructionOperand::TearDownCaches(); 989 InstructionOperand::TearDownCaches();
980 } 990 }
981 991
982 } // namespace compiler 992 } // namespace compiler
983 } // namespace internal 993 } // namespace internal
984 } // namespace v8 994 } // 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