[llvm] [llvm-opt-fuzzer] Add more passes options (PR #76474)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 27 15:25:54 PST 2023
https://github.com/DavidKorczynski created https://github.com/llvm/llvm-project/pull/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)
>From ea2a37fadb9adf28b0bb68bb38f1df3b1efd0f92 Mon Sep 17 00:00:00 2001
From: David Korczynski <david at adalogics.com>
Date: Wed, 27 Dec 2023 15:23:45 -0800
Subject: [PATCH] [llvm-opt-fuzzer] Add more passes options
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>
---
llvm/lib/FuzzMutate/FuzzerCLI.cpp | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/FuzzMutate/FuzzerCLI.cpp b/llvm/lib/FuzzMutate/FuzzerCLI.cpp
index c64e9c04e199bf..ded5b15a8cf44c 100644
--- a/llvm/lib/FuzzMutate/FuzzerCLI.cpp
+++ b/llvm/lib/FuzzMutate/FuzzerCLI.cpp
@@ -84,9 +84,10 @@ void llvm::handleExecNameEncodedOptimizerOpts(StringRef ExecName) {
Args.push_back("-passes=simplifycfg");
} else if (Opt == "gvn") {
Args.push_back("-passes=gvn");
+ } else if (Opt == "newgvn") {
+ Args.push_back("-passes=newgvn");
} 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") {
@@ -107,7 +108,24 @@ 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 == "loop_reroll") {
+ Args.push_back("-passes=loop-reroll");
+ } else if (Opt == "loop_interchange") {
+ Args.push_back("-passes=loop-interchange");
+ } else if (Opt == "loop_fusion") {
+ Args.push_back("-passes=loop-fusion");
+ } 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