[PATCH] D134951: [CodeGen][RegAllocFast] Add MRI delegate callback to notify VReg spill

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 08:03:23 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineRegisterInfo.h:189
+  void noteVirtualRegisterSpill(Register Reg) {
+    for (const auto &TheDelegate : TheDelegates)
+      TheDelegate->MRI_NoteVirtualRegisterSpill(Reg);
----------------
I assume TheDelegates are pointers, so const X *TheDelegate?


================
Comment at: llvm/lib/CodeGen/LiveRangeEdit.cpp:36
                                                      bool createSubRanges) {
-  Register VReg = MRI.createVirtualRegister(MRI.getRegClass(OldReg));
+  Register VReg = MRI.cloneVirtualRegister(OldReg);
   if (VRM)
----------------
Is the clone still strictly necessary for this patch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134951/new/

https://reviews.llvm.org/D134951



More information about the llvm-commits mailing list