aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
index 76f8f1a7a482..18d5911d10f1 100644
--- a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
@@ -10,7 +10,6 @@
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
-#include "llvm/InitializePasses.h"
#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/Transforms/Utils/Local.h"
using namespace llvm;
@@ -52,38 +51,3 @@ PreservedAnalyses InferFunctionAttrsPass::run(Module &M,
// out all the passes.
return PreservedAnalyses::none();
}
-
-namespace {
-struct InferFunctionAttrsLegacyPass : public ModulePass {
- static char ID; // Pass identification, replacement for typeid
- InferFunctionAttrsLegacyPass() : ModulePass(ID) {
- initializeInferFunctionAttrsLegacyPassPass(
- *PassRegistry::getPassRegistry());
- }
-
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<TargetLibraryInfoWrapperPass>();
- }
-
- bool runOnModule(Module &M) override {
- if (skipModule(M))
- return false;
-
- auto GetTLI = [this](Function &F) -> TargetLibraryInfo & {
- return this->getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(F);
- };
- return inferAllPrototypeAttributes(M, GetTLI);
- }
-};
-}
-
-char InferFunctionAttrsLegacyPass::ID = 0;
-INITIALIZE_PASS_BEGIN(InferFunctionAttrsLegacyPass, "inferattrs",
- "Infer set function attributes", false, false)
-INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
-INITIALIZE_PASS_END(InferFunctionAttrsLegacyPass, "inferattrs",
- "Infer set function attributes", false, false)
-
-Pass *llvm::createInferFunctionAttrsLegacyPass() {
- return new InferFunctionAttrsLegacyPass();
-}