[llvm] 3d7880b - [llvm-opt-fuzzer] Add more passes options (#76474)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 28 07:28:13 PST 2023


Author: DavidKorczynski
Date: 2023-12-28T16:28:10+01:00
New Revision: 3d7880b64ca7746f7f5de5acc73afa23cedf94d2

URL: https://github.com/llvm/llvm-project/commit/3d7880b64ca7746f7f5de5acc73afa23cedf94d2
DIFF: https://github.com/llvm/llvm-project/commit/3d7880b64ca7746f7f5de5acc73afa23cedf94d2.diff

LOG: [llvm-opt-fuzzer] Add more passes options (#76474)

The goal is to enable analysis of these passes by way of OSS-Fuzz, where
they currently lack code coverage

(https://storage.googleapis.com/oss-fuzz-coverage/llvm/reports/20231225/linux/src/llvm-project/llvm/lib/Transforms/Scalar/report.html)

---------

Signed-off-by: David Korczynski <david at adalogics.com>

Added: 
    

Modified: 
    llvm/lib/FuzzMutate/FuzzerCLI.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/FuzzMutate/FuzzerCLI.cpp b/llvm/lib/FuzzMutate/FuzzerCLI.cpp
index c64e9c04e199bf..58e4b74f4b2282 100644
--- a/llvm/lib/FuzzMutate/FuzzerCLI.cpp
+++ b/llvm/lib/FuzzMutate/FuzzerCLI.cpp
@@ -86,13 +86,12 @@ void llvm::handleExecNameEncodedOptimizerOpts(StringRef ExecName) {
       Args.push_back("-passes=gvn");
     } else if (Opt == "sccp") {
       Args.push_back("-passes=sccp");
-
     } else if (Opt == "loop_predication") {
       Args.push_back("-passes=loop-predication");
     } else if (Opt == "guard_widening") {
       Args.push_back("-passes=guard-widening");
     } else if (Opt == "loop_rotate") {
-      Args.push_back("-passes=loop(rotate)");
+      Args.push_back("-passes=loop-rotate");
     } else if (Opt == "loop_unswitch") {
       Args.push_back("-passes=loop(simple-loop-unswitch)");
     } else if (Opt == "loop_unroll") {
@@ -107,7 +106,18 @@ void llvm::handleExecNameEncodedOptimizerOpts(StringRef ExecName) {
       Args.push_back("-passes=loop-reduce");
     } else if (Opt == "irce") {
       Args.push_back("-passes=irce");
-
+    } else if (Opt == "dse") {
+      Args.push_back("-passes=dse");
+    } else if (Opt == "loop_idiom") {
+      Args.push_back("-passes=loop-idiom");
+    } else if (Opt == "reassociate") {
+      Args.push_back("-passes=reassociate");
+    } else if (Opt == "lower_matrix_intrinsics") {
+      Args.push_back("-passes=lower-matrix-intrinsics");
+    } else if (Opt == "memcpyopt") {
+      Args.push_back("-passes=memcpyopt");
+    } else if (Opt == "sroa") {
+      Args.push_back("-passes=sroa");
     } else if (Triple(Opt).getArch()) {
       Args.push_back("-mtriple=" + Opt.str());
     } else {


        


More information about the llvm-commits mailing list