[PATCH] D47565: Fix /WholeArchive bug.

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 12:25:36 PDT 2018


smeenai added a comment.

This diff results in a 30% link time regression for us (5.3 seconds to 6.8 seconds) when linking ~5,000 input files together. This is when cross-compiling on Linux; the results would probably be even worse on Windows, where I believe stat/the filesystem in general is slower.

Is there any way to make this less expensive? I notice we still have the O(n^2) loop comparing every input file to every other input file (using a cached stat result, but still). @rnk had previously suggested building up a set out of inode numbers, which should be O(n) instead; are there problems with that approach?


https://reviews.llvm.org/D47565





More information about the llvm-commits mailing list