LLVM 19.0.0git
Macros | Functions | Variables
JumpTableToSwitch.cpp File Reference
#include "llvm/Transforms/Scalar/JumpTableToSwitch.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"

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)
 

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))
 

Macro Definition Documentation

◆ DEBUG_TYPE

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

Definition at line 36 of file JumpTableToSwitch.cpp.

Function Documentation

◆ expandToSwitch()

static BasicBlock * expandToSwitch ( CallBase CB,
const JumpTableTy &  JT,
DomTreeUpdater DTU,
OptimizationRemarkEmitter ORE 
)
static

◆ parseJumpTable()

static std::optional< JumpTableTy > parseJumpTable ( GetElementPtrInst GEP,
PointerType PtrTy 
)
static

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().