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



Reply via email to