LLVM: lib/Transforms/Scalar/JumpTableToSwitch.cpp File Reference (original) (raw)

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"
Variables
static 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))
static 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))

DEBUG_TYPE

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

expandToSwitch()

Definition at line 106 of file JumpTableToSwitch.cpp.

References llvm::all_of(), llvm::any_of(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdates(), assert(), B(), llvm::CallingConv::C, Call, llvm::cast(), llvm::Instruction::clone(), llvm::BasicBlock::Create(), llvm::BranchInst::Create(), llvm::IRBuilderBase::CreatePHI(), llvm::IRBuilderBase::CreateUnreachable(), DEBUG_TYPE, llvm::DominatorTreeBase< BasicBlock, false >::Delete, llvm::downscaleWeights(), llvm::OptimizationRemarkEmitter::emit(), llvm::enumerate(), llvm::Instruction::eraseFromParent(), F, G, llvm::Value::getContext(), llvm::Instruction::getMetadata(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::getValueProfDataFromInst(), llvm::Type::getVoidTy(), llvm::DominatorTreeBase< BasicBlock, false >::Insert, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::isValueProfileMD(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup_or(), PHI, llvm::ProfcheckDisableMetadataFixes, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Value::replaceAllUsesWith(), llvm::SmallVectorImpl< T >::reserve(), llvm::setBranchWeights(), llvm::setExplicitlyUnknownBranchWeights(), llvm::SplitBlock(), and llvm::CallingConv::Tail.

Referenced by llvm::JumpTableToSwitchPass::run().

parseJumpTable()

Definition at line 57 of file JumpTableToSwitch.cpp.

References llvm::BitWidth, llvm::CallingConv::C, llvm::ConstantFoldLoadFromConst(), DL, llvm::dyn_cast(), llvm::dyn_cast_or_null(), 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, 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