This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reload patch v4
- To: Bernd Schmidt <crux at Pool dot Informatik dot RWTH-Aachen dot DE>
- Subject: Re: Reload patch v4
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 06 Oct 1998 23:14:21 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
> Are you sure about this? It should be perfectly legal to inherit across
> a basic block boundary, unless there's a CODE_LABEL at the start of the
> second basic block.
I was fairly sure. Though I hadn't actually looked at the code.
Yes, in theory, you can inherit across a bb boundary if there's no label --
effectively it means we're inheriting within extended basic blocks.
And as you mention, this could cause problems with the code to avoid spilling
psuedos in hard regs in blocks which don't need the hard regs for spill regs.
This is worrisome.
Can you look into how/why this is safe -- I can't see that inheriting across
an extended basic block if we allow reload to avoid spilling pseudos in certain
blocks when the hard register is needed as a spill elsewhere.
While we don't have the exact same problem with localized spilling, I do think
we have a closely related problem. We need to look into this further.
> Maybe because of this (from eliminate_regs):
>
> /* If SET_DEST changed from a REG to a MEM and INSN is an insn,
> write a CLOBBER insn. */
> if (GET_CODE (SET_DEST (x)) == REG && GET_CODE (new0) == MEM
> && insn != 0 && GET_CODE (insn) != EXPR_LIST
> && GET_CODE (insn) != INSN_LIST)
> emit_insn_after (gen_rtx_CLOBBER (VOIDmode, SET_DEST (x)), insn);
>
> This appears to emit CLOBBERs for some pseudos that didn't get hard registe > rs.
> I think I remember that there was code in reload.c that did something simil
> ar, but I can't find it right now.
Could be. I don't know. I just know I saw pseudos in that function :-)
I think we need to find out under what conditions we can get a pseudo into
that function and determine how that interacts with localized spilling and
inheritance.
jeff