/// works in concert with information in FunctionLoweringInfo.
class StatepointLoweringState {
public:
- StatepointLoweringState() : NextSlotToAllocate(0) {
- }
+ StatepointLoweringState() : NextSlotToAllocate(0) {}
/// Reset all state tracking for a newly encountered safepoint. Also
/// performs some consistency checking.
Locations[val] = Location;
}
- /// Returns the relocated value for a given input pointer. Will
- /// return SDValue() if this value hasn't yet been reloaded from
- /// it's stack slot after the statepoint. Otherwise, the value
- /// has already been reloaded and the SDValue of that reload will
- /// be returned. Note that VMState values are spilled but not
- /// reloaded (since they don't change at the safepoint unless
- /// also listed in the GC pointer section) and will thus never
- /// be in this map
- SDValue getRelocLocation(SDValue val) {
- if (!RelocLocations.count(val))
- return SDValue();
- return RelocLocations[val];
- }
- void setRelocLocation(SDValue val, SDValue Location) {
- assert(!RelocLocations.count(val) &&
- "Trying to allocate already allocated location");
- RelocLocations[val] = Location;
- }
-
/// Record the fact that we expect to encounter a given gc_relocate
/// before the next statepoint. If we don't see it, we'll report
/// an assertion.
/// Maps pre-relocation value (gc pointer directly incoming into statepoint)
/// into it's location (currently only stack slots)
DenseMap<SDValue, SDValue> Locations;
- /// Map pre-relocated value into it's new relocated location
- DenseMap<SDValue, SDValue> RelocLocations;
/// A boolean indicator for each slot listed in the FunctionInfo as to
/// whether it has been used in the current statepoint. Since we try to