This is the mail archive of the gcc-patches@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: Reload patch for PA call rewrite.


> This would mean that no leaf functions would ever have an
> empty stack frame.  Badness.

Ah yes, you are correct.  There are a couple of extra instructions in a
leaf function.  I am tempted to store the arg pointer in the callers frame.
The HP compiler seems to allocate four extra slots beyond the two listed
in the ABI for the return pointer and previous stack pointer, so there
probably wouldn't be a problem in using one them.  However, I will take a
look at your suggestion.

I have been pondering whether the arg pointer needs to be spilled when
it is not an eliminable register.  This isn't done now.  However,
reload spills eliminable registers when they can't be eliminated.
So, is it necessary in this situation?

When the register is fixed, I don't think it is necessary unless it
is possible for overlaps to occur.  There never seem to be any pseudos
assigned directly when the register is fixed.  Overlaps couldn't occur
in the configuration that I was testing because I selected an even
register for the arg pointer and wide modes are constrained to start
on an even register.  If it is generally true that overlaps don't occur
when the register is fixed, then spill_hard_reg doesn't need to make
a pass through the pseudos when it is dealing with a fixed register.

In the current situation where it is not fixed, spilling appears to
result in a slight performance reduction although this is is based on
a rather limited amount of testing.  I am concerned that since the
register is used for multiple purposes and instantiate_new_reg
instantiates virtual_incoming_args_rtx using the arg_pointer_rtx
that there could be conficts.  However, I have never observed any.
Do you have an opinion on this?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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