summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
index 37f74cb9d70..1e9d0ef794c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
@@ -99,14 +99,15 @@ StatepointLoweringState::allocateStackSlot(EVT ValueType,
// Couldn't find a free slot, so create a new one:
- StatepointMaxSlotsRequired =
- std::max<unsigned long>(StatepointMaxSlotsRequired, NumSlots + 1);
-
SDValue SpillSlot = Builder.DAG.CreateStackTemporary(ValueType);
const unsigned FI = cast<FrameIndexSDNode>(SpillSlot)->getIndex();
MFI->markAsStatepointSpillSlotObjectIndex(FI);
Builder.FuncInfo.StatepointStackSlots.push_back(FI);
+
+ StatepointMaxSlotsRequired = std::max<unsigned long>(
+ StatepointMaxSlotsRequired, Builder.FuncInfo.StatepointStackSlots.size());
+
return SpillSlot;
}
OpenPOWER on IntegriCloud