[llvm] [CodeLayout] CDSortImpl: remove linear-time erase_value from mergeChains (PR #69276)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 09:04:00 PDT 2023


================
@@ -1027,7 +1027,7 @@ class CDSortImpl {
 
     LLVM_DEBUG(dbgs() << "Cache-directed function sorting reduced the number"
                       << " of chains from " << NumNodes << " to "
-                      << HotChains.size() << "\n");
+                      << NumHotChains << "\n");
----------------
spupyrev wrote:

One can move the debug statement to `concatChains()` where we have access to the number of remaining chains, `SortedChains.size()`. So this variable, NumHotChains, won't be needed

https://github.com/llvm/llvm-project/pull/69276


More information about the llvm-commits mailing list