[PATCH] D23920: [StatepointsForGC] Identify values for rematerialization in presence of PHI

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 08:36:40 PDT 2016

reames accepted this revision.
reames added a comment.

LGTM w/minor comment

Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1802
@@ +1801,3 @@
+  // PHI nodes that have the same incoming values, and belonging to the same
+  // basic blocks are essentially the same SSA value.
+  if (PHINode *CurrentPhi = dyn_cast<PHINode>(CurrentValue))
I think it's important to call out in the comment that this is a workaround for deficiency in the base pointer rewriting code.  That's not immediately obvious to everyone reading.  :)

We really need to rewrite that code at some point.  My initial prototype version has lived far longer than it should have.  


More information about the llvm-commits mailing list