[PATCH] D43929: [RewriteStatepoints] Fix stale parse points

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 1 18:12:21 PST 2018


yrouban added inline comments.


================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2534
   // consider those in reachable code since we need to ask dominance queries
-  // when rewriting.  We'll delete the unreachable ones in a moment.
+  // when rewriting.  If unreachable found then we remove all unreachable
+  // blocks and recollect the statepoints again.
----------------
anna wrote:
> I'm not a fan of double collection of statepoints :) How about making this clearer:
> 1. Unconditionally run canonicalizing step: `removeUnreachableBlocks`.
> 2. Compute statepoints using line 2561 - 2565. At this point, just an assert that `DT.isReachableFromEntry` is enough.
> 
> 
> Also, pls add an explicit comment stating that `removeUnreachableBlocks` is stronger than `isReachableFromEntry`. 
Ok. Make sense.
I'm not sure if removeUnreachanbleBlocks() is easy. That is why I propose its lazy run. I will make it simple as you suggested.


Repository:
  rL LLVM

https://reviews.llvm.org/D43929





More information about the llvm-commits mailing list