[llvm] 11026a8 - [CodeGen][NewPM] Preserve all MF analyses in MFPM (#124707)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 20:32:02 PST 2025
Author: Akshat Oke
Date: 2025-01-30T10:01:58+05:30
New Revision: 11026a8d8b03014665e18c5cf9a0f76c857ef85f
URL: https://github.com/llvm/llvm-project/commit/11026a8d8b03014665e18c5cf9a0f76c857ef85f
DIFF: https://github.com/llvm/llvm-project/commit/11026a8d8b03014665e18c5cf9a0f76c857ef85f.diff
LOG: [CodeGen][NewPM] Preserve all MF analyses in MFPM (#124707)
Invalidation is already handled in the passes loop for MFAM, so all of
the rest analyses are preserved. (See `PassManager::run()`)
This won't change the number of invalidations, but will prevent needless
`MFAM::Invalidator::invalidate()` invocations made by results depending
on other results (since the invalidate shorts if `<AllAnalysesOn<MF>>`
is preserved)
Added:
Modified:
llvm/lib/CodeGen/MachinePassManager.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/MachinePassManager.cpp b/llvm/lib/CodeGen/MachinePassManager.cpp
index 6d540808d4cc98..3eed874903f7cf 100644
--- a/llvm/lib/CodeGen/MachinePassManager.cpp
+++ b/llvm/lib/CodeGen/MachinePassManager.cpp
@@ -152,6 +152,7 @@ PassManager<MachineFunction>::run(MachineFunction &MF,
PI.runAfterPass(*Pass, MF, PassPA);
PA.intersect(std::move(PassPA));
}
+ PA.preserveSet<AllAnalysesOn<MachineFunction>>();
return PA;
}
More information about the llvm-commits
mailing list