[PATCH] D37495: llvm-isel-fuzzer: Handle a subset of backend flags in the executable name

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 19:29:30 PDT 2017


bogner accepted this revision.
bogner marked 3 inline comments as done.
bogner added a comment.
This revision is now accepted and ready to land.

Committed with the requested changes in r315545



================
Comment at: lib/FuzzMutate/FuzzerCLI.cpp:44
+  for (StringRef Opt : Opts) {
+    if (Opt.equals("gisel")) {
+      Args.push_back("-global-isel");
----------------
vsk wrote:
> If there's a fuzzer writeup in llvm/docs, it might be worth mentioning these option names in it.
I've added some docs in FuzzingLLVM in r315544, and I'll add some notes about this in those docs when I commit.


================
Comment at: lib/FuzzMutate/FuzzerCLI.cpp:61
+  for (std::string &S : Args)
+    CLArgs.push_back(S.c_str());
+
----------------
kcc wrote:
> vsk wrote:
> > We might be able to get a tighter test by printing out the args here, then checking for them in filecheck.
> > 
> > Pro: default behaviors (e.g gisel => -O0) become clearer.
> > Con: This makes the fuzzer stdout a bit more crowded.
> I would actually request that we print "Args" to errs() here, with some prefix, e.g.:
> "Flags deducted from <BinaryName>: -foo -bar"
> 
> This way it will be trivial to test this and to manually verify the desired effect. 
I'll make these print to stderr with a note like "<Binary name>: Injected args: ..."


Repository:
  rL LLVM

https://reviews.llvm.org/D37495





More information about the llvm-commits mailing list