[PATCH] D81647: MIR Statepoint refactoring. Part 3: Spill GC Ptr regs.

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 00:48:42 PDT 2020


skatkov added inline comments.


================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:276
+                          << printMBBReference(*EHPad));
+        return FI;
+      }
----------------
assert that frame slot is reserved? (nobody used it)


================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:327
+// statepoints.
+static bool hasRegReload(Register Reg, int FI, MachineBasicBlock *MBB,
+                         const TargetInstrInfo *TII,
----------------
Can we just track for each EhPad what registers were reloaded instead of this search?


================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:400
     SmallSet<Register, 8> VisitedRegs;
+    SmallSet<Register, 8> GCRegs = collectGCRegs(MI);
     for (unsigned Idx = StatepointOpers(&MI).getVarIdx(),
----------------
I wonder, do we really need to collect GC regs. According to implementation, any register found in operand after some index is considered as GC reg.
So can we just compute this index and use it in this loop.

Do I miss anything?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81647





More information about the llvm-commits mailing list