summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNeil Henning <neil.henning@unity3d.com>2019-12-11 13:20:42 +0000
committerNeil Henning <neil.henning@unity3d.com>2020-01-06 08:50:18 +0000
commit103a58c8f2b0a62a42f6eedcdef38222ff22a538 (patch)
treeef2ee3bcc73949980b0de9b136e208dc6adf3a68 /llvm/lib/Analysis
parentc5fb73c5d1b3f1adb77d99fc85c594b48bff08f9 (diff)
downloadbcm5719-llvm-103a58c8f2b0a62a42f6eedcdef38222ff22a538.tar.gz
bcm5719-llvm-103a58c8f2b0a62a42f6eedcdef38222ff22a538.zip
Add ExternalAAWrapperPass to createLegacyPMAAResults.
Our out-of-tree custom aliasing solution for the HPC# Burst compiler here at Unity makes use of the `ExternalAAwrapperPass` infrastructure to insert our custom aliasing resolution into the core of LLVM. This is great for all cases except for function inlining, where because `createLegacyPMAAResults` does not make use of `ExternalAAWrapperPass`, when we have a definite no-alias result within a function it won't be propagated to the calling function during inlining. This commit just rectifies this oversight by adding the missing dependency. Differential Revision: https://reviews.llvm.org/D71348
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/AliasAnalysis.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index c56c8a74af8..1c7678a602d 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -846,6 +846,7 @@ void AAResultsWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addUsedIfAvailable<SCEVAAWrapperPass>();
AU.addUsedIfAvailable<CFLAndersAAWrapperPass>();
AU.addUsedIfAvailable<CFLSteensAAWrapperPass>();
+ AU.addUsedIfAvailable<ExternalAAWrapperPass>();
}
AAResults llvm::createLegacyPMAAResults(Pass &P, Function &F,
@@ -871,6 +872,9 @@ AAResults llvm::createLegacyPMAAResults(Pass &P, Function &F,
AAR.addAAResult(WrapperPass->getResult());
if (auto *WrapperPass = P.getAnalysisIfAvailable<CFLSteensAAWrapperPass>())
AAR.addAAResult(WrapperPass->getResult());
+ if (auto *WrapperPass = P.getAnalysisIfAvailable<ExternalAAWrapperPass>())
+ if (WrapperPass->CB)
+ WrapperPass->CB(P, F, AAR);
return AAR;
}
@@ -914,4 +918,5 @@ void llvm::getAAResultsAnalysisUsage(AnalysisUsage &AU) {
AU.addUsedIfAvailable<GlobalsAAWrapperPass>();
AU.addUsedIfAvailable<CFLAndersAAWrapperPass>();
AU.addUsedIfAvailable<CFLSteensAAWrapperPass>();
+ AU.addUsedIfAvailable<ExternalAAWrapperPass>();
}
OpenPOWER on IntegriCloud