mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
[PM] Don't run the machinery of invalidating all the analysis passes
when all are being preserved. We want to short-circuit this for a couple of reasons. One, I don't really want passes to grow a dependency on actually receiving their invalidate call when they've been preserved. I'm thinking about removing this entirely. But more importantly, preserving everything is likely to be the common case in a lot of scenarios, and it would be really good to bypass all of the invalidation and preservation machinery there. Avoiding calling N opaque functions to try to invalidate things that are by definition still valid seems important. =] This wasn't really inpsired by much other than seeing the spam in the logging for analyses, but it seems better ot get it checked in rather than forgetting about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -92,6 +92,10 @@ void CGSCCAnalysisManager::invalidateImpl(void *PassID, LazyCallGraph::SCC &C) {
|
||||
|
||||
void CGSCCAnalysisManager::invalidateImpl(LazyCallGraph::SCC &C,
|
||||
const PreservedAnalyses &PA) {
|
||||
// Short circuit for a common case of all analyses being preserved.
|
||||
if (PA.areAllPreserved())
|
||||
return;
|
||||
|
||||
if (DebugPM)
|
||||
dbgs() << "Invalidating all non-preserved analyses for SCC: " << C.getName()
|
||||
<< "\n";
|
||||
|
Reference in New Issue
Block a user