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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 532 } |
533 } | 533 } |
534 | 534 |
535 void GraphC1Visualizer::PrintLiveRange(const LiveRange* range, const char* type, | 535 void GraphC1Visualizer::PrintLiveRange(const LiveRange* range, const char* type, |
536 int vreg) { | 536 int vreg) { |
537 if (range != nullptr && !range->IsEmpty()) { | 537 if (range != nullptr && !range->IsEmpty()) { |
538 PrintIndent(); | 538 PrintIndent(); |
539 os_ << vreg << ":" << range->relative_id() << " " << type; | 539 os_ << vreg << ":" << range->relative_id() << " " << type; |
540 if (range->HasRegisterAssigned()) { | 540 if (range->HasRegisterAssigned()) { |
541 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand()); | 541 AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand()); |
542 if (op.IsFPRegister()) { | 542 if (op.IsRegister()) { |
543 DoubleRegister assigned_reg = op.GetDoubleRegister(); | 543 os_ << " \"" << op.GetRegister().ToString() << "\""; |
544 os_ << " \"" << assigned_reg.ToString() << "\""; | 544 } else if (op.IsDoubleRegister()) { |
| 545 os_ << " \"" << op.GetDoubleRegister().ToString() << "\""; |
545 } else { | 546 } else { |
546 DCHECK(op.IsRegister()); | 547 DCHECK(op.IsFloatRegister()); |
547 Register assigned_reg = op.GetRegister(); | 548 os_ << " \"" << op.GetFloatRegister().ToString() << "\""; |
548 os_ << " \"" << assigned_reg.ToString() << "\""; | |
549 } | 549 } |
550 } else if (range->spilled()) { | 550 } else if (range->spilled()) { |
551 const TopLevelLiveRange* top = range->TopLevel(); | 551 const TopLevelLiveRange* top = range->TopLevel(); |
552 int index = -1; | 552 int index = -1; |
553 if (top->HasSpillRange()) { | 553 if (top->HasSpillRange()) { |
554 index = kMaxInt; // This hasn't been set yet. | 554 index = kMaxInt; // This hasn't been set yet. |
555 } else if (top->GetSpillOperand()->IsConstant()) { | 555 } else if (top->GetSpillOperand()->IsConstant()) { |
556 os_ << " \"const(nostack):" | 556 os_ << " \"const(nostack):" |
557 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register() | 557 << ConstantOperand::cast(top->GetSpillOperand())->virtual_register() |
558 << "\""; | 558 << "\""; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 os << "]"; | 650 os << "]"; |
651 } | 651 } |
652 os << std::endl; | 652 os << std::endl; |
653 } | 653 } |
654 } | 654 } |
655 return os; | 655 return os; |
656 } | 656 } |
657 } // namespace compiler | 657 } // namespace compiler |
658 } // namespace internal | 658 } // namespace internal |
659 } // namespace v8 | 659 } // namespace v8 |
OLD | NEW |