Estimate how many case clusters SI would lower into.
Declared in <llvm/CodeGen/BasicTTIImpl.h>
unsigned int
getEstimatedNumberOfCaseClusters(
SwitchInst const& SI,
unsigned int& JumpTableSize,
ProfileSummaryInfo* PSI,
BlockFrequencyInfo* BFI) const override;
The number of clusters identified here can differ from lowering. Switches lowered with a mix of jump table / bit test / BTree are ignored. Useful for inline cost and other heuristics such as loop unrolling.
The estimated number of case clusters SI would lower into.
| Name | Description |
|---|---|
| SI | Switch instruction being analyzed. |
| JumpTableSize | Set to the jump-table size when a table is suitable. |
| PSI | Optional profile summary info. |
| BFI | Optional block frequency info. |