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

Unified Diff: src/compiler/graph-visualizer.cc

Issue 1311983002: [turbofan] Separate LiveRange and TopLevelLiveRange concepts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/greedy-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-visualizer.cc
diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc
index 527469686796cc6cfa5da5b17784a440d231154c..132442d6add88069a8bb9b146c0c6bd7083a2a0a 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -420,7 +420,9 @@ class GraphC1Visualizer {
void PrintInputs(InputIterator* i, int count, const char* prefix);
void PrintType(Node* node);
- void PrintLiveRange(LiveRange* range, const char* type);
+ void PrintLiveRange(LiveRange* range, const char* type, int vreg);
+ void PrintLiveRangeChain(TopLevelLiveRange* range, const char* type);
+
class Tag final BASE_EMBEDDED {
public:
Tag(GraphC1Visualizer* visualizer, const char* name) {
@@ -694,23 +696,33 @@ void GraphC1Visualizer::PrintLiveRanges(const char* phase,
PrintStringProperty("name", phase);
for (auto range : data->fixed_double_live_ranges()) {
- PrintLiveRange(range, "fixed");
+ PrintLiveRangeChain(range, "fixed");
}
for (auto range : data->fixed_live_ranges()) {
- PrintLiveRange(range, "fixed");
+ PrintLiveRangeChain(range, "fixed");
}
for (auto range : data->live_ranges()) {
- PrintLiveRange(range, "object");
+ PrintLiveRangeChain(range, "object");
+ }
+}
+
+
+void GraphC1Visualizer::PrintLiveRangeChain(TopLevelLiveRange* range,
+ const char* type) {
+ int vreg = range->vreg();
+ for (LiveRange* child = range; child != nullptr; child = child->next()) {
+ PrintLiveRange(child, type, vreg);
}
}
-void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) {
+void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type,
+ int vreg) {
if (range != NULL && !range->IsEmpty()) {
PrintIndent();
- os_ << range->id() << " " << type;
+ os_ << vreg << ":" << range->relative_id() << " " << type;
if (range->HasRegisterAssigned()) {
AllocatedOperand op = AllocatedOperand::cast(range->GetAssignedOperand());
int assigned_reg = op.index();
@@ -739,13 +751,8 @@ void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) {
}
}
}
- int parent_index = -1;
- if (range->IsChild()) {
- parent_index = range->parent()->id();
- } else {
- parent_index = range->id();
- }
- os_ << " " << parent_index;
+
+ os_ << " " << vreg;
for (auto interval = range->first_interval(); interval != nullptr;
interval = interval->next()) {
os_ << " [" << interval->start().value() << ", "
« no previous file with comments | « no previous file | src/compiler/greedy-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698