[llvm] CodeGen/NewPM: Initialize MMI in NewPM path (PR #99754)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 05:34:21 PDT 2024


================
@@ -509,6 +509,8 @@ void SelectionDAGISel::initializeAnalysisResults(
     FnVarLocs = &FAM.getResult<DebugAssignmentTrackingAnalysis>(Fn);
 
   auto *UA = FAM.getCachedResult<UniformityInfoAnalysis>(Fn);
+  MMI = &MFAM.getResult<MachineModuleAnalysis>(*MF).getMMI();
----------------
paperchalice wrote:

IIUC it should be obtained from `ModuleAnalysisManager` or `ModuleAnalysisManagerMachineFunctionProxy`, but current `ModuleAnalysisManagerMachineFunctionProxy` is an `OuterAnalysisManagerProxy`. 

off-topic: Ideally, it should be thread-safe to obtain module analysis results in machine function pass pipeline.

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


More information about the llvm-commits mailing list