[PATCH] Loop unswitching: support gswitch statements.

Andrew MacLeod amacleod@redhat.com
Mon Nov 8 18:34:57 GMT 2021


On 11/8/21 10:05 AM, Martin Liška wrote:
> On 9/28/21 22:39, Andrew MacLeod wrote:
>> In Theory, modifying the IL should be fine, it happens already in 
>> places, but its not extensively tested under those conditions yet.
>
> Hello Andrew.
>
> I've just tried using a global gimple_ranger and it crashes when loop 
> unswitching duplicates
> some BBs.
>
ah, ok, so the default on-entry cache for ranger doesn't expect to see 
the number of BBs to increase.  .  I can change this to grow, but I want 
to avoid too many grows.  This test case looks like it grows the number 
of BBs from 24 to somewhere north of 90..  Do you have any idea in 
advance how many BBs you will be adding?  Although Im not sure how to 
make such a suggestion anyway .  Ill work something out.  The sparse 
cache has no such issue, but you will lose precision so we don't want to 
trigger on that anyway.

As work around for the moment to keep you going, heres a patch which 
simply starts with 256 extra spaces, so that should allow you to 
continue while I fix this properly to grow.  and you can see if things 
continue to work as expected.  You can increase that number as you see fit

I'll put in a proper fix in a bit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: m.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211108/7fbaf179/attachment-0001.bin>


More information about the Gcc-patches mailing list