[PATCH] D125800: [COFF] Add vfsoverlay flag
Alex Brachet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 11:50:19 PDT 2022
abrachet added a comment.
In D125800#3615601 <https://reviews.llvm.org/D125800#3615601>, @hans wrote:
> Have you checked whether this affects the performance when linking something large-ish without the vfs overlay?
I did not, but can if you believe it could reasonably affect performance. My thinking is that this only adds an if statement to each `findFile` invocation, which for COFF seems to be very rare, and even for ld.lld which would end up searching for files much more frequently, the cost that one check per findFile doesn't seem high.
================
Comment at: lld/COFF/Driver.cpp:453
sys::path::append(path, filename);
+ path = SmallString<128>{getFilename(path.str())};
if (sys::fs::exists(path.str()))
----------------
hans wrote:
> Is the explicit SmallString constructor call needed, or would just `path = getFilename(...)` work?
That makes the SmallString ctor fail with an assertion "Attempting to reference an element of the vector in an operation that invalidates it"
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125800/new/
https://reviews.llvm.org/D125800
More information about the llvm-commits
mailing list