[PATCH] D81429: [COFF] Port CallGraphSort to COFF from ELF

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 16:06:43 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/COFF/CallGraphSort.cpp:95
+// Maximum cluster size in bytes.
+constexpr uint64_t MAX_CLUSTER_SIZE = 1024 * 1024;
+} // end anonymous namespace
----------------
This is pretty arbitrary as well.


================
Comment at: lld/COFF/CallGraphSort.cpp:198
+    // Don't consider merging if the edge is unlikely.
+    if (c.bestPred.from == -1 || c.bestPred.weight * 10 <= c.initialWeight)
+      continue;
----------------
The coefficient is pretty arbitrary. Best if you can test which constant works well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81429/new/

https://reviews.llvm.org/D81429





More information about the llvm-commits mailing list