This is the mail archive of the
mailing list for the GCC project.
Re: Excess registers pushed - regs_ever_live not right way?
- From: Andrew Hutchinson <andrewhutchinson at cox dot net>
- To: "Seongbae Park (???, ???)" <seongbae dot park at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Sun, 02 Mar 2008 19:00:36 -0500
- Subject: Re: Excess registers pushed - regs_ever_live not right way?
- References: <47C60B7A.firstname.lastname@example.org> <email@example.com> <47C6166B.firstname.lastname@example.org> <email@example.com> <47C98D4C.firstname.lastname@example.org> <email@example.com>
I gave up with DF and instead went through function tree argument to
rediscover argument registers.
It was then simple matter to exclude these from epilog/prolog registers
The patches is posted - and seem quite portable to other targets.
best regards and thanks for help.
Seongbae Park (???, ???) wrote:
2008/3/1 Andrew Hutchinson <firstname.lastname@example.org>:
I'm am still struggling with a good solution that avoids unneeded saves
of parameter registers.
To solve problem all I need to know are the registers actually used for
parameters. Since the caller assumes all of these are clobbered by
callee - they should never need to be saved.
I'm totally confused what is the problem here.
I thought you were seeing extra callee-save register save/restore in prologue,
but now it sounds like you're seeing extra caller-save register save/restore.
Which one are you trying to solve, and what kind of target is this ?
DF_REG_DEF_COUNT is showing 1 artificial def for all POTENTIAL parameter
registers - not just the ones that are really used (since it uses target
FUNCTION_ARG_REGNO_P to get parameter registers)
You said you wanted to know if there's a def of a register within a function.
For an incoming parameter, there will be one artificial def,
and if there's no other def, it means there's no real def
of the register within the function.
So the DF artificial defs are useless in trying to find real parameter
I don't understand what you mean by this. What do you mean by
"real parameter register" ?
That seem to require going over all DF chains to work out which
registers are externally defined. DF does not solve problem for me.
What do you mean by "externally defined" ?
DF may not solve the problem for you,
but now I'm completely lost on what your problem is.
There has got to be an easier way of finding parameter registers used by
If you want to find all the uses (use as in reading a register but not
writing to it),
you should look at USE chain, not DEF chain, naturally.