[llvm] r270231 - [PM/PartiallyInlineLibCalls] Fix pass dependencies.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 09:23:15 PDT 2016
Author: davide
Date: Fri May 20 11:23:14 2016
New Revision: 270231
URL: http://llvm.org/viewvc/llvm-project?rev=270231&view=rev
Log:
[PM/PartiallyInlineLibCalls] Fix pass dependencies.
Inline getAnalysisUsage() while I'm here.
Modified:
llvm/trunk/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp?rev=270231&r1=270230&r2=270231&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp Fri May 20 11:23:14 2016
@@ -33,22 +33,25 @@ namespace {
initializePartiallyInlineLibCallsPass(*PassRegistry::getPassRegistry());
}
- void getAnalysisUsage(AnalysisUsage &AU) const override;
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.addRequired<TargetLibraryInfoWrapperPass>();
+ AU.addRequired<TargetTransformInfoWrapperPass>();
+ FunctionPass::getAnalysisUsage(AU);
+ }
+
bool runOnFunction(Function &F) override;
};
char PartiallyInlineLibCalls::ID = 0;
}
-INITIALIZE_PASS(PartiallyInlineLibCalls, "partially-inline-libcalls",
- "Partially inline calls to library functions", false, false)
-
-void PartiallyInlineLibCalls::getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequired<TargetLibraryInfoWrapperPass>();
- AU.addRequired<TargetTransformInfoWrapperPass>();
- FunctionPass::getAnalysisUsage(AU);
-}
-
+INITIALIZE_PASS_BEGIN(PartiallyInlineLibCalls, "partially-inline-libcalls",
+ "Partially inline calls to library functions", false,
+ false)
+INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
+INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
+INITIALIZE_PASS_END(PartiallyInlineLibCalls, "partially-inline-libcalls",
+ "Partially inline calls to library functions", false, false)
static bool optimizeSQRT(CallInst *Call, Function *CalledFunc,
BasicBlock &CurrBB, Function::iterator &BB) {
More information about the llvm-commits
mailing list