This is the mail archive of the gcc-bugs@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: [PATCH] Re: REG_DEAD/REG_EQUIV problem.


On Sun, 18 Feb 2001, Jeffrey A Law wrote:

>   In message <Pine.LNX.4.21.0102012037050.19209-100000@front.linuxcare.com.au>y
> ou write:
>   > On Thu, 1 Feb 2001, Alan Modra wrote:
>   > 
>   > > (insn 17 15 21 (set (reg/v:DI 69)
>   > >         (mem/u:DI (lo_sum:DI (reg:DI 70)
>   > >                 (unspec:DI[ 
>   > >                         (symbol_ref/v/f:DI ("*L$C0001"))
>   > >                     ]  0)) 0)) 83 {*pa.md:2368} (insn_list 15 (nil))
>   > >     (expr_list:REG_EQUIV (mem/u:DI (lo_sum:DI (reg:DI 70)
>   > >                 (unspec:DI[ 
>   > >                         (symbol_ref/v/f:DI ("*L$C0001"))
>   > >                     ]  0)) 0)
>   > >         (expr_list:REG_DEAD (reg:DI 70)
>   > >             (nil))))
>   > 
>   > 	* rtlanal.c (reg_death_note_p): New function.
>   > 	(reg_mentioned_dies): New function.
>   > 	* rtl.h (reg_mentioned_dies): Declare.
>   > 	* reload1.c (reload): Don't set reg_equiv_memory_loc for an insn
>   > 	that references memory via a reg that dies.
>
> This is fundamentally going down the wrong path.

Fair enough.  Better to stop them being emitted in the first place.

> The REG_EQUIV is valid and it's valid for it to be used to create an
> equivalence in reg_equiv_memory_loc.
> 
> The problem is elsewhere.  This just fixes the symptom.

Is it really valid?  Let me ask this:

a) Is it OK for a REG_EQUIV to refer to a register that is marked as dead?
   (reg 70 in the above example)
b) If so, then making use of the REG_EQUIV means that the dead register
   needs to rise from the dead and live until the point where the
   equivalence is used.  This change in reg 70's life wasn't happening.
   Should it?
c) If so, is this worthwhile?  Why not extend reg 69's life instead?

Alan
-- 
Linuxcare.  Support for the Revolution.



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