[llvm] [CodeGen][NewPM] Port EdgeBundles analysis to NPM (PR #116616)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 08:18:06 PST 2024


================
@@ -100,3 +113,11 @@ raw_ostream &WriteGraph<>(raw_ostream &O, const EdgeBundles &G,
 void EdgeBundles::view() const {
   ViewGraph(*this, "EdgeBundles");
 }
+
+bool EdgeBundles::invalidate(MachineFunction &MF, const PreservedAnalyses &PA,
+                             MachineFunctionAnalysisManager::Invalidator &Inv) {
+  // Invalidated when CFG is not preserved
+  auto PAC = PA.getChecker<EdgeBundlesAnalysis>();
+  return !(PAC.preserved() || PAC.preservedSet<CFGAnalyses>() ||
+           PAC.preservedSet<AllAnalysesOn<MachineFunction>>());
----------------
arsenm wrote:

push negation through the expression 

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


More information about the llvm-commits mailing list