diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h index 892674f3cd40..d9ac8591deb4 100644 --- a/llvm/include/llvm/InitializePasses.h +++ b/llvm/include/llvm/InitializePasses.h @@ -48,9 +48,6 @@ void initializeGlobalISel(PassRegistry&); /// Initialize all passes linked into the CodeGen library. void initializeTarget(PassRegistry&); -/// Initialize all passes linked into the TapirOpts library. -void initializeTapirOpts(PassRegistry&); - void initializeAAResultsWrapperPassPass(PassRegistry&); void initializeAlwaysInlinerLegacyPassPass(PassRegistry&); void initializeAssignmentTrackingAnalysisPass(PassRegistry &); diff --git a/llvm/include/llvm/LinkAllPasses.h b/llvm/include/llvm/LinkAllPasses.h index c1f97b6f4210..0bd0aac5a4f9 100644 --- a/llvm/include/llvm/LinkAllPasses.h +++ b/llvm/include/llvm/LinkAllPasses.h @@ -100,7 +100,6 @@ namespace { (void) llvm::createLowerGlobalDtorsLegacyPass(); (void) llvm::createLowerInvokePass(); (void) llvm::createLowerSwitchPass(); - (void) llvm::createLowerTapirToTargetPass(); (void) llvm::createNaryReassociatePass(); (void) llvm::createObjCARCContractPass(); (void) llvm::createPromoteMemoryToRegisterPass(); diff --git a/llvm/lib/Transforms/Tapir/CMakeLists.txt b/llvm/lib/Transforms/Tapir/CMakeLists.txt index 43a684436bd5..fff41eff9beb 100644 --- a/llvm/lib/Transforms/Tapir/CMakeLists.txt +++ b/llvm/lib/Transforms/Tapir/CMakeLists.txt @@ -13,7 +13,6 @@ add_llvm_component_library(LLVMTapirOpts QthreadsABI.cpp SerialABI.cpp SerializeSmallTasks.cpp - Tapir.cpp TapirToTarget.cpp TapirLoopInfo.cpp diff --git a/llvm/lib/Transforms/Tapir/Tapir.cpp b/llvm/lib/Transforms/Tapir/Tapir.cpp deleted file mode 100644 index 2ab648cd61d9..000000000000 --- a/llvm/lib/Transforms/Tapir/Tapir.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===- Tapir.cpp ----------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file implements common infrastructure for libLLVMTapirOpts.a, which -// implements several transformations over the Tapir/LLVM intermediate -// representation, including the C bindings for that library. -// -//===----------------------------------------------------------------------===// - -#include "llvm/InitializePasses.h" -#include "llvm/PassRegistry.h" - -using namespace llvm; - -/// initializeTapirOpts - Initialize all passes linked into the -/// TapirOpts library. -void llvm::initializeTapirOpts(PassRegistry &Registry) { - initializeLoopSpawningTIPass(Registry); - initializeLowerTapirToTargetPass(Registry); - initializeTaskCanonicalizePass(Registry); - initializeTaskSimplifyPass(Registry); - initializeDRFScopedNoAliasWrapperPassPass(Registry); - initializeLoopStripMinePass(Registry); - initializeSerializeSmallTasksPass(Registry); -} diff --git a/llvm/lib/Transforms/Tapir/TapirToTarget.cpp b/llvm/lib/Transforms/Tapir/TapirToTarget.cpp index 297d99c79eb6..2f45633013a5 100644 --- a/llvm/lib/Transforms/Tapir/TapirToTarget.cpp +++ b/llvm/lib/Transforms/Tapir/TapirToTarget.cpp @@ -509,62 +509,3 @@ PreservedAnalyses TapirToTargetPass::run(Module &M, ModuleAnalysisManager &AM) { return PreservedAnalyses::none(); return PreservedAnalyses::all(); } - -namespace { -struct LowerTapirToTarget : public ModulePass { - static char ID; // Pass identification, replacement for typeid - explicit LowerTapirToTarget() : ModulePass(ID) { - initializeLowerTapirToTargetPass(*PassRegistry::getPassRegistry()); - } - - StringRef getPassName() const override { return "Lower Tapir to target"; } - - bool runOnModule(Module &M) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired(); - AU.addRequired(); - AU.addRequired(); - AU.addRequired(); - } -}; -} // End of anonymous namespace - -char LowerTapirToTarget::ID = 0; -INITIALIZE_PASS_BEGIN(LowerTapirToTarget, "tapir2target", - "Lower Tapir to Target ABI", false, false) -INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker) -INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) -INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass) -INITIALIZE_PASS_DEPENDENCY(TaskInfoWrapperPass) -INITIALIZE_PASS_END(LowerTapirToTarget, "tapir2target", - "Lower Tapir to Target ABI", false, false) - -bool LowerTapirToTarget::runOnModule(Module &M) { - if (skipModule(M)) - return false; - auto GetAA = [this](Function &F) -> AAResults & { - return this->getAnalysis(F).getAAResults(); - }; - auto GetDT = [this](Function &F) -> DominatorTree & { - return this->getAnalysis(F).getDomTree(); - }; - auto GetTI = [this](Function &F) -> TaskInfo & { - return this->getAnalysis(F).getTaskInfo(); - }; - AssumptionCacheTracker *ACT = &getAnalysis(); - auto GetAC = [&ACT](Function &F) -> AssumptionCache & { - return ACT->getAssumptionCache(F); - }; - auto GetTLI = [this](Function &F) -> TargetLibraryInfo & { - return this->getAnalysis().getTLI(F); - }; - - return TapirToTargetImpl(M, GetAA, GetDT, GetTI, GetAC, GetTLI).run(); -} - -// createLowerTapirToTargetPass - Provide an entry point to create this pass. -// -namespace llvm { -ModulePass *createLowerTapirToTargetPass() { return new LowerTapirToTarget(); } -} // namespace llvm diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp index 0b329ea3d3ba..e49efdfe7c8e 100644 --- a/llvm/tools/bugpoint/bugpoint.cpp +++ b/llvm/tools/bugpoint/bugpoint.cpp @@ -105,7 +105,6 @@ int main(int argc, char **argv) { initializeCore(Registry); initializeScalarOpts(Registry); initializeVectorization(Registry); - initializeTapirOpts(Registry); initializeIPO(Registry); initializeAnalysis(Registry); initializeTransformUtils(Registry); diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index f9a359a7e074..056bf035ef68 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -413,7 +413,6 @@ int main(int argc, char **argv) { initializeCore(Registry); initializeScalarOpts(Registry); initializeVectorization(Registry); - initializeTapirOpts(Registry); initializeIPO(Registry); initializeAnalysis(Registry); initializeTransformUtils(Registry);