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

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

Issue 1380863004: Revert of Reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/compiler/code-generator-impl.h ('k') | src/compiler/greedy-allocator.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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 712 }
713 713
714 714
715 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type, 715 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type,
716 int vreg) { 716 int vreg) {
717 if (range != NULL && !range->IsEmpty()) { 717 if (range != NULL && !range->IsEmpty()) {
718 PrintIndent(); 718 PrintIndent();
719 os_ << vreg << ":" << range->relative_id() << " " << type; 719 os_ << vreg << ":" << range->relative_id() << " " << type;
720 if (range->HasRegisterAssigned()) { 720 if (range->HasRegisterAssigned()) {
721 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand()); 721 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand());
722 int assigned_reg = op.index();
722 if (op.IsDoubleRegister()) { 723 if (op.IsDoubleRegister()) {
723 DoubleRegister assigned_reg = op.GetDoubleRegister(); 724 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg)
724 os_ << " \"" << assigned_reg.ToString() << "\""; 725 << "\"";
725 } else { 726 } else {
726 DCHECK(op.IsRegister()); 727 DCHECK(op.IsRegister());
727 Register assigned_reg = op.GetRegister(); 728 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\"";
728 os_ << " \"" << assigned_reg.ToString() << "\"";
729 } 729 }
730 } else if (range->spilled()) { 730 } else if (range->spilled()) {
731 auto top = range->TopLevel(); 731 auto top = range->TopLevel();
732 int index = -1; 732 int index = -1;
733 if (top->HasSpillRange()) { 733 if (top->HasSpillRange()) {
734 index = kMaxInt; // This hasn't been set yet. 734 index = kMaxInt; // This hasn't been set yet.
735 } else if (top->GetSpillOperand()->IsConstant()) { 735 } else if (top->GetSpillOperand()->IsConstant()) {
736 os_ << " \"const(nostack):" 736 os_ << " \"const(nostack):"
737 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register() 737 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register()
738 << "\""; 738 << "\"";
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); 820 os << "#" << SafeId(i) << ":" << SafeMnemonic(i);
821 } 821 }
822 os << ")" << std::endl; 822 os << ")" << std::endl;
823 } 823 }
824 } 824 }
825 return os; 825 return os;
826 } 826 }
827 } // namespace compiler 827 } // namespace compiler
828 } // namespace internal 828 } // namespace internal
829 } // namespace v8 829 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator-impl.h ('k') | src/compiler/greedy-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698