[PATCH] D60495: Load balancing for LTO

David Callahan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 18:54:24 PDT 2019


david2050 planned changes to this revision.
david2050 marked 2 inline comments as done.
david2050 added inline comments.


================
Comment at: lib/LTO/LTO.cpp:1305
+  // modules in terms of decreasing size to provide better compile-time
+  // load-balance.
+  using ModuleMapElt = std::pair<StringRef, BitcodeModule>;
----------------
mehdi_amini wrote:
> The ThinLink has access to much fine grain data: like number of function and number of instructions. Have you looked into using this?
> 
I did not explore alternatives. This was effective for the workloads that motivated it so I thought I would share.


================
Comment at: lib/LTO/LTO.cpp:1316
+                     Right.second->second.getBuffer().size();
+            });
+
----------------
mehdi_amini wrote:
> FYI: https://github.com/llvm/llvm-project/blob/master/llvm/lib/LTO/ThinLTOCodeGenerator.cpp#L923
> 
> I used a separate index vector in ThinLTOCodeGenerator to do the same, it may make the code a bit easier to track (less pair<> and `.first->second` kind of thing).
Your implementation is cleaner. I may not have time to retest.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60495





More information about the llvm-commits mailing list