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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, minor suggestion below.
Not a huge fan of the name, but no better ideas, and it doesn't matter much.
lib/Analysis/AliasAnalysis.cpp | ||
---|---|---|
568–572 | Add a comment here and above indicating how these should be kept in sync? Minor. |
Add a comment here and above indicating how these should be kept in sync? Minor.