[all-commits] [llvm/llvm-project] 587fa9: Default to generating statepoints with deopt and g...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu May 28 10:14:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 587fa99cfdb7d2a97143ba20ed8e8face57aa01c
      https://github.com/llvm/llvm-project/commit/587fa99cfdb7d2a97143ba20ed8e8face57aa01c
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2020-05-28 (Thu, 28 May 2020)

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

  Log Message:
  -----------
  Default to generating statepoints with deopt and gc-transition bundles if needed

Continues from 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.)

Differential Revision: https://reviews.llvm.org/D80674




More information about the All-commits mailing list