[PATCH] D42410: [llvm-opt-fuzzer] Add couple of popular passes

Igor Laevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 03:10:24 PST 2018


igor-laevsky created this revision.
igor-laevsky added reviewers: kcc, bogner.

I think it's time to extend passes covered by the llvm-opt-fuzzer. As a first batch I have chosen couple of the most popular non-loop passes.


https://reviews.llvm.org/D42410

Files:
  lib/FuzzMutate/FuzzerCLI.cpp


Index: lib/FuzzMutate/FuzzerCLI.cpp
===================================================================
--- lib/FuzzMutate/FuzzerCLI.cpp
+++ lib/FuzzMutate/FuzzerCLI.cpp
@@ -84,6 +84,14 @@
   for (StringRef Opt : Opts) {
     if (Opt.startswith("instcombine")) {
       Args.push_back("-passes=instcombine");
+    } else if (Opt.startswith("earlycse")) {
+      Args.push_back("-passes=early-cse");
+    } else if (Opt.startswith("simplifycfg")) {
+      Args.push_back("-passes=simplify-cfg");
+    } else if (Opt.startswith("gvn")) {
+      Args.push_back("-passes=gvn");
+    } else if (Opt.startswith("sccp")) {
+      Args.push_back("-passes=sccp");
     } else if (Triple(Opt).getArch()) {
       Args.push_back("-mtriple=" + Opt.str());
     } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42410.131022.patch
Type: text/x-patch
Size: 758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/3a6981e1/attachment.bin>


More information about the llvm-commits mailing list