LLVM 22.0.0git
JumpTableToSwitch.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

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< unsignedllvm::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))
static cl::opt< unsignedllvm::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))

Macro Definition Documentation

◆ DEBUG_TYPE

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

Definition at line 50 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()