Home | History | Annotate | Download | only in CodeGen

Lines Matching full:funcinfo

116 static int addUnwindMapEntry(WinEHFuncInfo &FuncInfo, int ToState,
121 FuncInfo.CxxUnwindMap.push_back(UME);
122 return FuncInfo.getLastStateNumber();
125 static void addTryBlockMapEntry(WinEHFuncInfo &FuncInfo, int TryLow,
148 FuncInfo.TryBlockMap.push_back(TBME);
159 WinEHFuncInfo &FuncInfo) {
188 auto BaseStateI = FuncInfo.FuncletBaseStateMap.find(FuncletPad);
189 if (BaseStateI != FuncInfo.FuncletBaseStateMap.end())
194 FuncInfo.InvokeStateMap[II] = BaseState;
197 assert(FuncInfo.EHPadStateMap.count(PadInst) && "EH Pad has no state!");
198 FuncInfo.InvokeStateMap[II] = FuncInfo.EHPadStateMap[PadInst];
222 static void calculateCXXStateNumbers(WinEHFuncInfo &FuncInfo,
229 assert(FuncInfo.EHPadStateMap.count(CatchSwitch) == 0 &&
237 int TryLow = addUnwindMapEntry(FuncInfo, ParentState, nullptr);
238 FuncInfo.EHPadStateMap[CatchSwitch] = TryLow;
242 calculateCXXStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(),
244 int CatchLow = addUnwindMapEntry(FuncInfo, ParentState, nullptr);
249 FuncInfo.FuncletBaseStateMap[CatchPad] = CatchLow;
253 calculateCXXStateNumbers(FuncInfo, UserI, CatchLow);
256 int CatchHigh = FuncInfo.getLastStateNumber();
257 addTryBlockMapEntry(FuncInfo, TryLow, TryHigh, CatchHigh, Handlers);
267 if (FuncInfo.EHPadStateMap.count(CleanupPad))
270 int CleanupState = addUnwindMapEntry(FuncInfo, ParentState, BB);
271 FuncInfo.EHPadStateMap[CleanupPad] = CleanupState;
277 calculateCXXStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(),
290 static int addSEHExcept(WinEHFuncInfo &FuncInfo, int ParentState,
297 FuncInfo.SEHUnwindMap.push_back(Entry);
298 return FuncInfo.SEHUnwindMap.size() - 1;
301 static int addSEHFinally(WinEHFuncInfo &FuncInfo, int ParentState,
308 FuncInfo.SEHUnwindMap.push_back(Entry);
309 return FuncInfo.SEHUnwindMap.size() - 1;
312 static void calculateSEHStateNumbers(WinEHFuncInfo &FuncInfo,
319 assert(FuncInfo.EHPadStateMap.count(CatchSwitch) == 0 &&
334 int TryState = addSEHExcept(FuncInfo, ParentState, Filter, CatchPadBB);
337 FuncInfo.EHPadStateMap[CatchSwitch] = TryState;
343 calculateSEHStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(),
351 calculateSEHStateNumbers(FuncInfo, UserI, ParentState);
359 if (FuncInfo.EHPadStateMap.count(CleanupPad))
362 int CleanupState = addSEHFinally(FuncInfo, ParentState, BB);
363 FuncInfo.EHPadStateMap[CleanupPad] = CleanupState;
369 calculateSEHStateNumbers(FuncInfo, PredBlock->getFirstNonPHI(),
393 WinEHFuncInfo &FuncInfo) {
395 if (!FuncInfo.SEHUnwindMap.empty())
404 ::calculateSEHStateNumbers(FuncInfo, FirstNonPHI, -1);
407 calculateStateNumbersForInvokes(Fn, FuncInfo);
411 WinEHFuncInfo &FuncInfo) {
413 if (!FuncInfo.EHPadStateMap.empty())
422 calculateCXXStateNumbers(FuncInfo, FirstNonPHI, -1);
425 calculateStateNumbersForInvokes(Fn, FuncInfo);
428 FuncInfo, int ParentState,
436 FuncInfo.ClrEHUnwindMap.push_back(Entry);
437 return FuncInfo.ClrEHUnwindMap.size() - 1;
441 WinEHFuncInfo &FuncInfo) {
443 if (!FuncInfo.EHPadStateMap.empty())
471 if (FuncInfo.EHPadStateMap.count(Cleanup))
479 addClrEHHandler(FuncInfo, ParentState, HandlerType, 0, PadBlock);
480 FuncInfo.EHPadStateMap[Cleanup] = NewState;
490 FuncInfo.EHPadStateMap[CatchSwitch] = ParentState;
498 NewState = addClrEHHandler(FuncInfo, NewState, ClrHandlerType::Catch,
500 FuncInfo.EHPadStateMap[Catch] = NewState;
522 calculateStateNumbersForInvokes(Fn, FuncInfo);
537 WinEHFuncInfo &FuncInfo) {
550 FuncInfo.CatchRetSuccessorColorMap[CatchRet] = Color;