Lines Matching defs:clusters
57 std::vector<Cluster> clusters;
81 auto res = secToCluster.try_emplace(isec, clusters.size());
84 clusters.emplace_back(clusters.size(), isec->getSize());
96 // sections. This is done because otherwise we would end up with clusters
107 clusters[to].weight += weight;
113 Cluster &toC = clusters[to];
119 for (Cluster &c : clusters)
123 // It's bad to merge clusters which would degrade the density too much.
153 // Group InputSections into clusters using the Call-Chain Clustering heuristic
154 // then sort the clusters by density.
156 std::vector<int> sorted(clusters.size());
157 std::vector<int> leaders(clusters.size());
162 return clusters[a].getDensity() > clusters[b].getDensity();
167 // clusters[L] has not been merged into another cluster yet.
168 Cluster &c = clusters[l];
178 Cluster *predC = &clusters[predL];
186 mergeClusters(clusters, *predC, predL, c, l);
189 // Sort remaining non-empty clusters by density.
191 for (int i = 0, e = (int)clusters.size(); i != e; ++i)
192 if (clusters[i].size > 0)
195 return clusters[a].getDensity() > clusters[b].getDensity();
205 i = clusters[i].next;
233 i = clusters[i].next;
245 // according to the C³ heuristic. All clusters are then sorted by a density