LLVM 22.0.0git
JumpTableToSwitch.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "jump-table-to-switch"

Functions

static std::optional< JumpTableTy > parseJumpTable (GetElementPtrInst *GEP, PointerType *PtrTy)
static BasicBlockexpandToSwitch (CallBase *CB, const JumpTableTy &JT, DomTreeUpdater &DTU, OptimizationRemarkEmitter &ORE, llvm::function_ref< GlobalValue::GUID(const Function &)> GetGuidForFunction)

Variables

static cl::opt< unsignedJumpTableSizeThreshold ("jump-table-to-switch-size-threshold", cl::Hidden, cl::desc("Only split jump tables with size less or " "equal than JumpTableSizeThreshold."), cl::init(10))
static cl::opt< unsignedFunctionSizeThreshold ("jump-table-to-switch-function-size-threshold", cl::Hidden, cl::desc("Only split jump tables containing functions whose sizes are less " "or equal than this threshold."), cl::init(50))
cl::opt< boolProfcheckDisableMetadataFixes

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "jump-table-to-switch"

Definition at line 46 of file JumpTableToSwitch.cpp.

Function Documentation

◆ expandToSwitch()

BasicBlock * expandToSwitch ( CallBase * CB,
const JumpTableTy & JT,
DomTreeUpdater & DTU,
OptimizationRemarkEmitter & ORE,
llvm::function_ref< GlobalValue::GUID(const Function &)> GetGuidForFunction )
static

◆ parseJumpTable()

Variable Documentation

◆ FunctionSizeThreshold

cl::opt< unsigned > FunctionSizeThreshold("jump-table-to-switch-function-size-threshold", cl::Hidden, cl::desc("Only split jump tables containing functions whose sizes are less " "or equal than this threshold."), cl::init(50)) ( "jump-table-to-switch-function-size-threshold" ,
cl::Hidden ,
cl::desc("Only split jump tables containing functions whose sizes are less " "or equal than this threshold.") ,
cl::init(50)  )
static

Referenced by parseJumpTable().

◆ JumpTableSizeThreshold

cl::opt< unsigned > JumpTableSizeThreshold("jump-table-to-switch-size-threshold", cl::Hidden, cl::desc("Only split jump tables with size less or " "equal than JumpTableSizeThreshold."), cl::init(10)) ( "jump-table-to-switch-size-threshold" ,
cl::Hidden ,
cl::desc("Only split jump tables with size less or " "equal than JumpTableSizeThreshold.") ,
cl::init(10)  )
static

Referenced by parseJumpTable().

◆ ProfcheckDisableMetadataFixes

cl::opt<bool> ProfcheckDisableMetadataFixes
extern