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

Side by Side Diff: src/compiler/graph-visualizer.cc

Issue 1111563004: [turbofan] Cleanup LiveRange a bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 if (range->HasRegisterAssigned()) { 719 if (range->HasRegisterAssigned()) {
720 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand()); 720 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand());
721 int assigned_reg = op.index(); 721 int assigned_reg = op.index();
722 if (op.IsDoubleRegister()) { 722 if (op.IsDoubleRegister()) {
723 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) 723 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg)
724 << "\""; 724 << "\"";
725 } else { 725 } else {
726 DCHECK(op.IsRegister()); 726 DCHECK(op.IsRegister());
727 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; 727 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\"";
728 } 728 }
729 } else if (range->IsSpilled()) { 729 } else if (range->spilled()) {
730 auto top = range->TopLevel(); 730 auto top = range->TopLevel();
731 int index = -1; 731 int index = -1;
732 if (top->HasSpillRange()) { 732 if (top->HasSpillRange()) {
733 index = kMaxInt; // This hasn't been set yet. 733 index = kMaxInt; // This hasn't been set yet.
734 } else if (top->GetSpillOperand()->IsConstant()) { 734 } else if (top->GetSpillOperand()->IsConstant()) {
735 os_ << " \"const(nostack):" 735 os_ << " \"const(nostack):"
736 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register() 736 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register()
737 << "\""; 737 << "\"";
738 } else { 738 } else {
739 index = AllocatedOperand::cast(top->GetSpillOperand())->index(); 739 index = AllocatedOperand::cast(top->GetSpillOperand())->index();
740 if (top->Kind() == DOUBLE_REGISTERS) { 740 if (top->kind() == DOUBLE_REGISTERS) {
741 os_ << " \"double_stack:" << index << "\""; 741 os_ << " \"double_stack:" << index << "\"";
742 } else if (top->Kind() == GENERAL_REGISTERS) { 742 } else if (top->kind() == GENERAL_REGISTERS) {
743 os_ << " \"stack:" << index << "\""; 743 os_ << " \"stack:" << index << "\"";
744 } 744 }
745 } 745 }
746 } 746 }
747 int parent_index = -1; 747 int parent_index = -1;
748 if (range->IsChild()) { 748 if (range->IsChild()) {
749 parent_index = range->parent()->id(); 749 parent_index = range->parent()->id();
750 } else { 750 } else {
751 parent_index = range->id(); 751 parent_index = range->id();
752 } 752 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); 824 os << "#" << SafeId(i) << ":" << SafeMnemonic(i);
825 } 825 }
826 os << ")" << std::endl; 826 os << ")" << std::endl;
827 } 827 }
828 } 828 }
829 return os; 829 return os;
830 } 830 }
831 } 831 }
832 } 832 }
833 } // namespace v8::internal::compiler 833 } // namespace v8::internal::compiler
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