int LookUpDepth) {
// Can not look any further - give up now
if (LookUpDepth <= 0)
- return Optional<int>();
+ return None;
// Spill location is known for gc relocates
if (const auto *Relocate = dyn_cast<GCRelocateInst>(Val)) {
auto It = SpillMap.find(Relocate->getDerivedPtr());
if (It == SpillMap.end())
- return Optional<int>();
+ return None;
return It->second;
}
Optional<int> SpillSlot =
findPreviousSpillSlot(IncomingValue, Builder, LookUpDepth - 1);
if (!SpillSlot.hasValue())
- return Optional<int>();
+ return None;
if (MergedResult.hasValue() && *MergedResult != *SpillSlot)
- return Optional<int>();
+ return None;
MergedResult = SpillSlot;
}
// which we visit values is unspecified.
// Don't know any information about this instruction
- return Optional<int>();
+ return None;
}
/// Try to find existing copies of the incoming values in stack slots used for