[llvm] r280382 - [lit] Use multiprocessing by default on Windows

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 10:19:45 PDT 2016


Author: rnk
Date: Thu Sep  1 12:19:44 2016
New Revision: 280382

URL: http://llvm.org/viewvc/llvm-project?rev=280382&view=rev
Log:
[lit] Use multiprocessing by default on Windows

Apparently nobody evaluated multiprocessing on Windows since Daniel
enabled multiprocessing on Unix in r193279. It works so far as I can
tell.

Today this is worth about an 8x speedup (631.29s to 73.25s) on my 24
core Windows machine. Hopefully this will improve Windows buildbot cycle
time, where currently it takes more time to run check-all than it does
to self-host with assertions enabled:
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/20
  build stage 2 ninja all ( 28 mins, 22 secs )
  ninja check 2 stage 2   ( 37 mins, 38 secs )

Modified:
    llvm/trunk/utils/lit/lit/main.py

Modified: llvm/trunk/utils/lit/lit/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/main.py?rev=280382&r1=280381&r2=280382&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/main.py (original)
+++ llvm/trunk/utils/lit/lit/main.py Thu Sep  1 12:19:44 2016
@@ -132,10 +132,6 @@ def sort_by_incremental_cache(run):
     run.tests.sort(key = lambda t: sortIndex(t))
 
 def main(builtinParameters = {}):
-    # Use processes by default on Unix platforms.
-    isWindows = platform.system() == 'Windows'
-    useProcessesIsDefault = not isWindows
-
     global options
     from optparse import OptionParser, OptionGroup
     parser = OptionParser("usage: %prog [options] {file-or-path}")
@@ -243,10 +239,10 @@ def main(builtinParameters = {}):
                       action="store_true", default=False)
     group.add_option("", "--use-processes", dest="useProcesses",
                       help="Run tests in parallel with processes (not threads)",
-                      action="store_true", default=useProcessesIsDefault)
+                      action="store_true", default=True)
     group.add_option("", "--use-threads", dest="useProcesses",
                       help="Run tests in parallel with threads (not processes)",
-                      action="store_false", default=useProcessesIsDefault)
+                      action="store_false", default=True)
     parser.add_option_group(group)
 
     (opts, args) = parser.parse_args()
@@ -286,6 +282,7 @@ def main(builtinParameters = {}):
         # Default is zero
         maxIndividualTestTime = 0
 
+    isWindows = platform.system() == 'Windows'
 
     # Create the global config object.
     litConfig = lit.LitConfig.LitConfig(




More information about the llvm-commits mailing list