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

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

Issue 1087133004: [turbofan] make LifetimePostion comparable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 PrintIntProperty("loop_depth", current->loop_depth()); 597 PrintIntProperty("loop_depth", current->loop_depth());
598 598
599 const InstructionBlock* instruction_block = 599 const InstructionBlock* instruction_block =
600 instructions->InstructionBlockAt( 600 instructions->InstructionBlockAt(
601 RpoNumber::FromInt(current->rpo_number())); 601 RpoNumber::FromInt(current->rpo_number()));
602 if (instruction_block->code_start() >= 0) { 602 if (instruction_block->code_start() >= 0) {
603 int first_index = instruction_block->first_instruction_index(); 603 int first_index = instruction_block->first_instruction_index();
604 int last_index = instruction_block->last_instruction_index(); 604 int last_index = instruction_block->last_instruction_index();
605 PrintIntProperty( 605 PrintIntProperty(
606 "first_lir_id", 606 "first_lir_id",
607 LifetimePosition::GapFromInstructionIndex(first_index).Value()); 607 LifetimePosition::GapFromInstructionIndex(first_index).value());
608 PrintIntProperty("last_lir_id", 608 PrintIntProperty("last_lir_id",
609 LifetimePosition::InstructionFromInstructionIndex( 609 LifetimePosition::InstructionFromInstructionIndex(
610 last_index).Value()); 610 last_index).value());
611 } 611 }
612 612
613 { 613 {
614 Tag states_tag(this, "states"); 614 Tag states_tag(this, "states");
615 Tag locals_tag(this, "locals"); 615 Tag locals_tag(this, "locals");
616 int total = 0; 616 int total = 0;
617 for (BasicBlock::const_iterator i = current->begin(); i != current->end(); 617 for (BasicBlock::const_iterator i = current->begin(); i != current->end();
618 ++i) { 618 ++i) {
619 if ((*i)->opcode() == IrOpcode::kPhi) total++; 619 if ((*i)->opcode() == IrOpcode::kPhi) total++;
620 } 620 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 parent_index = range->id(); 751 parent_index = range->id();
752 } 752 }
753 InstructionOperand* op = range->FirstHint(); 753 InstructionOperand* op = range->FirstHint();
754 int hint_index = -1; 754 int hint_index = -1;
755 if (op != NULL && op->IsUnallocated()) { 755 if (op != NULL && op->IsUnallocated()) {
756 hint_index = UnallocatedOperand::cast(op)->virtual_register(); 756 hint_index = UnallocatedOperand::cast(op)->virtual_register();
757 } 757 }
758 os_ << " " << parent_index << " " << hint_index; 758 os_ << " " << parent_index << " " << hint_index;
759 for (auto interval = range->first_interval(); interval != nullptr; 759 for (auto interval = range->first_interval(); interval != nullptr;
760 interval = interval->next()) { 760 interval = interval->next()) {
761 os_ << " [" << interval->start().Value() << ", " 761 os_ << " [" << interval->start().value() << ", "
762 << interval->end().Value() << "["; 762 << interval->end().value() << "[";
763 } 763 }
764 764
765 UsePosition* current_pos = range->first_pos(); 765 UsePosition* current_pos = range->first_pos();
766 while (current_pos != NULL) { 766 while (current_pos != NULL) {
767 if (current_pos->RegisterIsBeneficial() || FLAG_trace_all_uses) { 767 if (current_pos->RegisterIsBeneficial() || FLAG_trace_all_uses) {
768 os_ << " " << current_pos->pos().Value() << " M"; 768 os_ << " " << current_pos->pos().value() << " M";
769 } 769 }
770 current_pos = current_pos->next(); 770 current_pos = current_pos->next();
771 } 771 }
772 772
773 os_ << " \"\"\n"; 773 os_ << " \"\"\n";
774 } 774 }
775 } 775 }
776 776
777 777
778 std::ostream& operator<<(std::ostream& os, const AsC1VCompilation& ac) { 778 std::ostream& operator<<(std::ostream& os, const AsC1VCompilation& ac) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); 829 os << "#" << SafeId(i) << ":" << SafeMnemonic(i);
830 } 830 }
831 os << ")" << std::endl; 831 os << ")" << std::endl;
832 } 832 }
833 } 833 }
834 return os; 834 return os;
835 } 835 }
836 } 836 }
837 } 837 }
838 } // namespace v8::internal::compiler 838 } // 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