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

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

Issue 904693002: [turbofan] Remove global InstructionOperand caches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/instruction.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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 PrintLiveRange(range, "object"); 691 PrintLiveRange(range, "object");
692 } 692 }
693 } 693 }
694 694
695 695
696 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) { 696 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) {
697 if (range != NULL && !range->IsEmpty()) { 697 if (range != NULL && !range->IsEmpty()) {
698 PrintIndent(); 698 PrintIndent();
699 os_ << range->id() << " " << type; 699 os_ << range->id() << " " << type;
700 if (range->HasRegisterAssigned()) { 700 if (range->HasRegisterAssigned()) {
701 InstructionOperand* op = range->CreateAssignedOperand(zone()); 701 InstructionOperand op = range->GetAssignedOperand();
702 int assigned_reg = op->index(); 702 int assigned_reg = op.index();
703 if (op->IsDoubleRegister()) { 703 if (op.IsDoubleRegister()) {
704 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg) 704 os_ << " \"" << DoubleRegister::AllocationIndexToString(assigned_reg)
705 << "\""; 705 << "\"";
706 } else { 706 } else {
707 DCHECK(op->IsRegister()); 707 DCHECK(op.IsRegister());
708 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\""; 708 os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\"";
709 } 709 }
710 } else if (range->IsSpilled()) { 710 } else if (range->IsSpilled()) {
711 int index = -1; 711 int index = -1;
712 if (range->TopLevel()->HasSpillRange()) { 712 if (range->TopLevel()->HasSpillRange()) {
713 index = kMaxInt; // This hasn't been set yet. 713 index = kMaxInt; // This hasn't been set yet.
714 } else { 714 } else {
715 index = range->TopLevel()->GetSpillOperand()->index(); 715 index = range->TopLevel()->GetSpillOperand()->index();
716 } 716 }
717 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) { 717 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); 807 os << "#" << SafeId(i) << ":" << SafeMnemonic(i);
808 } 808 }
809 os << ")" << std::endl; 809 os << ")" << std::endl;
810 } 810 }
811 } 811 }
812 return os; 812 return os;
813 } 813 }
814 } 814 }
815 } 815 }
816 } // namespace v8::internal::compiler 816 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « no previous file | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698