Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
WinEHPrepare.cpp File Reference

Go to the source code of this file.

Classes

struct  WorkItem

Macros

#define DEBUG_TYPE   "win-eh-prepare"

Functions

 INITIALIZE_PASS (WinEHPrepare, DEBUG_TYPE, "Prepare Windows exceptions", false, false) FunctionPass *llvm
static int addUnwindMapEntry (WinEHFuncInfo &FuncInfo, int ToState, const BasicBlock *BB)
static void addTryBlockMapEntry (WinEHFuncInfo &FuncInfo, int TryLow, int TryHigh, int CatchHigh, ArrayRef< const CatchPadInst * > Handlers)
static BasicBlockgetCleanupRetUnwindDest (const CleanupPadInst *CleanupPad)
static void calculateStateNumbersForInvokes (const Function *Fn, WinEHFuncInfo &FuncInfo)
static const BasicBlockgetEHPadFromPredecessor (const BasicBlock *BB, Value *ParentPad)
static void calculateCXXStateNumbers (WinEHFuncInfo &FuncInfo, const Instruction *FirstNonPHI, int ParentState)
static int addSEHExcept (WinEHFuncInfo &FuncInfo, int ParentState, const Function *Filter, const BasicBlock *Handler)
static int addSEHFinally (WinEHFuncInfo &FuncInfo, int ParentState, const BasicBlock *Handler)
static void calculateSEHStateNumbers (WinEHFuncInfo &FuncInfo, const Instruction *FirstNonPHI, int ParentState)
static bool isTopLevelPadForMSVC (const Instruction *EHPad)
static int addClrEHHandler (WinEHFuncInfo &FuncInfo, int HandlerParentState, int TryParentState, ClrHandlerType HandlerType, uint32_t TypeToken, const BasicBlock *Handler)

Variables

static cl::opt< boolDisableDemotion ("disable-demotion", cl::Hidden, cl::desc("Clone multicolor basic blocks but do not demote cross scopes"), cl::init(false))
static cl::opt< boolDisableCleanups ("disable-cleanups", cl::Hidden, cl::desc("Do not remove implausible terminators or other similar cleanups"), cl::init(false))
static cl::opt< boolDemoteCatchSwitchPHIOnlyOpt ("demote-catchswitch-only", cl::Hidden, cl::desc("Demote catchswitch BBs only (for wasm EH)"), cl::init(false))

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "win-eh-prepare"

Definition at line 43 of file WinEHPrepare.cpp.

Function Documentation

◆ addClrEHHandler()

int addClrEHHandler ( WinEHFuncInfo & FuncInfo,
int HandlerParentState,
int TryParentState,
ClrHandlerType HandlerType,
uint32_t TypeToken,
const BasicBlock * Handler )
static

◆ addSEHExcept()

int addSEHExcept ( WinEHFuncInfo & FuncInfo,
int ParentState,
const Function * Filter,
const BasicBlock * Handler )
static

◆ addSEHFinally()

int addSEHFinally ( WinEHFuncInfo & FuncInfo,
int ParentState,
const BasicBlock * Handler )
static

◆ addTryBlockMapEntry()

◆ addUnwindMapEntry()

◆ calculateCXXStateNumbers()

◆ calculateSEHStateNumbers()

◆ calculateStateNumbersForInvokes()

◆ getCleanupRetUnwindDest()

BasicBlock * getCleanupRetUnwindDest ( const CleanupPadInst * CleanupPad)
static

◆ getEHPadFromPredecessor()

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( WinEHPrepare ,
DEBUG_TYPE ,
"Prepare Windows exceptions" ,
false ,
false  )

Definition at line 124 of file WinEHPrepare.cpp.

References llvm::createWinEHPass(), and DEBUG_TYPE.

◆ isTopLevelPadForMSVC()

bool isTopLevelPadForMSVC ( const Instruction * EHPad)
static

Variable Documentation

◆ DemoteCatchSwitchPHIOnlyOpt

cl::opt< bool > DemoteCatchSwitchPHIOnlyOpt("demote-catchswitch-only", cl::Hidden, cl::desc("Demote catchswitch BBs only (for wasm EH)"), cl::init(false)) ( "demote-catchswitch-only" ,
cl::Hidden ,
cl::desc("Demote catchswitch BBs only (for wasm EH)") ,
cl::init(false)  )
static

◆ DisableCleanups

cl::opt< bool > DisableCleanups("disable-cleanups", cl::Hidden, cl::desc("Do not remove implausible terminators or other similar cleanups"), cl::init(false)) ( "disable-cleanups" ,
cl::Hidden ,
cl::desc("Do not remove implausible terminators or other similar cleanups") ,
cl::init(false)  )
static

◆ DisableDemotion

cl::opt< bool > DisableDemotion("disable-demotion", cl::Hidden, cl::desc( "Clone multicolor basic blocks but do not demote cross scopes"), cl::init(false)) ( "disable-demotion" ,
cl::Hidden ,
cl::desc( "Clone multicolor basic blocks but do not demote cross scopes") ,
cl::init(false)  )
static