aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-05 16:44:56 +0000
committerReid Kleckner <rnk@google.com>2017-04-05 16:44:56 +0000
commit1b3c146acbc9a23bf96f40e533ae27fb910ae675 (patch)
tree8dbfc93b184c62c572f66d1e1c899de10e31527f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent42e0bb5e4f3ff0ce577ac027be8407dba7229887 (diff)
downloadllvm-1b3c146acbc9a23bf96f40e533ae27fb910ae675.zip
llvm-1b3c146acbc9a23bf96f40e533ae27fb910ae675.tar.gz
llvm-1b3c146acbc9a23bf96f40e533ae27fb910ae675.tar.bz2
[lit] Use process pools for test execution by default
Summary: This drastically reduces lit test execution startup time on Windows. Our previous strategy was to manually create one Process per job and manage the worker pool ourselves. Instead, let's use the worker pool provided by multiprocessing. multiprocessing.Pool(jobs) returns almost immediately, and initializes the appropriate number of workers, so they can all start executing tests immediately. This avoids the ramp-up period that the old implementation suffers from. This appears to speed up small test runs. Here are some timings of the llvm-readobj tests on Windows using the various execution strategies: # multiprocessing.Pool: $ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-process-pool |& grep real: ; done real: 0m1.156s real: 0m1.078s real: 0m1.094s # multiprocessing.Process: $ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-processes |& grep real: ; done real: 0m6.062s real: 0m5.860s real: 0m5.984s # threading.Thread: $ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-threads |& grep real: ; done real: 0m9.438s real: 0m10.765s real: 0m11.079s I kept the old code to launch processes in case this change doesn't work on all platforms that LLVM supports, but at some point I would like to remove both the threading and old multiprocessing execution strategies. Reviewers: modocache, rafael Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31677 llvm-svn: 299560
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions