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; |