public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* secondary_reload not called during IRA
@ 2011-10-19 16:19 Aurelien Buhrig
  2011-10-21  8:27 ` Aurelien Buhrig
  0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Buhrig @ 2011-10-19 16:19 UTC (permalink / raw)
  To: gcc-help

Hi,

Sorry about spamming this mailing list, but I need an advice once again...
I've switched gcc branch from 4.3.6 to 4.6.1 for my backend, and I
have a new reload problem.

During the IRA pass, the following insn:

(insn 18 218 19 4 (set (subreg:SI (reg:DI 20 [ D.2998 ]) 4)
        (reg/v:SI 37 [ arg_a ])) ../.././gcc/dp-bit.c:1385 24 {movsi}
     (nil))


is transformed into :

(insn 18 253 254 4 (set (reg:SI 7 a0)
        (reg/v:SI 2 r2 [orig:37 arg_a ] [37]))
../.././gcc/dp-bit.c:1385 24 {movsi}
     (nil))

(insn 254 18 19 4 (set (mem/c:SI (plus:PSI (reg/f:PSI 12 a5)
                (const_int -16 [0xfffffffffffffff0])) [8 %sfp+-16 S4 A16])
        (reg:SI 7 a0)) ../.././gcc/dp-bit.c:1385 24 {movsi}
     (nil))


The problem is that my TARGET_SECONDARY_RELOAD is not called with last
mem rtx before reloading (and a0 class is not valid for memory moves)
and thus I cannot force the right reg class for such moves.
Do I miss something ?

Thanks,
Aurélien

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: secondary_reload not called during IRA
  2011-10-19 16:19 secondary_reload not called during IRA Aurelien Buhrig
@ 2011-10-21  8:27 ` Aurelien Buhrig
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Buhrig @ 2011-10-21  8:27 UTC (permalink / raw)
  To: gcc-help

> Hi,
>
> Sorry about spamming this mailing list, but I need an advice once again...
> I've switched gcc branch from 4.3.6 to 4.6.1 for my backend, and I
> have a new reload problem.
>
> During the IRA pass, the following insn:
>
> (insn 18 218 19 4 (set (subreg:SI (reg:DI 20 [ D.2998 ]) 4)
>        (reg/v:SI 37 [ arg_a ])) ../.././gcc/dp-bit.c:1385 24 {movsi}
>     (nil))
>
>
> is transformed into :
>
> (insn 18 253 254 4 (set (reg:SI 7 a0)
>        (reg/v:SI 2 r2 [orig:37 arg_a ] [37]))
> ../.././gcc/dp-bit.c:1385 24 {movsi}
>     (nil))
>
> (insn 254 18 19 4 (set (mem/c:SI (plus:PSI (reg/f:PSI 12 a5)
>                (const_int -16 [0xfffffffffffffff0])) [8 %sfp+-16 S4 A16])
>        (reg:SI 7 a0)) ../.././gcc/dp-bit.c:1385 24 {movsi}
>     (nil))
>
>
> The problem is that my TARGET_SECONDARY_RELOAD is not called with last
> mem rtx before reloading (and a0 class is not valid for memory moves)
> and thus I cannot force the right reg class for such moves.
> Do I miss something ?


In fact, during reload replace pass, the (subreg:SI (reg:DI 20 [
D.2998 ]) 4) operand is reloaded into registers of class ADDRESS_REGS
(this is permitted), and then is spilled.
But my target do not permit spilling ADDRESS_REGS, in modes other than
PSImode... how to deal with this ?

I found a workaround by inverting alternatives in the movsi pattern so
that the first "best" alternative is the one with DATA_REGS class regs
which can be spilled. But it seems unsafe...

Thanks,
Aurélien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-21  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-19 16:19 secondary_reload not called during IRA Aurelien Buhrig
2011-10-21  8:27 ` Aurelien Buhrig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).