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: [PATCH] df: Keep return address register undefined until epilogue_completed


On 09/10/2016 01:17 AM, Segher Boessenkool wrote:
On Fri, Sep 09, 2016 at 04:40:12PM -0600, Jeff Law wrote:
Right now the dataflow is conservatively correct WRT the return register.

And conservatively incorrect wrt all other callee-saved regs!
But prior to prologue/epilogue insertion it shouldn't matter. In fact, explicit references to callee saved regs prior to register allocation has always been problematical.

I do think our handling of life information for callee-saved regs after insertion of the prologue/epilogue could be improved.

In a separate shrink wrapped world ISTM that we want to move to a model where the return insn itself is a use of the appropriate callee saved regs. If we did that I suspect some of the hacks from the separate shrink wrapping kit would just "go away".

Attaching actual USEs to those insns is obviously problematical though from a recognition standpoint. It'd probably have to be structured more like what we do with CALL_INSNs to mark registers used/set.



If we made the change you want to make than the dataflow becomes overly
optimistic about the range over which the return register is live prior
to inserting the prologue/epilogue into the insn chain.

This seems unsafe to me.

Yes, but so does the current situation.  And it all seems to work
nevertheless :-)
But that doesn't make it right...

Jeff


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