Use bitcode size as an estimated for compilation time and sort
compilation tasks in order decreasing sizee to provide better
load balance when there are large number of taks.
Details
- Reviewers
mehdi_amini pcc tejohnson
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 30415 Build 30414: arc lint + arc unit
Event Timeline
lib/LTO/LTO.cpp | ||
---|---|---|
1301 | The ThinLink has access to much fine grain data: like number of function and number of instructions. Have you looked into using this? | |
1312 | 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). |
Hello! Would anyone be willing to review this patch? Is there anything that could be tweaked, maybe putting this behavior behind an option, that would make the change more amenable to any reviewers?
Thanks! I think this makes sense, and since this is now the same as what is done in the old LTO API (ThinLTOCodeGenerator.cpp), thinking it would be better to extract into a common helper in LTO.cpp that is called from both places (that way if we find a way to improve the sorting, e.g. some of the other metrics @mehdi_amini mentioned, it only has to be changed in one place).
I added a suggestion a couple hours ago, just for commoning the code between the two LTO APIs.
Looks like I was so slow to type that our answers crossed ;)
It makes sense to me! Thanks.
Hello @david2050! Are you still planning on working on this? If no, can I take over the patch and land it?
The ThinLink has access to much fine grain data: like number of function and number of instructions. Have you looked into using this?