llvm/compiler-rt
aristotelis e6597dbae8 Greedy set cover implementation of Merger::Merge
Extend the existing single-pass algorithm for `Merger::Merge` with an algorithm that gives better results. This new implementation can be used with a new **set_cover_merge=1** flag.

This greedy set cover implementation gives a substantially smaller final corpus (40%-80% less testcases) while preserving the same features/coverage. At the same time, the execution time penalty is not that significant (+50% for ~1M corpus files and far less for smaller corpora). These results were obtained by comparing several targets with varying size corpora.

Change `Merger::CrashResistantMergeInternalStep` to collect all features from each file and not just unique ones. This is needed for the set cover algorithm to work correctly. The implementation of the algorithm in `Merger::SetCoverMerge` uses a bitvector to store features that are covered by a file while performing the pass. Collisions while indexing the bitvector are ignored similarly to the fuzzer.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D105284
2021-09-07 09:42:38 -07:00
..
cmake [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
docs Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
include [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
lib Greedy set cover implementation of Merger::Merge 2021-09-07 09:42:38 -07:00
test Greedy set cover implementation of Merger::Merge 2021-09-07 09:42:38 -07:00
tools
unittests [Compiler-rt] Fix running ASan/TSan unit tests under macOS 12.0. 2021-08-03 17:46:27 -07:00
utils [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
www [compiler-rt] Document that builtins is known to work on OpenBSD. 2021-09-07 04:25:12 -04:00
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt sanitizers: compile with -O1 under debug 2021-08-16 10:01:50 +02:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================