Lines Matching refs:FuncInfo

121 static int addUnwindMapEntry(WinEHFuncInfo &FuncInfo, int ToState,  in addUnwindMapEntry()  argument
126 FuncInfo.CxxUnwindMap.push_back(UME); in addUnwindMapEntry()
127 return FuncInfo.getLastStateNumber(); in addUnwindMapEntry()
130 static void addTryBlockMapEntry(WinEHFuncInfo &FuncInfo, int TryLow, in addTryBlockMapEntry() argument
154 FuncInfo.TryBlockMap.push_back(TBME); in addTryBlockMapEntry()
165 WinEHFuncInfo &FuncInfo) { in calculateStateNumbersForInvokes() argument
193 auto BaseStateI = FuncInfo.FuncletBaseStateMap.find(FuncletPad); in calculateStateNumbersForInvokes()
194 if (BaseStateI != FuncInfo.FuncletBaseStateMap.end()) in calculateStateNumbersForInvokes()
199 FuncInfo.InvokeStateMap[II] = BaseState; in calculateStateNumbersForInvokes()
202 assert(FuncInfo.EHPadStateMap.count(PadInst) && "EH Pad has no state!"); in calculateStateNumbersForInvokes()
203 FuncInfo.InvokeStateMap[II] = FuncInfo.EHPadStateMap[PadInst]; in calculateStateNumbersForInvokes()
227 static void calculateCXXStateNumbers(WinEHFuncInfo &FuncInfo, in calculateCXXStateNumbers() argument
234 assert(FuncInfo.EHPadStateMap.count(CatchSwitch) == 0 && in calculateCXXStateNumbers()
242 int TryLow = addUnwindMapEntry(FuncInfo, ParentState, nullptr); in calculateCXXStateNumbers()
243 FuncInfo.EHPadStateMap[CatchSwitch] = TryLow; in calculateCXXStateNumbers()
247 calculateCXXStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(), in calculateCXXStateNumbers()
249 int CatchLow = addUnwindMapEntry(FuncInfo, ParentState, nullptr); in calculateCXXStateNumbers()
254 FuncInfo.FuncletBaseStateMap[CatchPad] = CatchLow; in calculateCXXStateNumbers()
260 calculateCXXStateNumbers(FuncInfo, UserI, CatchLow); in calculateCXXStateNumbers()
268 calculateCXXStateNumbers(FuncInfo, UserI, CatchLow); in calculateCXXStateNumbers()
272 int CatchHigh = FuncInfo.getLastStateNumber(); in calculateCXXStateNumbers()
273 addTryBlockMapEntry(FuncInfo, TryLow, TryHigh, CatchHigh, Handlers); in calculateCXXStateNumbers()
283 if (FuncInfo.EHPadStateMap.count(CleanupPad)) in calculateCXXStateNumbers()
286 int CleanupState = addUnwindMapEntry(FuncInfo, ParentState, BB); in calculateCXXStateNumbers()
287 FuncInfo.EHPadStateMap[CleanupPad] = CleanupState; in calculateCXXStateNumbers()
293 calculateCXXStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(), in calculateCXXStateNumbers()
306 static int addSEHExcept(WinEHFuncInfo &FuncInfo, int ParentState, in addSEHExcept() argument
313 FuncInfo.SEHUnwindMap.push_back(Entry); in addSEHExcept()
314 return FuncInfo.SEHUnwindMap.size() - 1; in addSEHExcept()
317 static int addSEHFinally(WinEHFuncInfo &FuncInfo, int ParentState, in addSEHFinally() argument
324 FuncInfo.SEHUnwindMap.push_back(Entry); in addSEHFinally()
325 return FuncInfo.SEHUnwindMap.size() - 1; in addSEHFinally()
328 static void calculateSEHStateNumbers(WinEHFuncInfo &FuncInfo, in calculateSEHStateNumbers() argument
335 assert(FuncInfo.EHPadStateMap.count(CatchSwitch) == 0 && in calculateSEHStateNumbers()
350 int TryState = addSEHExcept(FuncInfo, ParentState, Filter, CatchPadBB); in calculateSEHStateNumbers()
353 FuncInfo.EHPadStateMap[CatchSwitch] = TryState; in calculateSEHStateNumbers()
359 calculateSEHStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(), in calculateSEHStateNumbers()
369 calculateSEHStateNumbers(FuncInfo, UserI, ParentState); in calculateSEHStateNumbers()
377 calculateSEHStateNumbers(FuncInfo, UserI, ParentState); in calculateSEHStateNumbers()
385 if (FuncInfo.EHPadStateMap.count(CleanupPad)) in calculateSEHStateNumbers()
388 int CleanupState = addSEHFinally(FuncInfo, ParentState, BB); in calculateSEHStateNumbers()
389 FuncInfo.EHPadStateMap[CleanupPad] = CleanupState; in calculateSEHStateNumbers()
395 calculateSEHStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(), in calculateSEHStateNumbers()
419 WinEHFuncInfo &FuncInfo) { in calculateSEHStateNumbers() argument
421 if (!FuncInfo.SEHUnwindMap.empty()) in calculateSEHStateNumbers()
430 ::calculateSEHStateNumbers(FuncInfo, FirstNonPHI, -1); in calculateSEHStateNumbers()
433 calculateStateNumbersForInvokes(Fn, FuncInfo); in calculateSEHStateNumbers()
437 WinEHFuncInfo &FuncInfo) { in calculateWinCXXEHStateNumbers() argument
439 if (!FuncInfo.EHPadStateMap.empty()) in calculateWinCXXEHStateNumbers()
448 calculateCXXStateNumbers(FuncInfo, FirstNonPHI, -1); in calculateWinCXXEHStateNumbers()
451 calculateStateNumbersForInvokes(Fn, FuncInfo); in calculateWinCXXEHStateNumbers()
454 static int addClrEHHandler(WinEHFuncInfo &FuncInfo, int HandlerParentState, in addClrEHHandler() argument
463 FuncInfo.ClrEHUnwindMap.push_back(Entry); in addClrEHHandler()
464 return FuncInfo.ClrEHUnwindMap.size() - 1; in addClrEHHandler()
468 WinEHFuncInfo &FuncInfo) { in calculateClrEHStateNumbers() argument
470 if (!FuncInfo.EHPadStateMap.empty()) in calculateClrEHStateNumbers()
528 int CleanupState = addClrEHHandler(FuncInfo, HandlerParentState, -1, in calculateClrEHStateNumbers()
536 FuncInfo.EHPadStateMap[Cleanup] = CleanupState; in calculateClrEHStateNumbers()
552 addClrEHHandler(FuncInfo, HandlerParentState, FollowerState, in calculateClrEHStateNumbers()
560 FuncInfo.EHPadStateMap[Catch] = CatchState; in calculateClrEHStateNumbers()
564 FuncInfo.EHPadStateMap[CatchSwitch] = CatchState; in calculateClrEHStateNumbers()
571 for (auto Entry = FuncInfo.ClrEHUnwindMap.rbegin(), in calculateClrEHStateNumbers()
572 End = FuncInfo.ClrEHUnwindMap.rend(); in calculateClrEHStateNumbers()
607 int UserState = FuncInfo.EHPadStateMap[ChildCleanup]; in calculateClrEHStateNumbers()
609 FuncInfo.ClrEHUnwindMap[UserState].TryParentState; in calculateClrEHStateNumbers()
611 UserUnwindDest = FuncInfo.ClrEHUnwindMap[UserUnwindState] in calculateClrEHStateNumbers()
659 UnwindDestState = FuncInfo.EHPadStateMap[UnwindDest->getFirstNonPHI()]; in calculateClrEHStateNumbers()
666 calculateStateNumbersForInvokes(Fn, FuncInfo); in calculateClrEHStateNumbers()