[PATCH] D46228: [ELF] Use union-find set in Call-Chain Clustering (C³) heuristic to improve worst-case time complexity.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 12 14:39:04 PDT 2018


ruiu added inline comments.


================
Comment at: ELF/CallGraphSort.cpp:161
 
+static int findLeader(std::vector<int> &Leaders, int V) {
+  while (Leaders[V] != V) {
----------------
I perhaps didn't spent enough effort to understand this function, but it feels something is wrong with this function. The function name implies this function "finds" something, but looks like it actually mutates a given vector.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46228





More information about the llvm-commits mailing list