Fix the extra invalidation issue found in D84959. The issue was exposed when
PreservedAnalyses::abandon was first used in a regular pass.
The extra invalidation was due to the module analysis manager
calling its invalidate with a PreservedAnalyses which contains the
abandoned LVI. The abandoned LVI is returned to outer pass manager
because PreservedAnalyses::intersect unions all the abandoned analyses.
We should not return abandoned analyses to outer pass manager because
the necessary invalidation has already happened in the current pass
manager, which indicated by things like
PA.preserveSet<AllAnalysesOn<IRUnitT>>().
preserveSet<CFGAnalyses> is an exception to this so I propose to
rename it to preserve<CFGAnalyses> in order to make the usage of
preserveSet very specific.
This association of abandon with preserveSet is intended. It does
get tricky because the order of calls to abandon and preserveSet
become relevant but IMHO this association is helpful for reasoning the
code.
I'd be fine with renaming this with this mouthful name. Not just because it's more informative, but it's more likely to remain internally used, or easy to catch if it's not. I don't see how we can assert/enforce this easily.