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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
2511 | Nope.More than one - i.e., it has a sub-chain which could have changed. |
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
2511 | Right |
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
2517 | I left it as a follow up improvement because implementing it will complicate implementation. Regarding compile time:
|
Nit: beneficial