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

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 14:19:52 PDT 2015


reames added a comment.

In http://reviews.llvm.org/D13718#267123, @chenli wrote:

> 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.


I wouldn't want to blindly tail duplicate the resume.  Doing so for a particular scenario (landing pad to resume contains only debug intrinsics) is reasonable, but we definitely want to be able to common suffixes into a shared rethrow and the easiest way to do that is to have a common resume at the end.  In other words, we need to establish profitability before doing the transform.

Thinking about it further, I think my suggestion is just a bad idea.  Go with the approach you had, let's just cleanup the code to make it clear what's happening.


http://reviews.llvm.org/D13718





More information about the llvm-commits mailing list