[PATCH] D148854: [llvm-stress] Switch to a FuzzMutate driver

Zhenkai Weng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 15:55:41 PDT 2023


oakrc created this revision.
oakrc added reviewers: fhahn, Peter, nikic, bjope.
Herald added a subscriber: StephenFan.
Herald added a project: All.
oakrc requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This revision of llvm-stress replaces the old module generation code with a FuzzMutate driver, which supports random module generation and mutation.

- When invoked without any options, the new llvm-stress generates a new module.
- Since one round of mutation does little to the module, llvm-stress defaults to 100 mutations. This behavior can be adjusted with the repeat option.
- Optionally, the user can supply an existing module (textual IR or bitcode) to mutate from.
- File output also switches between both textual IR and bitcode based on file extension (textual IR by default).
- When no seed is given, llvm-stress will create one instead of using a default of 0.
- The old size option is replaced with max-size, which limits the maximum bitcode size of the generated/mutated module.

Related: Add a mutation fuzzing mode <https://reviews.llvm.org/D140239>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148854

Files:
  llvm/docs/CommandGuide/llvm-stress.rst
  llvm/tools/llvm-stress/CMakeLists.txt
  llvm/tools/llvm-stress/llvm-stress.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148854.515510.patch
Type: text/x-patch
Size: 31525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230420/4f76ee85/attachment.bin>


More information about the llvm-commits mailing list