[PATCH] D138912: [RS4GC] Rematerialize derived pointers before uses.

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 04:38:22 PST 2022


dantrushin created this revision.
dantrushin added reviewers: skatkov, anna, reames.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dantrushin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 <https://reviews.llvm.org/D138910>, D138911 <https://reviews.llvm.org/D138911>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138912

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138912.478526.patch
Type: text/x-patch
Size: 17960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221129/de966f33/attachment.bin>


More information about the llvm-commits mailing list