[PATCH] D105284: Greedy set cover implementation of `Merger::Merge`

Aristotelis Koutsouridis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 23 07:42:45 PDT 2021


arisKoutsou updated this revision to Diff 368104.
arisKoutsou added a comment.

Changes:

- Renamed all occurences of `MergeGreedy` with `SetCoverMerge`.
- Added a new flag called `set_cover_merge`. Defaults to 0, when 1 the new set_cover_merge implementation is used to merge corpora instead of the standard `merge`.
- Some code-style changes.
- Added a unit test, based off the `Merger::Merge` unit test.
- Added a lit test based on the `merge.test`. Results of `merge` and `set_cover_merge` are different in some cases, as expected.
- Changed the `Remaining` variable in `SetCoverMerge()` from `std::vector` to a `std::set`.
- Addressed some inaccuracies in the algorithm, mostly regarding the first corpus (consider features in the first corpus as already covered, just like `merge=1` works).
- Removed the initial sorting of files on size/features. Instead, for files with the same number of features, break ties by choosing the smaller one in size.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105284/new/

https://reviews.llvm.org/D105284

Files:
  compiler-rt/lib/fuzzer/FuzzerDriver.cpp
  compiler-rt/lib/fuzzer/FuzzerFlags.def
  compiler-rt/lib/fuzzer/FuzzerFork.cpp
  compiler-rt/lib/fuzzer/FuzzerInternal.h
  compiler-rt/lib/fuzzer/FuzzerMerge.cpp
  compiler-rt/lib/fuzzer/FuzzerMerge.h
  compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp
  compiler-rt/test/fuzzer/set_cover_merge.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105284.368104.patch
Type: text/x-patch
Size: 24729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210823/730c1031/attachment.bin>


More information about the llvm-commits mailing list