[PATCH][JumpThreading] Allow threading over loop headers when creating single block loops
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 07:20:55 PDT 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-JumpThreading-Allow-threading-over-loop-headers-when.patch
Type: application/octet-stream
Size: 5060 bytes
Desc: 0001-JumpThreading-Allow-threading-over-loop-headers-when.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160929/aaf32796/attachment.obj>
More information about the llvm-commits
mailing list