[PATCH] D80598: Start migrating away from statepoint's inline length prefixed argument bundles

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 16:23:28 PDT 2020


reames created this revision.
reames added reviewers: skatkov, dantrushin, anna.
Herald added subscribers: bollu, hiraditya, mcrosier.
Herald added a project: LLVM.

In the current statepoint design, we have four distinct groups of operands to the call: call args, gc transition args, deopt args, and gc args.  This format prexisted the support in IR for operand bundles and was in fact one of the inspirations for the extension.  However, we never went back and rearchitected statepoints to fully leverage bundles.

This change is the first in a small sequence to do so.  All this does is extend the SelectionDAG lowering code to allow deopt and gc transition operands to be specified in either inline argument bundles or operand bundles.

Once this is in, I plan to do a few follow on changes:

1. Switch RS4GC to default to the bundle representation where possible.  This will involve auto-updating a bunch of tests and should greatly improve readability.

2a) Manually migrate most of the codegen tests to using bundles.
2b) Mark the inline bundles as deprecated in LangRef.

3. Propose a new "gc" bundle type to remove the second to last embedded bundle.  (Call args seem to make sense where they are, so I'm not planning to remove those.)
4. Default RS4GC to generating the operand bundle form.
5. Repeat 2a/2b for gc operands.  5a (test update) is the most error prone manual step unfortunately.
6. Once all of the above has landed, and baked for a bit, change the format in LangRef and drop lowering support for the old format.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80598

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/CodeGen/X86/statepoint-gctransition-call-lowering.ll
  llvm/test/CodeGen/X86/statepoint-regs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80598.266367.patch
Type: text/x-patch
Size: 6019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200526/56fa2405/attachment-0001.bin>


More information about the llvm-commits mailing list