On Mon, 19 Oct 2015, Jeff Law wrote:
> If I hack up GCC's old jump threader to avoid threading across backedges and
> instead let the FSM threader handle that case, then we end up with cases where
> the FSM threader creates irreducible loops with marginal benefit.
>
> This can be seen in ssa-dom-thread-2{d,e,f}.c.
>
> We've long avoided such threads in the old jump threader.  We generally want
> to avoid them in the FSM threader as well.  The only case where we're going to
> allow them is when we're able to eliminate a multi-way branch from the loop.
>
> Bootstrapped and regression tested on x86_64-linux-gnu.  Also tested the above
> mentioned testcases with my hacked up compiler.
>
> Installed on the trunk.

Please do *not* backport this, it causes
unreachable-jump-table-entry issues for cris-elf, breaking build
in newlib.  Although this *is* a manifestation of undue reliance
on assembler broken-dot-word support for this target, I can
imagine similar issues with branches stretched beyond optimal
limit for other targets.

I have no idea whether there's an actual bug related to the
patch or something "just waiting to happen" and 16-bit-offsets
just too close to the limits.  Brief inspection of the generated
assembly-code is, well, "inconclusive".  Also, I'm travelling at
the moment.

<non-inline patch can't be quoted, but it's r228974 on trunk.>

brgds, H-P

Reply via email to