This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Register Allocator query.
- From: Michael Matz <matz at suse dot de>
- To: Leon Taylor <leon_taylor_007 at yahoo dot co dot in>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 18 Nov 2002 16:54:39 +0100 (CET)
- Subject: Re: Register Allocator query.
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. For instance in non-optimizing compilation I guess it would
be faster to directly emit the stack refs. I.e. don't count on the
content of .stack_slot of being a mem or pseudo every time. It can change
per web.
Ciao,
Michael.