This is the mail archive of the gcc@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]

Re: ARM port bug


> While `update_life_info' executed after reload the `mark_regs_live_at_end'
> mark all registers used by the epilogue as being live at the end of
> the function and don't unmark it because RTL version of epilogue
> havn't a moves.
> 
> What's right ?
> 1. emit a RTL moves in epilogue;
> 2. remove `(define_expand "epilogue" ...)' (Why it's needed ?)
> 
> 
> Fragment from flow.c:mark_regs_live_at_end:
> 
>   /* Mark all global registers, and all registers used by the epilogue
>      as being live at the end of the function since they may be
>      referenced by our caller.  */
>   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>     if (global_regs[i] || EPILOGUE_USES (i))
>       SET_REGNO_REG_SET (set, i);
> 
>   if (HAVE_epilogue && reload_completed)
>     {
>       /* Mark all call-saved registers that we actually used.  */
>       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> 	if (regs_ever_live[i] && ! call_used_regs[i] && ! LOCAL_REGNO (i))
> 	  SET_REGNO_REG_SET (set, i);
>     }
> 
Richard,

Thinking about this section, how is this supposed to work when 

(jump_insn n n n (return))

also restores the registers automatically?  Annotating this with USE or 
CLOBBER will make it such that a conditional return insn will no-longer 
match (without significant extra baggage) and it is hard to describe 
varying lengths of restores in RTL anyway.

Should we consider registers that are implicitly restored by the epilogue 
as "local" (ie with LOCAL_REGNO)?

R.



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