[PATCH] D80191: MIR Statepoint refactoring: pass GC pointers in VRegs. Part 1/5.

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 01:36:09 PDT 2020


dantrushin created this revision.
dantrushin added reviewers: reames, skatkov, bogner.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Change MIR representation of STATEPOINT instruction from explicit
spill/reload of GC pointer arguments around statepoint to simply
assigning them to virtual registers. Then they can be spilled as
necessary. Relocated pointers are represented as STATEPOINT's Def
operands (tied to corresponding derived pointers from GC args list):

rel1,rel2,... = STATEPOINT ..., derived1<tied-def0>, derived2<tied-def1>, ...

This patch introduces new SelectionDAG node, StatepointSDNode,
which looks like this:

[Relocates,] OUTCHAIN, GLUE = GC_STATEPOINT(...)

Due to limited storage available in SDNode subclasses, `Relocates`
correspond 1-1 to first N derived pointers.
Due to limited amount of tied registers supported by LLVM, `N` is
bounded by that limit. If there are more GC pointers, they are
passed using old scheme through stack slots.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80191

Files:
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/include/llvm/CodeGen/SelectionDAG.h
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80191.264815.patch
Type: text/x-patch
Size: 4546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200519/9c81f8d0/attachment-0001.bin>


More information about the llvm-commits mailing list