Go to the source code of this file.
◆ DEBUG_TYPE
#define DEBUG_TYPE "jump-table-to-switch" |
◆ expandToSwitch()
Definition at line 93 of file JumpTableToSwitch.cpp.
References llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdates(), B, llvm::Instruction::clone(), llvm::BranchInst::Create(), llvm::BasicBlock::Create(), llvm::IRBuilderBase::CreatePHI(), llvm::IRBuilderBase::CreateSwitch(), llvm::IRBuilderBase::CreateUnreachable(), DEBUG_TYPE, llvm::OptimizationRemarkEmitter::emit(), llvm::enumerate(), llvm::Instruction::eraseFromParent(), F, llvm::Value::getContext(), llvm::Value::getName(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::BasicBlock::getParent(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::Type::getVoidTy(), PHI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Value::replaceAllUsesWith(), llvm::SplitBlock(), and llvm::CallingConv::Tail.
Referenced by llvm::JumpTableToSwitchPass::run().
◆ parseJumpTable()
Definition at line 45 of file JumpTableToSwitch.cpp.
References llvm::BitWidth, llvm::CallingConv::C, llvm::ConstantFoldLoadFromConst(), DL, F, llvm::MapVector< KeyT, ValueT, MapType, VectorType >::front(), FunctionSizeThreshold, GEP, llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getValueType(), llvm::APInt::getZExtValue(), llvm::GlobalVariable::hasDefinitiveInitializer(), llvm::GlobalVariable::isConstant(), llvm::APInt::isZero(), JumpTableSizeThreshold, N, llvm::Offset, Ptr, and llvm::MapVector< KeyT, ValueT, MapType, VectorType >::size().
Referenced by llvm::JumpTableToSwitchPass::run().
◆ 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 |
◆ 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 |