summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/Inliner.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-02-09 01:21:57 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-02-09 01:21:57 +0000
commit1c481f50d2392ba2576c9d574822e77e28f42426 (patch)
tree13c8446c33a29ff49d1ab9088549b6282c45b433 /llvm/lib/Transforms/IPO/Inliner.cpp
parent55394d929c6a4abedb967289b5da7b8631a28a4e (diff)
downloadbcm5719-llvm-1c481f50d2392ba2576c9d574822e77e28f42426.tar.gz
bcm5719-llvm-1c481f50d2392ba2576c9d574822e77e28f42426.zip
Add an "addUsedAAAnalyses" helper function
Summary: Passes that call `getAnalysisIfAvailable<T>` also need to call `addUsedIfAvailable<T>` in `getAnalysisUsage` to indicate to the legacy pass manager that it uses `T`. This contract was being violated by passes that used `createLegacyPMAAResults`. This change fixes this by exposing a helper in AliasAnalysis.h, `addUsedAAAnalyses`, that is complementary to createLegacyPMAAResults and does the right thing when called from `getAnalysisUsage`. Reviewers: chandlerc Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D17010 llvm-svn: 260183
Diffstat (limited to 'llvm/lib/Transforms/IPO/Inliner.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index bdef4733906..a02d85a6263 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -58,6 +58,7 @@ Inliner::Inliner(char &ID, bool InsertLifetime)
void Inliner::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<AssumptionCacheTracker>();
AU.addRequired<TargetLibraryInfoWrapperPass>();
+ addUsedAAAnalyses(AU);
CallGraphSCCPass::getAnalysisUsage(AU);
}
OpenPOWER on IntegriCloud