LLVM 19.0.0git
Public Member Functions | List of all members
llvm::SelectionDAGBuilder::SDAGSwitchLowering Class Reference

#include "CodeGen/SelectionDAG/SelectionDAGBuilder.h"

Inheritance diagram for llvm::SelectionDAGBuilder::SDAGSwitchLowering:
Inheritance graph

Public Member Functions

 SDAGSwitchLowering (SelectionDAGBuilder *sdb, FunctionLoweringInfo &funcinfo)
void addSuccessorWithProb (MachineBasicBlock *Src, MachineBasicBlock *Dst, BranchProbability Prob=BranchProbability::getUnknown()) override
- Public Member Functions inherited from llvm::SwitchCG::SwitchLowering
 SwitchLowering (FunctionLoweringInfo &funcinfo)
void init (const TargetLowering &tli, const TargetMachine &tm, const DataLayout &dl)
void findJumpTables (CaseClusterVector &Clusters, const SwitchInst *SI, std::optional< SDLoc > SL, MachineBasicBlock *DefaultMBB, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
bool buildJumpTable (const CaseClusterVector &Clusters, unsigned First, unsigned Last, const SwitchInst *SI, const std::optional< SDLoc > &SL, MachineBasicBlock *DefaultMBB, CaseCluster &JTCluster)
void findBitTestClusters (CaseClusterVector &Clusters, const SwitchInst *SI)
bool buildBitTests (CaseClusterVector &Clusters, unsigned First, unsigned Last, const SwitchInst *SI, CaseCluster &BTCluster)
 Build a bit test cluster from Clusters[First..Last].
virtual void addSuccessorWithProb (MachineBasicBlock *Src, MachineBasicBlock *Dst, BranchProbability Prob=BranchProbability::getUnknown())=0
unsigned caseClusterRank (const CaseCluster &CC, CaseClusterIt First, CaseClusterIt Last)
 Determine the rank by weight of CC in [First,Last].
SplitWorkItemInfo computeSplitWorkItemInfo (const SwitchWorkListItem &W)
 Compute information to balance the tree based on branch probabilities to create a near-optimal (in terms of search time given key frequency) binary search tree.
virtual ~SwitchLowering ()=default

Additional Inherited Members

- Public Attributes inherited from llvm::SwitchCG::SwitchLowering
std::vector< CaseBlockSwitchCases
 Vector of CaseBlock structures used to communicate SwitchInst code generation information.
std::vector< JumpTableBlockJTCases
 Vector of JumpTable structures used to communicate SwitchInst code generation information.
std::vector< BitTestBlockBitTestCases
 Vector of BitTestBlock structures used to communicate SwitchInst code generation information.

Detailed Description

Definition at line 232 of file SelectionDAGBuilder.h.

Constructor & Destructor Documentation

◆ SDAGSwitchLowering()

llvm::SelectionDAGBuilder::SDAGSwitchLowering::SDAGSwitchLowering ( SelectionDAGBuilder sdb,
FunctionLoweringInfo funcinfo 

Definition at line 234 of file SelectionDAGBuilder.h.

Member Function Documentation

◆ addSuccessorWithProb()

void llvm::SelectionDAGBuilder::SDAGSwitchLowering::addSuccessorWithProb ( MachineBasicBlock Src,
MachineBasicBlock Dst,
BranchProbability  Prob = BranchProbability::getUnknown() 

Implements llvm::SwitchCG::SwitchLowering.

Definition at line 237 of file SelectionDAGBuilder.h.

The documentation for this class was generated from the following file: