[PM] Reassociate: cache analyses more aggressively.

While here, add a FIXME for setPreserveCFG().

llvm-svn: 271159
This commit is contained in:
Davide Italiano 2016-05-29 00:41:17 +00:00
parent 7066905ef3
commit 39893bd41c
1 changed files with 7 additions and 2 deletions

View File

@ -2227,8 +2227,13 @@ PreservedAnalyses ReassociatePass::run(Function &F) {
RankMap.clear();
ValueRankMap.clear();
if (MadeChange)
return PreservedAnalyses::none();
if (MadeChange) {
// FIXME: Reassociate should also 'preserve the CFG'.
// The new pass manager has currently no way to do it.
auto PA = PreservedAnalyses();
PA.preserve<GlobalsAA>();
return PA;
}
return PreservedAnalyses::all();
}