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

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 13:35:42 PST 2022


anna added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2443
+// (instead of rematerializing after every statepoint it is live through).
+// This can be benefitial when derived pointer is live across many
+// statepoints, but uses are rare.
----------------
Nit: beneficial


================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2518
+    // Current rematerialization algorithm is very simple: we rematerialize
+    // immediately before EVERY use, even if there are several uses in same
+    // block of if use is local to Cand Def. The reason is that this allows
----------------
So, these remats will be present till the end right? Seems suboptimal (in terms of compile time) especially if we have multiple uses within a single BB. 


================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2519
+    // immediately before EVERY use, even if there are several uses in same
+    // block of if use is local to Cand Def. The reason is that this allows
+    // us to avoid recomputing liveness without complicated analysis:
----------------
Nit: or if


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138912/new/

https://reviews.llvm.org/D138912



More information about the llvm-commits mailing list