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

Side by Side Diff: src/compiler/graph-visualizer.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, 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/pipeline.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/graph-visualizer.h" 5 #include "src/compiler/graph-visualizer.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 InstructionOperand* op = range->CreateAssignedOperand(zone()); 716 InstructionOperand* op = range->CreateAssignedOperand(zone());
717 int assigned_reg = op->index(); 717 int assigned_reg = op->index();
718 if (op->IsDoubleRegister()) { 718 if (op->IsDoubleRegister()) {
719 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) 719 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg)
720 << "\""; 720 << "\"";
721 } else { 721 } else {
722 DCHECK(op->IsRegister()); 722 DCHECK(op->IsRegister());
723 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; 723 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\"";
724 } 724 }
725 } else if (range->IsSpilled()) { 725 } else if (range->IsSpilled()) {
726 InstructionOperand* op = range->TopLevel()->GetSpillOperand(); 726 int index = -1;
727 if (op->IsDoubleStackSlot()) { 727 if (range->TopLevel()->GetSpillRange()->id() != -1) {
728 os_ << " \"double_stack:" << op->index() << "\""; 728 index = range->TopLevel()->GetSpillRange()->id();
729 } else if (op->IsStackSlot()) {
730 os_ << " \"stack:" << op->index() << "\"";
731 } else { 729 } else {
732 DCHECK(op->IsConstant()); 730 index = range->TopLevel()->GetSpillOperand()->index();
733 os_ << " \"const(nostack):" << op->index() << "\""; 731 }
732 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) {
733 os_ << " \"double_stack:" << index << "\"";
734 } else if (range->TopLevel()->Kind() == GENERAL_REGISTERS) {
735 os_ << " \"stack:" << index << "\"";
736 } else {
737 os_ << " \"const(nostack):" << index << "\"";
734 } 738 }
735 } 739 }
736 int parent_index = -1; 740 int parent_index = -1;
737 if (range->IsChild()) { 741 if (range->IsChild()) {
738 parent_index = range->parent()->id(); 742 parent_index = range->parent()->id();
739 } else { 743 } else {
740 parent_index = range->id(); 744 parent_index = range->id();
741 } 745 }
742 InstructionOperand* op = range->FirstHint(); 746 InstructionOperand* op = range->FirstHint();
743 int hint_index = -1; 747 int hint_index = -1;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 785
782 786
783 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac) { 787 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac) {
784 Zone tmp_zone(ac.allocator_->code()->zone()->isolate()); 788 Zone tmp_zone(ac.allocator_->code()->zone()->isolate());
785 GraphC1Visualizer(os, &tmp_zone).PrintAllocator(ac.phase_, ac.allocator_); 789 GraphC1Visualizer(os, &tmp_zone).PrintAllocator(ac.phase_, ac.allocator_);
786 return os; 790 return os;
787 } 791 }
788 } 792 }
789 } 793 }
790 } // namespace v8::internal::compiler 794 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698