Home | History | Annotate | Download | only in CodeGen

Lines Matching full:funcinfo

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