This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove unnecessary jump threading restriction


On 08/06/2016 05:34 AM, Richard Biener wrote:
On Fri, Aug 5, 2016 at 10:43 PM, Jeff Law <law@redhat.com> wrote
On 08/05/2016 01:45 AM, Richard Biener wrote:


There is no need to avoid threading to a loop header, the threading
code can cope with this just fine.  Noticed when working on PR72772.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2016-08-05  Richard Biener  <rguenther@suse.de>

        * tree-ssa-threadupdate.c (thread_block_1): Remove unnecessary
        restriction on threading to a loop header.

This restriction exists to help prevent threading through a loop header into
the loop which can easily create an irreducible region.

In fact what you've done is revert the fix for 58343.  Now there is of
course a test for 58343 in the regression suite.

It's entirely possible that 58343 is just latent now or other changes in
tree-ssa-threadupdate.c prevent the problems that we saw with 58343.

Well, I removed the restriction that the forward threading path ends in a loop
header.  I did this to restore threadings we've done when there was a forwarder
before the loop header we threaded to -- a forwarder with a degenerate PHI
that was later removed and merged with the header anyway.  So I basically
changed nothing here.  I also don't see how forward threading to a loop header
(not across it) can cause an irreducible region to appear - the other part of
the condition which I retained certainly guards the case of crossing a
loop header.

But maybe I am missing something.
I think we can thread to the loop header, but into the loop.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]