This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Reload using a live register to reload into
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: "Pranav Bhandarkar" <pranav dot bhandarkar at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 7 Nov 2007 09:15:36 +0100
- Subject: Re: Reload using a live register to reload into
- References: <649555d50711060442q38d29803v289f4737e9551890@mail.gmail.com>
> The file.c.176r.greg for insn 309 says
>
> "Spilling for insn 309.
> Using reg 6 for reload 0"
>
> and indeed rld[0].regno is 6 and rld[0].in is
>
> (plus:SI (reg/f:SI 29 $sp)
> (const_int 176 [0xb0]))
>
> However the function choose_reload_regs chooses $c1 for this reload
> and sets rld[0].reg_rtx to the rtl expression for $c1.
The reload pass features a few "optimizations" that can bypass the initial
selection.
> I am confused whether reg_rtx should always be the rtl expression for
> regno ?
No, not always.
> Anyways shouldnt reload be checking for live registers before reloading into
> them ?
Of course, it goes to great length to do so but there can be bugs. You didn't
specify which version of the compiler you're using though; they may have been
already fixed on the mainline.
--
Eric Botcazou