summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h
index e1dfc64f97a..78cdc39db1f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h
+++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h
@@ -46,15 +46,16 @@ public:
/// statepoint. Will return SDValue() if this value hasn't been
/// spilled. Otherwise, the value has already been spilled and no
/// further action is required by the caller.
- SDValue getLocation(SDValue val) {
- if (!Locations.count(val))
+ SDValue getLocation(SDValue Val) {
+ if (!Locations.count(Val))
return SDValue();
- return Locations[val];
+ return Locations[Val];
}
- void setLocation(SDValue val, SDValue Location) {
- assert(!Locations.count(val) &&
+
+ void setLocation(SDValue Val, SDValue Location) {
+ assert(!Locations.count(Val) &&
"Trying to allocate already allocated location");
- Locations[val] = Location;
+ Locations[Val] = Location;
}
/// Record the fact that we expect to encounter a given gc_relocate
@@ -63,16 +64,15 @@ public:
void scheduleRelocCall(const CallInst &RelocCall) {
PendingGCRelocateCalls.push_back(&RelocCall);
}
+
/// Remove this gc_relocate from the list we're expecting to see
/// before the next statepoint. If we weren't expecting to see
/// it, we'll report an assertion.
void relocCallVisited(const CallInst &RelocCall) {
- SmallVectorImpl<const CallInst *>::iterator itr =
- std::find(PendingGCRelocateCalls.begin(), PendingGCRelocateCalls.end(),
- &RelocCall);
- assert(itr != PendingGCRelocateCalls.end() &&
+ auto I = find(PendingGCRelocateCalls, &RelocCall);
+ assert(I != PendingGCRelocateCalls.end() &&
"Visited unexpected gcrelocate call");
- PendingGCRelocateCalls.erase(itr);
+ PendingGCRelocateCalls.erase(I);
}
// TODO: Should add consistency tracking to ensure we encounter
@@ -89,6 +89,7 @@ public:
assert(NextSlotToAllocate <= (unsigned)Offset && "consistency!");
AllocatedStackSlots.set(Offset);
}
+
bool isStackSlotAllocated(int Offset) {
assert(Offset >= 0 && Offset < (int)AllocatedStackSlots.size() &&
"out of bounds");
OpenPOWER on IntegriCloud