[PM] Reassociate: cache analyses more aggressively.

While here, add a FIXME for setPreserveCFG().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271159 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Davide Italiano 2016-05-29 00:41:17 +00:00
parent 1c85d76aa3
commit 50d2d2143e

View File

@ -2227,8 +2227,13 @@ PreservedAnalyses ReassociatePass::run(Function &F) {
RankMap.clear(); RankMap.clear();
ValueRankMap.clear(); ValueRankMap.clear();
if (MadeChange) if (MadeChange) {
return PreservedAnalyses::none(); // 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(); return PreservedAnalyses::all();
} }