summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_liveness_analysis.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.cc')
-rw-r--r--compiler/optimizing/ssa_liveness_analysis.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.cc b/compiler/optimizing/ssa_liveness_analysis.cc
index 7b2c3a939c..18942a1823 100644
--- a/compiler/optimizing/ssa_liveness_analysis.cc
+++ b/compiler/optimizing/ssa_liveness_analysis.cc
@@ -523,12 +523,8 @@ Location LiveInterval::ToLocation() const {
if (defined_by->IsConstant()) {
return defined_by->GetLocations()->Out();
} else if (GetParent()->HasSpillSlot()) {
- switch (NumberOfSpillSlotsNeeded()) {
- case 1: return Location::StackSlot(GetParent()->GetSpillSlot());
- case 2: return Location::DoubleStackSlot(GetParent()->GetSpillSlot());
- case 4: return Location::SIMDStackSlot(GetParent()->GetSpillSlot());
- default: LOG(FATAL) << "Unexpected number of spill slots"; UNREACHABLE();
- }
+ return Location::StackSlotByNumOfSlots(NumberOfSpillSlotsNeeded(),
+ GetParent()->GetSpillSlot());
} else {
return Location();
}