forked from OSchip/llvm-project
[PM] Reassociate: cache analyses more aggressively.
While here, add a FIXME for setPreserveCFG(). llvm-svn: 271159
This commit is contained in:
parent
7066905ef3
commit
39893bd41c
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue