[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch
Jeff Law
law@redhat.com
Wed Oct 21 14:53:00 GMT 2015
On 10/21/2015 02:56 AM, Richard Biener wrote:
> On Mon, Oct 19, 2015 at 6:23 PM, Jeff Law <law@redhat.com> 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.
>
> Note that this fixed some of the size regressions I see on SPEC CPU 2000
> but not all, esp. 176.gcc seems to be as bad as before (seen with plain -O2
> on x86_64).
I haven't started looking at them explicitly yet. Good to know it
helped some though.
jeff
More information about the Gcc-patches
mailing list