llvm-reduce: Try to kill parallel workitems once we have a result.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 29 Nov 2022 21:22:16 +0000 (16:22 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 11 Jan 2023 13:58:22 +0000 (08:58 -0500)
commit4f575620d51032cf98424c9defafe4dfc8d66f45
tree0aeaf09aa227404306ccbb9e1a08be791114ad04
parentd7bba07526a7298c9331de031dec15daecff3503
llvm-reduce: Try to kill parallel workitems once we have a result.

The current reduction logic tries to reproduce what a serial reduction
would produce, and just takes the first one that is still
interesting. We still have to wait for all others to complete though,
which at that point is just a waste.

This helps speed things up with long running reducers, which I
frequently have. e.g. for the added sleep test on my system, it took
about 8 seconds before this change and about 4 after.

https://reviews.llvm.org/D138953
llvm/test/tools/llvm-reduce/Inputs/sleep.py [new file with mode: 0755]
llvm/test/tools/llvm-reduce/parallel-workitem-kill.ll [new file with mode: 0644]
llvm/tools/llvm-reduce/TestRunner.cpp
llvm/tools/llvm-reduce/TestRunner.h
llvm/tools/llvm-reduce/deltas/Delta.cpp
llvm/tools/llvm-reduce/llvm-reduce.cpp