[lld] [ELF] Parallelize input file loading (PR #191690)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 23:47:58 PDT 2026
================
@@ -186,17 +201,20 @@ class LinkerDriver {
private:
Ctx &ctx;
void createFiles(llvm::opt::InputArgList &args);
+ void loadFiles();
void inferMachineType();
template <class ELFT> void link(llvm::opt::InputArgList &args);
template <class ELFT> void compileBitcodeFiles(bool skipLinkedOutput);
- bool tryAddFatLTOFile(MemoryBufferRef mb, StringRef archiveName,
- uint64_t offsetInArchive, bool lazy);
// True if we are in --whole-archive and --no-whole-archive.
bool inWholeArchive = false;
// True if we are in --start-lib and --end-lib.
bool inLib = false;
+ // True inside createFiles(): defers to loadFiles().
+ bool deferLoad = false;
----------------
MaskRay wrote:
prototyped the parameter version to compare. addFile, addLibrary, and readLinkerScript all grow a bool `deferLoad` parameter. Net ~+6 lines and 3 API signatures change.
I feel that we should stick with the member variable.
https://github.com/llvm/llvm-project/pull/191690
More information about the llvm-commits
mailing list