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

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

Issue 725083004: [turbofan] More aggressive reuse of spill slots in the register allocator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/pipeline.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 19f24cfdb2fc3f3da9fe11d38fd97cc1766b8c91..40b182a34c881352cef2b3242db5b1860e83e6a6 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -723,14 +723,18 @@ void GraphC1Visualizer::PrintLiveRange(LiveRange* range, const char* type) {
os_ << " \"" << Register::AllocationIndexToString(assigned_reg) << "\"";
}
} else if (range->IsSpilled()) {
- InstructionOperand* op = range->TopLevel()->GetSpillOperand();
- if (op->IsDoubleStackSlot()) {
- os_ << " \"double_stack:" << op->index() << "\"";
- } else if (op->IsStackSlot()) {
- os_ << " \"stack:" << op->index() << "\"";
+ int index = -1;
+ if (range->TopLevel()->GetSpillRange()->id() != -1) {
+ index = range->TopLevel()->GetSpillRange()->id();
} else {
- DCHECK(op->IsConstant());
- os_ << " \"const(nostack):" << op->index() << "\"";
+ index = range->TopLevel()->GetSpillOperand()->index();
+ }
+ if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) {
+ os_ << " \"double_stack:" << index << "\"";
+ } else if (range->TopLevel()->Kind() == GENERAL_REGISTERS) {
+ os_ << " \"stack:" << index << "\"";
+ } else {
+ os_ << " \"const(nostack):" << index << "\"";
}
}
int parent_index = -1;
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698