[all-commits] [llvm/llvm-project] 86ed0d: [RS4GC] Rematerialize derived pointers before uses.

dantrushin via All-commits all-commits at lists.llvm.org
Tue Dec 27 06:09:39 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86ed0daae7b4cfb8d93a74f38f2bad0027240846
  Author: Denis Antrushin <dantrushin at gmail.com>
  Date:   2022-12-27 (Tue, 27 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
    M llvm/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers-at-uses.ll
    M llvm/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll

  Log Message:
  [RS4GC] Rematerialize derived pointers before uses.

Introduce an option to rematerialize derived pointers immediately
before their uses instead of after every statepoint. This can be
beneficial when pointer is live across many statepoints but has
few uses.
Initial implementation is simple and rematerializes derived pointer
before every use, even if there are several uses in the same block
or rematerialization instructions can be hoisted etc.
Transformation is considered profitable if we would insert less
instructions than we would insert after every live statepoint.

Depends on D138910, D138911

Reviewed By: anna, skatkov

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

More information about the All-commits mailing list