This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Local update flow info assumes valid situations are illegal
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: Local update flow info assumes valid situations are illegal
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 3 Jan 2001 17:40:45 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <orae98w1kw.fsf@guarana.lsd.ic.unicamp.br>
> * flow.c (verify_local_live_at_start): Don't die if a register
> dead at the end of a BB becomes dead at the head.
Absolutely not! All attempts to weaken the test this
function performs will be met with fierce resistance.
As you stated yourself, the problems are elsewhere.
Get elsewhere to fix up flow information itself by
invoking update_life_info with UPDATE_LIFE_GLOBAL,
or whatever is necessary to keep things straight.
> I've recently been presented with another testcase in which all uses
> of a register could be optimized away by combine, so the register
> became dead in the whole basic block.
So why doesn't this existing code in combine
/* We haven't found an insn for the death note and it
is still a REG_DEAD note, but we have hit the beginning
of the block. If the existing life info says the reg
was dead, there's nothing left to do. Otherwise, we'll
need to do a global life update after combine. */
if (REG_NOTE_KIND (note) == REG_DEAD && place == 0
&& REGNO_REG_SET_P (bb->global_live_at_start,
REGNO (XEXP (note, 0))))
{
SET_BIT (refresh_blocks, this_basic_block);
need_refresh = 1;
}
trigger? This will eventually invoke update_life_info
just as I said.
> In other cases, a fixed hardware register was not used at all before
> some split introduced uses thereof; in this case, the register ended
> up live in the beginning of the block, even though it was dead at the end.
Hmm. Trickier. During what pass is the split invoked?
r~