diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-01-15 10:41:28 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-01-15 10:41:28 +0000 |
commit | b98f63dbdb5668cb526e422e5b421dcddc8ff4f3 (patch) | |
tree | 105ed1ff4d9236e03921c96baaa9b91929289110 /llvm/lib/Analysis/AliasAnalysis.cpp | |
parent | 10fd83d11f6f65380f3e0355754e7044ebc5a619 (diff) | |
download | bcm5719-llvm-b98f63dbdb5668cb526e422e5b421dcddc8ff4f3.tar.gz bcm5719-llvm-b98f63dbdb5668cb526e422e5b421dcddc8ff4f3.zip |
[PM] Separate the TargetLibraryInfo object from the immutable pass.
The pass is really just a means of accessing a cached instance of the
TargetLibraryInfo object, and this way we can re-use that object for the
new pass manager as its result.
Lots of delta, but nothing interesting happening here. This is the
common pattern that is developing to allow analyses to live in both the
old and new pass manager -- a wrapper pass in the old pass manager
emulates the separation intrinsic to the new pass manager between the
result and pass for analyses.
llvm-svn: 226157
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/AliasAnalysis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp index 4c7ebf9c231..4e95aa0bfd1 100644 --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -465,7 +465,8 @@ AliasAnalysis::~AliasAnalysis() {} void AliasAnalysis::InitializeAliasAnalysis(Pass *P) { DataLayoutPass *DLP = P->getAnalysisIfAvailable<DataLayoutPass>(); DL = DLP ? &DLP->getDataLayout() : nullptr; - TLI = P->getAnalysisIfAvailable<TargetLibraryInfo>(); + auto *TLIP = P->getAnalysisIfAvailable<TargetLibraryInfoWrapperPass>(); + TLI = TLIP ? &TLIP->getTLI() : nullptr; AA = &P->getAnalysis<AliasAnalysis>(); } |