aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorChristudasan Devadasan <Christudasan.Devadasan@amd.com>2023-07-03 21:29:34 +0530
committerYashwant Singh <Yashwant.Singh@amd.com>2023-07-03 21:29:37 +0530
commitaa82b562b7b4b36f4a3d04e80e5743028bddd577 (patch)
tree6f08320dba3f2540cc7d10cc3510282a6ee2e0a2 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent0f58cfeb9fff4f0490a798d65038fd43c5178c2c (diff)
downloadllvm-aa82b562b7b4b36f4a3d04e80e5743028bddd577.zip
llvm-aa82b562b7b4b36f4a3d04e80e5743028bddd577.tar.gz
llvm-aa82b562b7b4b36f4a3d04e80e5743028bddd577.tar.bz2
[CodeGen] MRI call back in TargetMachine
It is needed for target specific initializatons. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D143758
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index b9bf0a0..921feb2 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -106,6 +106,10 @@ MachineFunction &MachineModuleInfo::getOrCreateMachineFunction(Function &F) {
const TargetSubtargetInfo &STI = *TM.getSubtargetImpl(F);
MF = new MachineFunction(F, TM, STI, NextFnNum++, *this);
MF->initTargetMachineFunctionInfo(STI);
+
+ // MRI callback for target specific initializations.
+ TM.registerMachineRegisterInfoCallback(*MF);
+
// Update the set entry.
I.first->second.reset(MF);
} else {