Home
last modified time | relevance | path

Searched refs:Clusters (Results 1 – 5 of 5) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DSwitchLoweringUtils.cpp23 uint64_t SwitchCG::getJumpTableRange(const CaseClusterVector &Clusters, in getJumpTableRange() argument
26 const APInt &LowCase = Clusters[First].Low->getValue(); in getJumpTableRange()
27 const APInt &HighCase = Clusters[Last].High->getValue(); in getJumpTableRange()
46 void SwitchCG::SwitchLowering::findJumpTables(CaseClusterVector &Clusters, in findJumpTables() argument
54 assert(!Clusters.empty()); in findJumpTables()
55 for (CaseCluster &C : Clusters) in findJumpTables()
57 for (unsigned i = 1, e = Clusters.size(); i < e; ++i) in findJumpTables()
58 assert(Clusters[i - 1].High->getValue().slt(Clusters[i].Low->getValue())); in findJumpTables()
69 const int64_t N = Clusters.size(); in findJumpTables()
76 const APInt &Hi = Clusters[i].High->getValue(); in findJumpTables()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DSwitchLoweringUtils.h89 /// Sort Clusters and merge adjacent cases.
90 void sortAndRangeify(CaseClusterVector &Clusters);
236 uint64_t getJumpTableRange(const CaseClusterVector &Clusters, unsigned First,
276 void findJumpTables(CaseClusterVector &Clusters, const SwitchInst *SI,
280 bool buildJumpTable(const CaseClusterVector &Clusters, unsigned First,
285 void findBitTestClusters(CaseClusterVector &Clusters, const SwitchInst *SI);
287 /// Build a bit test cluster from Clusters[First..Last]. Returns false if it
289 bool buildBitTests(CaseClusterVector &Clusters, unsigned First, unsigned Last,
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DIRTranslator.cpp696 CaseClusterVector Clusters; in translateSwitch() local
697 Clusters.reserve(SI.getNumCases()); in translateSwitch()
705 Clusters.push_back(CaseCluster::range(CaseVal, CaseVal, Succ, Prob)); in translateSwitch()
713 sortAndRangeify(Clusters); in translateSwitch()
718 if (Clusters.empty()) { in translateSwitch()
725 SL->findJumpTables(Clusters, &SI, std::nullopt, DefaultMBB, nullptr, nullptr); in translateSwitch()
726 SL->findBitTestClusters(Clusters, &SI); in translateSwitch()
730 for (const CaseCluster &C : Clusters) { in translateSwitch()
746 assert(!Clusters.empty()); in translateSwitch()
748 CaseClusterIt First = Clusters.begin(); in translateSwitch()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp12254 const SwitchInst &SI, CaseClusterVector &Clusters, in peelDominantCaseCluster() argument
12258 if (SwitchPeelThreshold > 100 || !FuncInfo.BPI || Clusters.size() < 2 || in peelDominantCaseCluster()
12266 for (unsigned Index = 0; Index < Clusters.size(); ++Index) { in peelDominantCaseCluster()
12267 CaseCluster &CC = Clusters[Index]; in peelDominantCaseCluster()
12288 auto PeeledCaseIt = Clusters.begin() + PeeledCaseIndex; in peelDominantCaseCluster()
12293 Clusters.erase(PeeledCaseIt); in peelDominantCaseCluster()
12294 for (CaseCluster &CC : Clusters) { in peelDominantCaseCluster()
12308 CaseClusterVector Clusters; in visitSwitch() local
12309 Clusters.reserve(SI.getNumCases()); in visitSwitch()
12316 Clusters.push_back(CaseCluster::range(CaseVal, CaseVal, Succ, Prob)); in visitSwitch()
[all …]
H A DSelectionDAGBuilder.h216 SwitchCG::CaseClusterVector &Clusters,