Create FunctionAnalysisBase to handle the boiler plate of caching and invalidating function specific analysis.

Swift SVN r26642
This commit is contained in:
Nadav Rotem
2015-03-27 20:54:22 +00:00
parent d216feb3f3
commit 50803a7653
8 changed files with 65 additions and 30 deletions

View File

@@ -956,7 +956,7 @@ class COWArrayOptPass : public SILFunctionTransform {
DominanceAnalysis *DA = PM->getAnalysis<DominanceAnalysis>();
SILLoopAnalysis *LA = PM->getAnalysis<SILLoopAnalysis>();
auto *RCIA =
PM->getAnalysis<RCIdentityAnalysis>()->getRCInfo(getFunction());
PM->getAnalysis<RCIdentityAnalysis>()->get(getFunction());
SILLoopInfo *LI = LA->getLoopInfo(getFunction());
if (LI->empty()) {
DEBUG(llvm::dbgs() << " Skipping Function: No loops.\n");