LLVM 24.0.0git
JumpTableToSwitch.cpp File Reference

Go to the source code of this file.

Macros

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

Functions

 STATISTIC (NumEligibleJumpTables, "The number of jump tables seen by the pass " "that can be converted if deemed profitable.")
 STATISTIC (NumJumpTablesConverted, "The number of jump tables converted into switches.")
static std::optional< JumpTableTy > parseJumpTable (GetElementPtrInst *GEP, PointerType *PtrTy, FunctionType *CallFTy)
static BasicBlock * expandToSwitch (CallBase *CB, const JumpTableTy &JT, DomTreeUpdater &DTU, OptimizationRemarkEmitter &ORE, llvm::function_ref< GlobalValue::GUID(const Function &)> GetGuidForFunction)

Macro Definition Documentation

◆ DEBUG_TYPE

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

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

◆ STATISTIC() [1/2]

STATISTIC ( NumEligibleJumpTables ,
"The number of jump tables seen by the pass " "that can be converted if deemed profitable."  )

◆ STATISTIC() [2/2]

STATISTIC ( NumJumpTablesConverted ,
"The number of jump tables converted into switches."  )