[PATCH] D39555: Introduce llvm-opt-fuzzer for fuzzing optimization passes

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 12:13:30 PST 2017


bogner accepted this revision.
bogner added a comment.
This revision is now accepted and ready to land.

LGTM. We can iterate on this further in tree.



================
Comment at: lib/FuzzMutate/FuzzerCLI.cpp:80-84
+  for (StringRef Opt : Opts) {
+    if (Opt.startswith("instcombine")) {
+      Args.push_back("-passes=instcombine");
+    } else if (Triple(Opt).getArch()) {
+      Args.push_back("-mtriple=" + Opt.str());
----------------
igor-laevsky wrote:
> bogner wrote:
> > Why not assume everything that isn't an arch is a pass name and pass them all as a comma separated list to -passes=?
> Some passes contain dashes in their names, and this doesn't work well with the option parser. Also syntax of the new pass manager includes braces and I'm not sure how good they are going to work in the executable file name. 
> 
> So instead I decided to treat each option as an a alias for the predefined pipeline configuration. So for example someday we may have "safepoints" option which will expand into pipeline where PlaceSafepoints is followed by the RS4GC pass.
Fair enough, this seems reasonable for now.


https://reviews.llvm.org/D39555





More information about the llvm-commits mailing list