This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Register Allocator query.
- From: Denis Chertykov <denisc at overta dot ru>
- To: Michael Matz <matz at suse dot de>
- Cc: Leon Taylor <leon_taylor_007 at yahoo dot co dot in>, <gcc at gcc dot gnu dot org>
- Date: 22 Nov 2002 23:57:21 +0300
- Subject: Re: Register Allocator query.
- References: <Pine.LNX.4.33.0211181646510.32309-100000@wotan.suse.de>
Michael Matz <matz@suse.de> writes:
> Hi,
>
> On Sat, 16 Nov 2002, [iso-8859-1] Leon Taylor wrote:
>
> > Is it possible *not* to make a "web" corresponding
> > to a pseudo so that its assignment doesn't take place.
>
> Hmm, yes. But that's probably more difficult than simply ignoring certain
> webs when coloring (i.e. think of them as conflicting with nothing) and
> then ignore them in spilling too. The problem with the approach of not
> creating those webs at first hand would be to teach all code, which
> traverses all register references, that some of them then would not be
> belonging to a web. If I were to implement such webs I would invent
> either a new state, which is thought of as a sub-state of COLORED, but
> whose color is non-conflicting with everything.
>
> > A related query. In a comment in "web" structure
> > in gcc/ra.h
> > /* While spilling this is the rtx of the home of
> > spilled webs.It can be a mem ref (a stack slot), or a
> > pseudo register. */
> > rtx stack_slot;
> >
> > So does this means that it is mem only after final
> > re-write and it is necessarily a pseudo during
> > the one_pass () function ?
>
> Currently that is the case yes. But only because of the current
> implementation not by design. At some time I might choose to create
> either directly stack refs or pseudos based on some heuristics, for
> instance if it's profitable to create a whole new pseudo with all it's
> references.
I have already changed this in my internal version.
I'm allocate stack slots and substitute pseudos to stack slots
immediately after delete_useless_defs in actual_spill.
I have done this because elimination phase must know frame size.
Denis.
PS: Few weeks/months ago you promised me to expand your ideas about
elimination.