[PATCH] D80937: Introduce a "gc-live" bundle for the gc arguments of a statepoint

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 10:46:09 PDT 2020


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

Currently, gc.relocates are defined in terms of indices into the statepoint's operand list.  Given the gc args are at the end of a variable length list of operands, this makes interpreting their indices by hand a tad challenging.  We can simplify the statepoint sequence and improve readability quite a bit by pulling these new operands into their own named operand bundle.

This patch defines a new operand bundle tag "gc-live".  The semantics of the bundle are the same as the existing gc arguments of a statepoint.  This patch simply introduces the definition and codegen for the bundle, future patches will migrate RS4GC to emitting the new form.

I'll note that I'm not particularly attached to the name "gc-live".  If anyone has a better suggestion, please make it.

Interestingly, with this done and the recent migration to using deopt and gc-transition bundles, we really don't have much left in the statepoint itself.  It really looks like the existing ID and flags fields are redundant; we have (existing!) attributes for all of them.  I think we'll be able to reduce the gc.statepoint signature to simply a wrapped call (e.g. actual target and actual arguments).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80937

Files:
  llvm/docs/LangRef.rst
  llvm/docs/Statepoints.rst
  llvm/include/llvm/IR/LLVMContext.h
  llvm/include/llvm/IR/Statepoint.h
  llvm/lib/IR/LLVMContext.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/Bitcode/operand-bundles-bc-analyzer.ll
  llvm/test/CodeGen/X86/statepoint-gc-live.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80937.267658.patch
Type: text/x-patch
Size: 15911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200601/2551857d/attachment.bin>


More information about the llvm-commits mailing list