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

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

Issue 688633002: [turbofan] add configuration parameters for register allocator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 1 month 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 | Annotate | Revision Log
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/compiler/generic-algorithm.h" 11 #include "src/compiler/generic-algorithm.h"
11 #include "src/compiler/generic-node.h" 12 #include "src/compiler/generic-node.h"
12 #include "src/compiler/generic-node-inl.h" 13 #include "src/compiler/generic-node-inl.h"
13 #include "src/compiler/graph.h" 14 #include "src/compiler/graph.h"
14 #include "src/compiler/graph-inl.h" 15 #include "src/compiler/graph-inl.h"
15 #include "src/compiler/node.h" 16 #include "src/compiler/node.h"
16 #include "src/compiler/node-properties.h" 17 #include "src/compiler/node-properties.h"
17 #include "src/compiler/node-properties-inl.h" 18 #include "src/compiler/node-properties-inl.h"
18 #include "src/compiler/opcodes.h" 19 #include "src/compiler/opcodes.h"
19 #include "src/compiler/operator.h" 20 #include "src/compiler/operator.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 } 671 }
671 } 672 }
672 } 673 }
673 674
674 675
675 void GraphC1Visualizer::PrintAllocator(const char* phase, 676 void GraphC1Visualizer::PrintAllocator(const char* phase,
676 const RegisterAllocator* allocator) { 677 const RegisterAllocator* allocator) {
677 Tag tag(this, "intervals"); 678 Tag tag(this, "intervals");
678 PrintStringProperty("name", phase); 679 PrintStringProperty("name", phase);
679 680
680 const Vector<LiveRange*>* fixed_d = allocator->fixed_double_live_ranges(); 681 for (auto range : allocator->fixed_double_live_ranges()) {
681 for (int i = 0; i < fixed_d->length(); ++i) { 682 PrintLiveRange(range, "fixed");
682 PrintLiveRange(fixed_d->at(i), "fixed");
683 } 683 }
684 684
685 const Vector<LiveRange*>* fixed = allocator->fixed_live_ranges(); 685 for (auto range : allocator->fixed_live_ranges()) {
686 for (int i = 0; i < fixed->length(); ++i) { 686 PrintLiveRange(range, "fixed");
687 PrintLiveRange(fixed->at(i), "fixed");
688 } 687 }
689 688
690 const ZoneList<LiveRange*>* live_ranges = allocator->live_ranges(); 689 for (auto range : allocator->live_ranges()) {
691 for (int i = 0; i < live_ranges->length(); ++i) { 690 PrintLiveRange(range, "object");
692 PrintLiveRange(live_ranges->at(i), "object");
693 } 691 }
694 } 692 }
695 693
696 694
697 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) { 695 void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) {
698 if (range != NULL && !range->IsEmpty()) { 696 if (range != NULL && !range->IsEmpty()) {
699 PrintIndent(); 697 PrintIndent();
700 os_ << range->id() << " " << type; 698 os_ << range->id() << " " << type;
701 if (range->HasRegisterAssigned()) { 699 if (range->HasRegisterAssigned()) {
702 InstructionOperand* op = range->CreateAssignedOperand(zone()); 700 InstructionOperand* op = range->CreateAssignedOperand(zone());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 765
768 766
769 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac) { 767 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac) {
770 Zone tmp_zone(ac.allocator_->code()->zone()->isolate()); 768 Zone tmp_zone(ac.allocator_->code()->zone()->isolate());
771 GraphC1Visualizer(os, &tmp_zone).PrintAllocator(ac.phase_, ac.allocator_); 769 GraphC1Visualizer(os, &tmp_zone).PrintAllocator(ac.phase_, ac.allocator_);
772 return os; 770 return os;
773 } 771 }
774 } 772 }
775 } 773 }
776 } // namespace v8::internal::compiler 774 } // namespace v8::internal::compiler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698