Home
last modified time | relevance | path

Searched refs:CatchSwitch (Results 1 – 25 of 29) sorted by relevance

12

/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DWinEHPrepare.cpp226 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(TI)) { in getEHPadFromPredecessor() local
227 if (CatchSwitch->getParentPad() != ParentPad) in getEHPadFromPredecessor()
248 assert(FuncInfo.EHPadStateMap.count(CatchSwitch) == 0 && in calculateCXXStateNumbers()
257 FuncInfo.EHPadStateMap[CatchSwitch] = TryLow; in calculateCXXStateNumbers()
373 assert(CatchSwitch->getNumHandlers() == 1 && in calculateSEHStateNumbers()
386 FuncInfo.EHPadStateMap[CatchSwitch] = TryState; in calculateSEHStateNumbers()
440 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(EHPad)) in isTopLevelPadForMSVC() local
442 CatchSwitch->unwindsToCaller(); in isTopLevelPadForMSVC()
595 assert(CatchSwitch->getNumHandlers()); in calculateClrEHStateNumbers()
596 FuncInfo.EHPadStateMap[CatchSwitch] = CatchState; in calculateClrEHStateNumbers()
[all …]
H A DWasmEHPrepare.cpp364 if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(UnwindPad)) in calculateWasmEHInfo() local
366 EHInfo.setUnwindDest(&BB, *CatchSwitch->handlers().begin()); in calculateWasmEHInfo()
H A DTargetLoweringBase.cpp1785 case CatchSwitch: return 0; in InstructionOpcodeToISD()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DInlineFunction.cpp257 if (CatchSwitch->hasUnwindDest()) { in getUnwindDestTokenHelper()
266 for (auto HI = CatchSwitch->handler_begin(), in getUnwindDestTokenHelper()
267 HE = CatchSwitch->handler_end(); in getUnwindDestTokenHelper()
717 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) { in HandleInlinedEHPad() local
718 if (CatchSwitch->unwindsToCaller()) { in HandleInlinedEHPad()
744 CatchSwitch->getParentPad(), UnwindDest, in HandleInlinedEHPad()
745 CatchSwitch->getNumHandlers(), CatchSwitch->getName(), in HandleInlinedEHPad()
746 CatchSwitch); in HandleInlinedEHPad()
747 for (BasicBlock *PadBB : CatchSwitch->handlers()) in HandleInlinedEHPad()
2355 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) { in InlineFunction() local
[all …]
H A DLocal.cpp2384 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Terminator)) { in markAliveBlocks() local
2414 for (CatchSwitchInst::handler_iterator I = CatchSwitch->handler_begin(), in markAliveBlocks()
2415 E = CatchSwitch->handler_end(); in markAliveBlocks()
2424 CatchSwitch->removeHandler(I); in markAliveBlocks()
2461 } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(TI)) { in removeUnwindEdge() local
2463 CatchSwitch->getParentPad(), nullptr, CatchSwitch->getNumHandlers(), in removeUnwindEdge()
2464 CatchSwitch->getName(), CatchSwitch); in removeUnwindEdge()
2465 for (BasicBlock *PadBB : CatchSwitch->handlers()) in removeUnwindEdge()
2469 UnwindDest = CatchSwitch->getUnwindDest(); in removeUnwindEdge()
H A DBasicBlockUtils.cpp650 else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(PadInst)) in ehAwareSplitEdge() local
651 ParentPad = CatchSwitch->getParentPad(); in ehAwareSplitEdge()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGException.cpp962 llvm::CatchSwitchInst *CatchSwitch = in emitCatchPadBlock() local
977 CatchSwitch, {TypeInfo.RTTI, CGF.Builder.getInt32(TypeInfo.Flags), in emitCatchPadBlock()
980 CGF.Builder.CreateCatchPad(CatchSwitch, {TypeInfo.RTTI}); in emitCatchPadBlock()
983 CatchSwitch->addHandler(Handler.Block); in emitCatchPadBlock()
1006 llvm::CatchSwitchInst *CatchSwitch = in emitWasmCatchPadBlock() local
1012 CatchSwitch->addHandler(WasmCatchStartBlock); in emitWasmCatchPadBlock()
1024 auto *CPI = CGF.Builder.CreateCatchPad(CatchSwitch, CatchTypes); in emitWasmCatchPadBlock()
1230 auto *CatchSwitch = in ExitCXXTryStmt() local
1232 WasmCatchStartBlock = CatchSwitch->hasUnwindDest() in ExitCXXTryStmt()
1233 ? CatchSwitch->getSuccessor(1) in ExitCXXTryStmt()
[all …]
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DSparsePropagation.cpp526 CatchSwitchInst *CatchSwitch = in TEST_F() local
528 CatchSwitch->addHandler(Body); in TEST_F()
530 CatchPadInst *CatchPad = Builder.CreateCatchPad(CatchSwitch, {}); in TEST_F()
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DInstruction.h230 case Instruction::CatchSwitch:
649 case Instruction::CatchSwitch:
H A DInstructions.h4442 return I->getOpcode() == Instruction::CatchSwitch;
4500 explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args,
4503 : FuncletPadInst(Instruction::CatchPad, CatchSwitch, Args, Values,
4505 explicit CatchPadInst(Value *CatchSwitch, ArrayRef<Value *> Args,
4508 : FuncletPadInst(Instruction::CatchPad, CatchSwitch, Args, Values,
4512 static CatchPadInst *Create(Value *CatchSwitch, ArrayRef<Value *> Args,
4517 CatchPadInst(CatchSwitch, Args, Values, NameStr, InsertBefore);
4524 CatchPadInst(CatchSwitch, Args, Values, NameStr, InsertAtEnd);
4531 void setCatchSwitch(Value *CatchSwitch) {
4532 assert(CatchSwitch);
[all …]
H A DInstruction.def136 HANDLE_TERM_INST (10, CatchSwitch , CatchSwitchInst)
/llvm-project-15.0.7/llvm/lib/IR/
H A DInstruction.cpp360 case CatchSwitch: return "catchswitch"; in getOpcodeName()
690 if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(this)) in mayThrow() local
691 return CatchSwitch->unwindsToCaller(); in mayThrow()
H A DVerifier.cpp4340 &FPI, FirstUser, CatchSwitch); in visitFuncletPadInst()
4348 BasicBlock *BB = CatchSwitch.getParent(); in visitCatchSwitchInst()
4353 &CatchSwitch); in visitCatchSwitchInst()
4357 Check(BB->getFirstNonPHI() == &CatchSwitch, in visitCatchSwitchInst()
4359 &CatchSwitch); in visitCatchSwitchInst()
4361 auto *ParentPad = CatchSwitch.getParentPad(); in visitCatchSwitchInst()
4370 &CatchSwitch); in visitCatchSwitchInst()
4374 SiblingFuncletInfo[&CatchSwitch] = &CatchSwitch; in visitCatchSwitchInst()
4377 Check(CatchSwitch.getNumHandlers() != 0, in visitCatchSwitchInst()
4385 visitEHPadPredecessors(CatchSwitch); in visitCatchSwitchInst()
[all …]
H A DCore.cpp3281 void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest) { in LLVMAddHandler() argument
3282 unwrap<CatchSwitchInst>(CatchSwitch)->addHandler(unwrap(Dest)); in LLVMAddHandler()
3285 unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch) { in LLVMGetNumHandlers() argument
3286 return unwrap<CatchSwitchInst>(CatchSwitch)->getNumHandlers(); in LLVMGetNumHandlers()
3289 void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers) { in LLVMGetHandlers() argument
3290 CatchSwitchInst *CSI = unwrap<CatchSwitchInst>(CatchSwitch); in LLVMGetHandlers()
3299 void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch) { in LLVMSetParentCatchSwitch() argument
3301 ->setCatchSwitch(unwrap<CatchSwitchInst>(CatchSwitch)); in LLVMSetParentCatchSwitch()
H A DAsmWriter.cpp4065 } else if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(&I)) { in printInstruction() local
4067 writeOperand(CatchSwitch->getParentPad(), /*PrintType=*/false); in printInstruction()
4070 for (const BasicBlock *PadBB : CatchSwitch->handlers()) { in printInstruction()
4077 if (const BasicBlock *UnwindDest = CatchSwitch->getUnwindDest()) in printInstruction()
H A DInstructions.cpp1133 : Instruction(ParentPad->getType(), Instruction::CatchSwitch, nullptr, 0, in CatchSwitchInst()
1144 : Instruction(ParentPad->getType(), Instruction::CatchSwitch, nullptr, 0, in CatchSwitchInst()
1153 : Instruction(CSI.getType(), Instruction::CatchSwitch, nullptr, in CatchSwitchInst()
/llvm-project-15.0.7/llvm/include/llvm-c/
H A DCore.h3781 void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest);
3784 unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch);
3797 void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers);
3823 void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch);
/llvm-project-15.0.7/llvm/lib/Transforms/Coroutines/
H A DCoroFrame.cpp1508 static Instruction *splitBeforeCatchSwitch(CatchSwitchInst *CatchSwitch) { in splitBeforeCatchSwitch() argument
1509 BasicBlock *CurrentBlock = CatchSwitch->getParent(); in splitBeforeCatchSwitch()
1510 BasicBlock *NewBlock = CurrentBlock->splitBasicBlock(CatchSwitch); in splitBeforeCatchSwitch()
1514 CleanupPadInst::Create(CatchSwitch->getParentPad(), {}, "", CurrentBlock); in splitBeforeCatchSwitch()
/llvm-project-15.0.7/llvm/lib/Bitcode/Writer/
H A DBitcodeWriter.cpp2990 case Instruction::CatchSwitch: { in writeInstruction()
2992 const auto &CatchSwitch = cast<CatchSwitchInst>(I); in writeInstruction() local
2994 pushValue(CatchSwitch.getParentPad(), InstID, Vals); in writeInstruction()
2996 unsigned NumHandlers = CatchSwitch.getNumHandlers(); in writeInstruction()
2998 for (const BasicBlock *CatchPadBB : CatchSwitch.handlers()) in writeInstruction()
3001 if (CatchSwitch.hasUnwindDest()) in writeInstruction()
3002 Vals.push_back(VE.getValueID(CatchSwitch.getUnwindDest())); in writeInstruction()
/llvm-project-15.0.7/llvm/lib/AsmParser/
H A DLLLexer.cpp866 INSTKEYWORD(catchswitch, CatchSwitch); in LexIdentifier()
H A DLLParser.cpp6593 auto *CatchSwitch = in parseCatchSwitch() local
6596 CatchSwitch->addHandler(DestBB); in parseCatchSwitch()
6597 Inst = CatchSwitch; in parseCatchSwitch()
6604 Value *CatchSwitch = nullptr; in parseCatchPad() local
6612 if (parseValue(Type::getTokenTy(Context), CatchSwitch, PFS)) in parseCatchPad()
6619 Inst = CatchPadInst::Create(CatchSwitch, Args); in parseCatchPad()
/llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/
H A DIRTranslator.cpp2518 if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Pad)) { in findUnwindDestinations() local
2520 for (const BasicBlock *CatchPadBB : CatchSwitch->handlers()) { in findUnwindDestinations()
2528 NewEHPadBB = CatchSwitch->getUnwindDest(); in findUnwindDestinations()
/llvm-project-15.0.7/llvm/bindings/ocaml/llvm/
H A Dllvm.ml250 | CatchSwitch Constructor
/llvm-project-15.0.7/llvm/lib/Bitcode/Reader/
H A DBitcodeReader.cpp5188 auto *CatchSwitch = in parseFunctionBody() local
5191 CatchSwitch->addHandler(Handler); in parseFunctionBody()
5192 I = CatchSwitch; in parseFunctionBody()
/llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp1792 } else if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Pad)) { in findWasmUnwindDestinations() local
1795 for (const BasicBlock *CatchPadBB : CatchSwitch->handlers()) { in findWasmUnwindDestinations()
1847 } else if (const auto *CatchSwitch = dyn_cast<CatchSwitchInst>(Pad)) { in findUnwindDestinations() local
1849 for (const BasicBlock *CatchPadBB : CatchSwitch->handlers()) { in findUnwindDestinations()
1857 NewEHPadBB = CatchSwitch->getUnwindDest(); in findUnwindDestinations()

12