https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63155

--- Comment #23 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #22)
> Created attachment 44692 [details]
> patch that does not help
> 
> The attached patch changes the partition view so that members of bases are
> adjacent.  This should improve the locality of the initial conflict set
> bits (we only record conflicts within same base variables).
> 
> This doesn't help memory usage for either testcase.
> 
> For the 2nd testcase we have 187988 partitions and 500 bases.
> 
> The conflict bitmaps still end up very sparse (but large).  There are also
> a lot of duplicate bitmaps (if you'd add self-conflicts).
> 
> Restricting anonymous coalesces to abnormal coalescing only increases the
> number of bases to 747 and doesn't help memory use significantly.

So doing this^^^ more conservatively somehow, choosing different bases for
different set of final coalesced abnormal partitions, would shrink the
size of the largest base significantly, reducing the quadraticness.

So perform the abnormal part of coalesce_partitions implicitely, computing
sets of coalesced partitions and pre-assigning a base to each of them.
The only complication is in rejecting further coalescing to the base
members (thus adjusting gimple_can_coalesce_p).

> There may be cases where the patch helps since it should improve locality.

Reply via email to