This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: IRA for GCC 4.4
- From: "J.C. Pizarro" <jcpiza at gmail dot com>
- To: "Peter Bergner" <bergner at vnet dot ibm dot com>, "Vladimir Makarov" <vmakarov at redhat dot com>, "Paolo Bonzini" <bonzini at gnu dot org>, FX <fxcoudert at gmail dot com>, "GCC Development" <gcc at gcc dot gnu dot org>, "Steven Bosscher" <stevenb dot gcc at gmail dot com>, "Kenneth Zadeck" <zadeck at naturalbridge dot com>, "Mark Mitchell" <mark at codesourcery dot com>
- Date: Tue, 29 Apr 2008 23:37:26 +0200
- Subject: Re: IRA for GCC 4.4
- References: <998d0e4a0804271245u65d2e4a0p5be45df2ff17a752@mail.gmail.com> <998d0e4a0804280818ibb93fc7oa38588699464ddaf@mail.gmail.com>
On Tue, 29 Apr 2008 20:25:56 +0200, "Steven Bosscher"
<stevenb.gcc@gmail.com> wrote:
> On Tue, Apr 29, 2008 at 6:22 PM, Mark Mitchell <mark@codesourcery.com> wrote:
> > Vladimir, if you feel that Peter's code cannot be used directly in IRA,
> > would you please explain why not?
>
> I think he already has explained, see
> http://gcc.gnu.org/ml/gcc/2008-04/msg00730.html
>
> Having looked at IRA a bit, I think I have to agree with Vlad that
> Peter's code is not easily adapted to IRA. Peter's code works for a
> single, immutable conflict graph for the whole function. IRA works
> with inter-region and intra-region conflicts (as far as I understand,
> documentation in ira-conflict.c would be welcome), so the sorting
> trick that Peter uses, doesn't translate one-to-one to Vlad's
> allocator.
>
> Having said that, I think the "square" approach with
> mirror_conflicts() that IRA currently has, is a big step backward from
> what we have now. IRA should at least have a representation for
> conflicts that does not duplicate information unnecessary. The bits
> that seem to be bad in this respect are build_conflict_bit_table() and
> mirror_conflicts(). It's not clear to me how these are used, but it
> looks like you can end up building a square conflict graph for the
> whole function, like GCC did before Peter's work. This could be a
> huge memory and speed regression if it isn't addressed.
>
> Another note: IRA uses VARRAYs, and I was under the impression we are
> trying to move away from those. Vlad, please use VECs instead.
>
> Gr.
> Steven
Use my idea of flexible chained upper triangulars & rectangulars as
indicated briefly in
http://gcc.gnu.org/ml/gcc/2008-04/msg00707.html
http://gcc.gnu.org/ml/gcc/2008-04/msg00681.html
You can update easily these structures through subroutines that
traverse the chains and update their chained local structures when
is needed, and is similar to the Observer pattern (when the subjects
are modified then it update the views of the observers too).
J.C.Pizarro