[PATCH][JumpThreading] Allow threading over loop headers when creating single block loops

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 00:20:41 PDT 2016


Now that phab is back up, see https://reviews.llvm.org/D25075

On Thu, 29 Sep 2016 at 15:21 James Molloy via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Hi Philip,
>
> [Sending old-school because Phab is down, being upgraded]
>
> I’d appreciate your thoughts on this patch. I *think* the logic is sound
> and it’s simple and worthwhile to handle this special-case.
>
> We have a very broad-brush bailout in JumpThreading - we never thread over
> a
> loop header. This is so we don't create irreducible control flow.
>
> However, as mentioned in the existing comments there are situations where
> we'd
> want to thread over a loop header and it can create significant
> improvements in
> some cases.
>
> As it's hard to know if irreducible control flow would be created, handle
> specially the case where we thread from predecessor to itself - essentially
> generating a single block loop.  Single block loops aren't irreducible by
> definition and are easy to check.
>
> Cheers,
>
> James_______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160930/9062ea56/attachment.html>


More information about the llvm-commits mailing list