[llvm] 27c1051 - [llvm-opt-fuzzer] Skip creating/initializing legacy PM passes
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 02:36:05 PDT 2023
Author: Bjorn Pettersson
Date: 2023-04-18T11:35:16+02:00
New Revision: 27c1051f730266d9fca275eb6c0b25c4440aec8b
URL: https://github.com/llvm/llvm-project/commit/27c1051f730266d9fca275eb6c0b25c4440aec8b
DIFF: https://github.com/llvm/llvm-project/commit/27c1051f730266d9fca275eb6c0b25c4440aec8b.diff
LOG: [llvm-opt-fuzzer] Skip creating/initializing legacy PM passes
Afaict llvm-opt-fuzzer is using the new pass manager. So there
shouldn't be a need to create/initialize/register the legacy PM
version of passes.
Differential Revision: https://reviews.llvm.org/D148512
Added:
Modified:
llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp b/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
index 7e8115ceb6d7c..9473d6f3fc7ad 100644
--- a/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
+++ b/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
@@ -10,14 +10,12 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/FuzzMutate/FuzzerCLI.h"
#include "llvm/FuzzMutate/IRMutator.h"
#include "llvm/IR/Verifier.h"
-#include "llvm/InitializePasses.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Support/CommandLine.h"
@@ -189,16 +187,6 @@ extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(
InitializeAllTargets();
InitializeAllTargetMCs();
- PassRegistry &Registry = *PassRegistry::getPassRegistry();
- initializeCore(Registry);
- initializeScalarOpts(Registry);
- initializeVectorization(Registry);
- initializeIPO(Registry);
- initializeAnalysis(Registry);
- initializeTransformUtils(Registry);
- initializeInstCombine(Registry);
- initializeTarget(Registry);
-
// Parse input options
//
More information about the llvm-commits
mailing list