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

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 08:42:46 PDT 2020


dantrushin marked 5 inline comments as done.
dantrushin added a comment.

That EHPad reload tracking does not fit very well in existing design. I added it as a separate entity stored in `StatepointProcessor` and passed to 
`StatepointState::insertReloads`.
Ideally, I would insert all reloads in a single sweep after all statepoints has been processed. But I did not find a clean way to do that without refactoring 
(like merging `StatepointState`s functionality into`StatepointProcessor`).



================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:400
     SmallSet<Register, 8> VisitedRegs;
+    SmallSet<Register, 8> GCRegs = collectGCRegs(MI);
     for (unsigned Idx = StatepointOpers(&MI).getVarIdx(),
----------------
skatkov wrote:
> 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?
This is to handle pointers found in both deopt state and gc pointer section uniformly.
To avoid case when same object is passed both in register and in stack slot.



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