Lines Matching defs:clusters
70 std::vector<Cluster> clusters;
84 auto res = secToCluster.try_emplace(isec, clusters.size());
87 clusters.emplace_back(clusters.size(), isec->getSize());
98 // sections. This is done because otherwise we would end up with clusters
109 clusters[to].weight += weight;
115 Cluster &toC = clusters[to];
121 for (Cluster &c : clusters)
125 // It's bad to merge clusters which would degrade the density too much.
155 // Group InputSections into clusters using the Call-Chain Clustering heuristic
156 // then sort the clusters by density.
161 std::vector<int> sorted(clusters.size());
163 std::vector<int> leaders(clusters.size());
169 return clusters[a].getDensity() > clusters[b].getDensity();
174 // clusters[L] has not been merged into another cluster yet.
175 Cluster &c = clusters[l];
186 Cluster *predC = &clusters[predL];
194 mergeClusters(clusters, *predC, predL, c, l);
196 // Sort remaining non-empty clusters by density.
198 for (int i = 0, e = (int)clusters.size(); i != e; ++i)
199 if (clusters[i].size > 0)
202 return clusters[a].getDensity() > clusters[b].getDensity();
209 int curOrder = -clusters.size();
213 i = clusters[i].next;
239 i = clusters[i].next;
364 // sections according to the C³ heuristic. All clusters are then sorted by a