[PATCH] D80674: Default to generating statepoints with deopt and gc-transition bundles if needed

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 16:56:12 PDT 2020


reames created this revision.
reames added reviewers: anna, skatkov, dantrushin.
Herald added subscribers: bollu, hiraditya, mcrosier.
Herald added a project: LLVM.
reames updated this revision to Diff 266699.
reames edited the summary of this revision.
reames added a comment.

Make a deeper change to the interface to simplify the semantic description of the patch and avoid introducing something we'd have to fix later anyway.

(Also known as, I have the aws builder spun up, so I might as well make the change which requires a global rebuild now.)


Continues from D80598 <https://reviews.llvm.org/D80598>.

The key point of the change is to default to using operand bundles instead of the inline length prefix argument lists for statepoint nodes.  An important subtlety to note is that the presence of a bundle has semantic meaning, even if it is empty.  As such, we need to make a somewhat deeper change to the interface than is first obvious.

Existing code treats statepoint deopt arguments and the deopt bundle operands differently during inlining.  The former is ignored (resulting in caller state being dropped), the later is merged.

We can't preserve the old behaviour for calls with deopt fed to RS4GC and then inlining, but we can avoid the no-deopt case changing.  At least in internal testing, that seem to be the important one.  (I'd argue the "stop merging after RS4GC" behaviour for the former was always "unexpected", but that the behaviour for non-deopt calls actually make sense.)


https://reviews.llvm.org/D80674

Files:
  llvm/include/llvm/IR/IRBuilder.h
  llvm/lib/IR/IRBuilder.cpp
  llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  llvm/test/Transforms/RewriteStatepointsForGC/base-pointers-4.ll
  llvm/test/Transforms/RewriteStatepointsForGC/basic.ll
  llvm/test/Transforms/RewriteStatepointsForGC/deopt-lowering-attrs.ll
  llvm/test/Transforms/RewriteStatepointsForGC/scalar-base-vector-2.ll
  llvm/test/Transforms/RewriteStatepointsForGC/scalar-base-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80674.266699.patch
Type: text/x-patch
Size: 34307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200527/ab240831/attachment.bin>


More information about the llvm-commits mailing list