forked from OSchip/llvm-project
[coff] default to multiple parallel ThinLTO jobs
Summary: lld-link allows the number of parallel ThinLTO jobs to be specified using /opt:lldltojobs=N. If left unspecified, the implementation conservatively defaults to 1. This leads to very long link times. This change makes it so that the default is to automatically set the parallelism, as we do in the ELF linker. Reviewers: ruiu, hans Reviewed By: ruiu, hans Subscribers: pcc, mehdi_amini, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D31986 llvm-svn: 300089
This commit is contained in:
parent
336c78fdbe
commit
dd4b4325ee
|
@ -115,7 +115,7 @@ struct Configuration {
|
|||
unsigned LTOOptLevel = 2;
|
||||
|
||||
// Used for /opt:lldltojobs=N
|
||||
unsigned LTOJobs = 1;
|
||||
unsigned LTOJobs = 0;
|
||||
// Used for /opt:lldltopartitions=N
|
||||
unsigned LTOPartitions = 1;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ static std::unique_ptr<lto::LTO> createLTO() {
|
|||
checkError(Conf.addSaveTemps(std::string(Config->OutputFile) + ".",
|
||||
/*UseInputModulePath*/ true));
|
||||
lto::ThinBackend Backend;
|
||||
if (Config->LTOJobs != -1u)
|
||||
if (Config->LTOJobs != 0)
|
||||
Backend = lto::createInProcessThinBackend(Config->LTOJobs);
|
||||
return llvm::make_unique<lto::LTO>(std::move(Conf), Backend,
|
||||
Config->LTOPartitions);
|
||||
|
|
Loading…
Reference in New Issue