static bool isStateStoreNeeded(EHPersonality Personality, CallSite CS) { if (!CS) return false; if (isAsynchronousEHPersonality(Personality)) return !CS.doesNotAccessMemory(); return !CS.doesNotThrow(); }
AliasAnalysis::ModRefBehavior AliasAnalysis::getModRefBehavior(CallSite CS, std::vector<PointerAccessInfo> *Info) { if (CS.doesNotAccessMemory()) // Can't do better than this. return DoesNotAccessMemory; ModRefBehavior MRB = getModRefBehavior(CS.getCalledFunction(), Info); if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory()) return OnlyReadsMemory; return MRB; }
bool WinEHStatePass::isStateStoreNeeded(EHPersonality Personality, CallSite CS) { if (!CS) return false; // If the function touches memory, it needs a state store. if (isAsynchronousEHPersonality(Personality)) return !CS.doesNotAccessMemory(); // If the function throws, it needs a state store. return !CS.doesNotThrow(); }