| OLD | NEW |
| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 } | 586 } |
| 587 | 587 |
| 588 PrintIntProperty("loop_depth", current->loop_depth()); | 588 PrintIntProperty("loop_depth", current->loop_depth()); |
| 589 | 589 |
| 590 const InstructionBlock* instruction_block = | 590 const InstructionBlock* instruction_block = |
| 591 instructions->InstructionBlockAt( | 591 instructions->InstructionBlockAt( |
| 592 RpoNumber::FromInt(current->rpo_number())); | 592 RpoNumber::FromInt(current->rpo_number())); |
| 593 if (instruction_block->code_start() >= 0) { | 593 if (instruction_block->code_start() >= 0) { |
| 594 int first_index = instruction_block->first_instruction_index(); | 594 int first_index = instruction_block->first_instruction_index(); |
| 595 int last_index = instruction_block->last_instruction_index(); | 595 int last_index = instruction_block->last_instruction_index(); |
| 596 PrintIntProperty("first_lir_id", LifetimePosition::FromInstructionIndex( | 596 PrintIntProperty( |
| 597 first_index).Value()); | 597 "first_lir_id", |
| 598 PrintIntProperty("last_lir_id", LifetimePosition::FromInstructionIndex( | 598 LifetimePosition::GapFromInstructionIndex(first_index).Value()); |
| 599 last_index).Value()); | 599 PrintIntProperty("last_lir_id", |
| 600 LifetimePosition::InstructionFromInstructionIndex( |
| 601 last_index).Value()); |
| 600 } | 602 } |
| 601 | 603 |
| 602 { | 604 { |
| 603 Tag states_tag(this, "states"); | 605 Tag states_tag(this, "states"); |
| 604 Tag locals_tag(this, "locals"); | 606 Tag locals_tag(this, "locals"); |
| 605 int total = 0; | 607 int total = 0; |
| 606 for (BasicBlock::const_iterator i = current->begin(); i != current->end(); | 608 for (BasicBlock::const_iterator i = current->begin(); i != current->end(); |
| 607 ++i) { | 609 ++i) { |
| 608 if ((*i)->opcode() == IrOpcode::kPhi) total++; | 610 if ((*i)->opcode() == IrOpcode::kPhi) total++; |
| 609 } | 611 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); | 817 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); |
| 816 } | 818 } |
| 817 os << ")" << std::endl; | 819 os << ")" << std::endl; |
| 818 } | 820 } |
| 819 } | 821 } |
| 820 return os; | 822 return os; |
| 821 } | 823 } |
| 822 } | 824 } |
| 823 } | 825 } |
| 824 } // namespace v8::internal::compiler | 826 } // namespace v8::internal::compiler |
| OLD | NEW |