[lld] r287237 - Enable -threads by default.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 09:06:51 PST 2016
Author: ruiu
Date: Thu Nov 17 11:06:51 2016
New Revision: 287237
URL: http://llvm.org/viewvc/llvm-project?rev=287237&view=rev
Log:
Enable -threads by default.
LLD supports multi-threading, and it seems to be working well as
you can see in r287140. In short, LLD runs a few percent to 30%
faster with -threads and more than 50% faster if you are using
-build-id (your mileage may vary depending on your computer).
However, I don't think most users even don't know about that because
-threads is not a default option.
This patch enables it by default.
Discussion thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/107160.html
Modified:
lld/trunk/ELF/Driver.cpp
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=287237&r1=287236&r2=287237&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Nov 17 11:06:51 2016
@@ -496,7 +496,7 @@ void LinkerDriver::readConfigs(opt::Inpu
Config->SaveTemps = Args.hasArg(OPT_save_temps);
Config->Shared = Args.hasArg(OPT_shared);
Config->Target1Rel = getArg(Args, OPT_target1_rel, OPT_target1_abs, false);
- Config->Threads = getArg(Args, OPT_threads, OPT_no_threads, false);
+ Config->Threads = getArg(Args, OPT_threads, OPT_no_threads, true);
Config->Trace = Args.hasArg(OPT_trace);
Config->Verbose = Args.hasArg(OPT_verbose);
Config->WarnCommon = Args.hasArg(OPT_warn_common);
More information about the llvm-commits
mailing list