This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in ra-colorize.c:merge_moves?
- From: Denis Chertykov <denisc at overta dot ru>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: Denis Chertykov <denisc at overta dot ru>, Michael Matz <matz at suse dot de>, Christian Ehrhardt <ehrhardt at mathematik dot uni-ulm dot de>, <gcc at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: 06 Mar 2003 01:03:45 +0300
- Subject: Re: Bug in ra-colorize.c:merge_moves?
- References: <03E09023-4E85-11D7-92B9-000393575BCC@dberlin.org>
Daniel Berlin <dberlin at dberlin dot org> writes:
> On Tuesday, March 4, 2003, at 03:22 PM, Denis Chertykov wrote:
>
> > Michael Matz <matz at suse dot de> writes:
> >
> >> Hi,
> >>
> >> On Mon, 3 Mar 2003, Daniel Berlin wrote:
> >
> > First of all. Michael ! Thank you for your answer.
> >
> >>> I've got a tree
> >>> with everything but your stack slots changes merged (including
> >>> pre-reload), and the number of coloring passes is about the same.
> >>> However, with your stack slots changes , it takes 3-5x as many
> >>> passes
> >>> in those functions that spill (some functions went from 3 passes to
> >>> 15
> >>> passes).
> >>
> >> Ugh, that's much. I wouldn't have expected this. The only thing
> >> which
> >> _should_ have changed is, that now sometimes there are stack-accesses
> >> while coloring, where formerly there were simply only accesses to
> >> SPILL_SLOT_P() pseudos. I believe Denis also makes some local
> >> optimizations while creating the code for the stack accesses early.
> >
> > Yes it is.
> > IE: We have a web to spill:
> >
> > i2 use web1
> > ...
> > i3 use web1
> > ...
> > i4 use web1
> >
> > We generate spill insns:
> >
> > i21 def web11 web1-pseudo-spill-slot
> > i2 use web11
> > ...
> > i31 def web12 web1-pseudo-spill-slot
> > i3 use web12
> > ...
> > i41 def web13 web1-pseudo-spill-slot
> > i4 use web13
> >
> > My code substitute web1-pseudo-spill-slot to real stack slot and
> > trying to incorporate real stack slot to original insns (i2,i3,i4).
> >
> > i2 use web1-real-stack-slot
> > ...
> > i3 use web1-real-stack-slot
> > ...
> > i4 use web1-real-stack-slot
> >
> > So, number of webs reduced and possibility of graph colorization
> > increased.
> >
>
> Um, look again.
> You've *decreased* the possibility of graph colorization in this
> example.
> The colorability of a graph is *not* related to the number of webs,
> it's related to the number of conflicts.
> web1 is now live *longer*, and thus, conflicts with more webs than it
> did before.
Please point in which place.
>
> It now conflicts with everything in the ...'s, *decreasing*
> colorability.
May be you misunderstand me ?
web1-real-stack-slot is a memory slot.
Please point in which place I have *decreased* the possibility of
graph colorization.
Denis.