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/compiler/generic-algorithm.h" | 10 #include "src/compiler/generic-algorithm.h" |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 const Schedule* schedule, | 555 const Schedule* schedule, |
556 const SourcePositionTable* positions, | 556 const SourcePositionTable* positions, |
557 const InstructionSequence* instructions) { | 557 const InstructionSequence* instructions) { |
558 Tag tag(this, "cfg"); | 558 Tag tag(this, "cfg"); |
559 PrintStringProperty("name", phase); | 559 PrintStringProperty("name", phase); |
560 const BasicBlockVector* rpo = schedule->rpo_order(); | 560 const BasicBlockVector* rpo = schedule->rpo_order(); |
561 for (size_t i = 0; i < rpo->size(); i++) { | 561 for (size_t i = 0; i < rpo->size(); i++) { |
562 BasicBlock* current = (*rpo)[i]; | 562 BasicBlock* current = (*rpo)[i]; |
563 Tag block_tag(this, "block"); | 563 Tag block_tag(this, "block"); |
564 PrintBlockProperty("name", current->id()); | 564 PrintBlockProperty("name", current->id()); |
565 PrintStringProperty("deferred", current->deferred() ? "true" : "false"); | |
566 PrintIntProperty("from_bci", -1); | 565 PrintIntProperty("from_bci", -1); |
567 PrintIntProperty("to_bci", -1); | 566 PrintIntProperty("to_bci", -1); |
568 | 567 |
569 PrintIndent(); | 568 PrintIndent(); |
570 os_ << "predecessors"; | 569 os_ << "predecessors"; |
571 for (BasicBlock::Predecessors::iterator j = current->predecessors_begin(); | 570 for (BasicBlock::Predecessors::iterator j = current->predecessors_begin(); |
572 j != current->predecessors_end(); ++j) { | 571 j != current->predecessors_end(); ++j) { |
573 os_ << " \"B" << (*j)->id() << "\""; | 572 os_ << " \"B" << (*j)->id() << "\""; |
574 } | 573 } |
575 os_ << "\n"; | 574 os_ << "\n"; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 | 781 |
783 | 782 |
784 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac) { | 783 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac) { |
785 Zone tmp_zone(ac.allocator_->code()->zone()->isolate()); | 784 Zone tmp_zone(ac.allocator_->code()->zone()->isolate()); |
786 GraphC1Visualizer(os, &tmp_zone).PrintAllocator(ac.phase_, ac.allocator_); | 785 GraphC1Visualizer(os, &tmp_zone).PrintAllocator(ac.phase_, ac.allocator_); |
787 return os; | 786 return os; |
788 } | 787 } |
789 } | 788 } |
790 } | 789 } |
791 } // namespace v8::internal::compiler | 790 } // namespace v8::internal::compiler |
OLD | NEW |