aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2024-07-20 15:23:21 +0400
committerMatt Arsenault <arsenm2@gmail.com>2024-07-20 16:17:07 +0400
commit34bd26317a2472ba7c2d48548f8a0e66584ddd38 (patch)
tree0611dc08d7ab1c27d72edf188288cc5167981da7
parentd8116cfbd6708a79a19ae2e4d15f2d602407972b (diff)
downloadllvm-users/arsenm/codegen-newpm-machinemoduleinfo-sdag.zip
llvm-users/arsenm/codegen-newpm-machinemoduleinfo-sdag.tar.gz
llvm-users/arsenm/codegen-newpm-machinemoduleinfo-sdag.tar.bz2
CodeGen/NewPM: Initialize MMI in NewPM pathusers/arsenm/codegen-newpm-machinemoduleinfo-sdag
This should have been in c2019a37bdb1375e9f72b2549361cc50ea7729db, but it breaks with: Assertion failed: (AnalysisPasses.count(PassT::ID()) && "This analysis pass was not registered prior to being queried"), function getResult, file PassManager.h, line 407.
-rw-r--r--llvm/include/llvm/Passes/MachinePassRegistry.def1
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/Passes/MachinePassRegistry.def b/llvm/include/llvm/Passes/MachinePassRegistry.def
index 03f0782..e702721 100644
--- a/llvm/include/llvm/Passes/MachinePassRegistry.def
+++ b/llvm/include/llvm/Passes/MachinePassRegistry.def
@@ -17,6 +17,7 @@
#define MODULE_ANALYSIS(NAME, CREATE_PASS)
#endif
MODULE_ANALYSIS("collector-metadata", CollectorMetadataAnalysis())
+MODULE_ANALYSIS("machine-module-info", MachineModuleAnalysis())
MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
#undef MODULE_ANALYSIS
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 2670ff4..478e544 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -509,6 +509,8 @@ void SelectionDAGISel::initializeAnalysisResults(
FnVarLocs = &FAM.getResult<DebugAssignmentTrackingAnalysis>(Fn);
auto *UA = FAM.getCachedResult<UniformityInfoAnalysis>(Fn);
+ MMI = &MFAM.getResult<MachineModuleAnalysis>(*MF).getMMI();
+
CurDAG->init(*MF, *ORE, MFAM, LibInfo, UA, PSI, BFI, *MMI, FnVarLocs);
// Now get the optional analyzes if we want to.