[PATCH] D140239: [llvm-stress] Add a mutation fuzzing mode

Peter Rong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 11:43:01 PST 2022


Peter added a comment.

I have been working on `FuzzMutate` for half a year. 
To `FuzzMutate`, generation and mutation is the same... generation is just initialize an empty module and them mutate.
So I don't think the function `Generate()` is necessary. 
What you can do is initialize an empty `Module("M", LLVMContext)` and throw it to `FuzzMutate`.

Also, many features in `Generate()` have already been introduced into FuzzMutate.
`IntroduceControlFlow` is `InsertCFGStrategy`, works better if you add `InsertPHIStrategy` too.
`FillFunction` is `InjectorStrategy`
`GenEmptyFunction` is `InsertFunctionCallStrategt`, this strategy haven't been upstreamed yet. I am waiting for other diffs(https://reviews.llvm.org/D139894, :https://reviews.llvm.org/D139907) to be accepted beforee I send it for review.

I highly encourage you take look at `IRMutator.h` to see what strategies have been added.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140239



More information about the llvm-commits mailing list