[PATCH] D13718: [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.

Chen Li via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 11:14:47 PDT 2015


chenli added a comment.

In http://reviews.llvm.org/D13718#267109, @reames wrote:

> The general transform looks reasonable, but I'd suggest possibly tackling this a slightly different way.  Rather than explicitly doing the detection of a trivial block and rewrite in a single step, replace the branch to the unified resume with a resume and then let the existing code handle it.  Doing it this way could make the change less invasive and easier to reason about.  Note that this is a suggestion to think about, not a requirement.  If you feel the current approach is easier/better, we can run with this after cleanup.


I was sort of thinking about a similar approach as you pointed, which was tail duplicating the common resume block to all its predecessors. I worried that if SimplifyResume could not simply all the predecessors, it might not be able to merge them back to a common resume block and would cause code size increment.


http://reviews.llvm.org/D13718





More information about the llvm-commits mailing list