This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Register Allocator query.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]