[PATCH] D41162: [PM] port Rewrite Statepoints For GC to the new pass manager.

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 11:07:41 PST 2017


anna requested changes to this revision.
anna added a comment.
This revision now requires changes to proceed.

comments inline. Changes look almost good to go.



================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2519
   // Nothing to do for declarations.
   if (F.isDeclaration() || F.empty())
     return false;
----------------
we should assert instead of checking these now. Both versions of runOnModule (old pass and new pass manager versions of RS4GC) check these before calling runOnFunction.


================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2524
   // compiling code without a GCStrategy.
   if (!shouldRewriteStatepointsIn(F))
     return false;
----------------
Pls move these to the runOnModule versions and assert here. We don't want to unnecessarily get the analyses for functions that shouldn't rewrite statepoints.

This is the same behaviour we have before this change. We get the analyses (DT, TTI) after checking for the policy choice above.


https://reviews.llvm.org/D41162





More information about the llvm-commits mailing list