[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: Re: c/7871: ICE on legal code, global register variables problems
From: Jim Wilson <wilson () tuliptree ! org>
Date: 2003-02-28 16:43:48
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic