From 99c47d9e3113a917ea2f84f27e57f2ea3da4fc8c Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Thu, 10 Nov 2022 20:11:06 +0100 Subject: Remove TargetMachine::adjustPassManager Since opt no longer supports to run default (O0/O1/O2/O3/Os/Oz) pipelines using the legacy PM, there are no in-tree uses of TargetMachine::adjustPassManager remaining. This patch removes the no longer used adjustPassManager functions. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D137796 --- llvm/lib/Target/BPF/BPFTargetMachine.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'llvm/lib/Target/BPF/BPFTargetMachine.cpp') diff --git a/llvm/lib/Target/BPF/BPFTargetMachine.cpp b/llvm/lib/Target/BPF/BPFTargetMachine.cpp index 97d9ed3..0c22185 100644 --- a/llvm/lib/Target/BPF/BPFTargetMachine.cpp +++ b/llvm/lib/Target/BPF/BPFTargetMachine.cpp @@ -24,7 +24,6 @@ #include "llvm/Passes/PassBuilder.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Target/TargetOptions.h" -#include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Scalar/SimplifyCFG.h" #include "llvm/Transforms/Utils/SimplifyCFGOptions.h" @@ -102,28 +101,6 @@ TargetPassConfig *BPFTargetMachine::createPassConfig(PassManagerBase &PM) { return new BPFPassConfig(*this, PM); } -void BPFTargetMachine::adjustPassManager(PassManagerBuilder &Builder) { - Builder.addExtension( - PassManagerBuilder::EP_EarlyAsPossible, - [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) { - PM.add(createBPFAbstractMemberAccess(this)); - PM.add(createBPFPreserveDIType()); - PM.add(createBPFIRPeephole()); - }); - - Builder.addExtension( - PassManagerBuilder::EP_Peephole, - [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) { - PM.add(createCFGSimplificationPass( - SimplifyCFGOptions().hoistCommonInsts(true))); - }); - Builder.addExtension( - PassManagerBuilder::EP_ModuleOptimizerEarly, - [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) { - PM.add(createBPFAdjustOpt()); - }); -} - void BPFTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { PB.registerPipelineStartEPCallback( [=](ModulePassManager &MPM, OptimizationLevel) { -- cgit v1.1