This is the mail archive of the gcc-prs@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: c/7871: ICE on legal code, global register variables problems


The following reply was made to PR c/7871; it has been noted by GNATS.

From: Jim Wilson <wilson at tuliptree dot org>
To: Richard Henderson <rth at redhat dot com>
Cc: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org,
   rz at linux-m68k dot org, wilson at gcc dot gnu dot org
Subject: Re: c/7871: ICE on legal code, global register variables problems
Date: 28 Feb 2003 11:43:48 -0500

 On Fri, 2003-02-28 at 00:47, Richard Henderson wrote:
 >           /* Calls may also reference any of the global registers,
 >              so they are made live.  */
 >           for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
 >             if (global_regs[i])
 >               mark_used_reg (pbi, regno_reg_rtx[i], cond, insn);
 
 We first call mark_set_1 (... CLOBBER...) which kills the register.
 Then we call mark_used_reg which makes it live again, and adds a
 REG_DEAD note to the call.  This REG_DEAD note is wrong.  This confuses
 combine into deleting the instruction because there is a REG_DEAD note
 for it and no visible use of it after combination.  It doesn't seem
 right to modify combine to treat REG_DEAD notes for global regs
 specially.  I think we need to avoid adding the REG_DEAD note in the
 first place.
 
 Maybe what we should do here is call mark_set_reg (...SET...) for global
 regs instead of mark_set_1 (...CLOBBER...).  I think this might work.  I
 will try this.  I have some other easier patches to deal with, so I will
 get back to this later.
 
 Jim
 
 


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