This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Excess registers pushed - regs_ever_live not right way?
- From: Andrew Hutchinson <andrewhutchinson at cox dot net>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 27 Feb 2008 20:16:42 -0500
- Subject: Excess registers pushed - regs_ever_live not right way?
Register saves by prolog (pushes) are typically made with reference to
"df_regs_ever_live_p()" or "regs_ever_live. "||
If my understanding is correct, these calls reflect register USEs and
not register DEFs. So if register is used in a function, but not
otherwise changed, it will get pushed unnecessarily on stack by prolog.
(as noted in this bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32871)
I checked a couple of other ports but they all use
df_regs_ever_live_p(). Indeed this is noted method in manual.
The question is, what df routine or variable can be used to determine
which registers are DEFs and hence destructively used by a function?
Maybe: "df_invalidated_by_call" in conjunction with:
"df_get_call_refs perhaps()" perhaps?
Andy