[PATCH] D11819: [RewriteStatepointsForGC] Avoid using unrelocated pointers after safepoints

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 12:53:43 PDT 2015


reames added a comment.

Sanjoy, you're example transform isn't directly legal.  Your example switch is a three way branch (default, true, false), not a two way branch.  There is no way to represent a three way branch in a single br instruction.  Your example does point out that we're failing to remove a provably unreachable default case.  If we did so, the switch would become a two way switch and then be converted to a branch.

Given the switch logic in the patch is pretty much useless as you point out, I'm just going to remove it for the moment.  Longer term, I want to extend this code to reason about other classes of instructions and whether they're legal to move.  I want that to be a separate patch though.

I will take your other comment and apply it.


http://reviews.llvm.org/D11819





More information about the llvm-commits mailing list