[llvm] [CodeGen][NewPM] Port machine dominator tree analysis to new pass manager (PR #95879)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 23:12:20 PDT 2024


================
@@ -57,6 +57,33 @@ template bool Verify<MBBDomTree>(const MBBDomTree &DT,
 } // namespace DomTreeBuilder
 }
 
+bool MachineDominatorTree::invalidate(
+    MachineFunction &, const PreservedAnalyses &PA,
+    MachineFunctionAnalysisManager::Invalidator &) {
+  // Check whether the analysis, all analyses on machine functions, or the
+  // machine function's CFG have been preserved.
+  auto PAC = PA.getChecker<MachineDominatorTreeAnalysis>();
+  return !(PAC.preserved() ||
+           PAC.preservedSet<AllAnalysesOn<MachineFunction>>() ||
+           PAC.preservedSet<CFGAnalyses>());
----------------
arsenm wrote:

de Morgan this 

https://github.com/llvm/llvm-project/pull/95879


More information about the llvm-commits mailing list