[llvm] [NewPM][CodeGen] Add `MachineFunctionAnalysis` (PR #88610)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 09:54:49 PDT 2024


================
@@ -129,16 +142,6 @@ class FunctionAnalysisManagerMachineFunctionProxy
       Arg.FAM = nullptr;
     }
 
-    ~Result() {
-      // FAM is cleared in a moved from state where there is nothing to do.
-      if (!FAM)
-        return;
-
-      // Clear out the analysis manager if we're being destroyed -- it means we
-      // didn't even see an invalidate call when we got invalidated.
-      FAM->clear();
-    }
-
----------------
aeubanks wrote:

do you know why? I know that the analysis managers have to be declared in a specific order due to these sorts of things. does this still occur even with the following order:
```
  MachineFunctionAnalysisManager MFAM;
  LoopAnalysisManager LAM;
  FunctionAnalysisManager FAM;
  CGSCCAnalysisManager CGAM;
  ModuleAnalysisManager MAM;
```
?

I haven't thought too hard about whether or not this is actually required (meaning maybe we can't just remove this code for correctness)...

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


More information about the llvm-commits mailing list