This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] The Integrated Register Allocator


Vladimir Makarov <vmakarov@redhat.com> wrote:
> After latest patches I have (on ira branch)
> 
> _dadd:
>     mov.l    r14,@-r15
>     mov.l    .L3,r0
>     sts.l    pr,@-r15
>     jsr    @r0
>     mov    r15,r14
>     mov    r14,r15
>     lds.l    @r15+,pr
>     rts   
>     mov.l    @r15+,r14

This looks the code generated without -m4.
 
> I think the patch responsible for fixing was
> 
> http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00400.html

I've confirmed that the above patch already exists in my ira
tree.  With -O2 -fira -m4, the insns in .174r.sched1 dump are

(insn:HI 7 24 12 3 fadd.c:1 (parallel [
            (set (reg:DF 162)
                (plus:DF (reg:DF 68 fr4 [ x ])
                    (reg:DF 70 fr6 [ y ])))
            (use (reg/v:PSI 151 ))
        ]) 343 {adddf3_i} (expr_list:REG_DEAD (reg:DF 70 fr6 [ y ])
        (expr_list:REG_DEAD (reg:DF 68 fr4 [ x ])
            (nil))))

(insn:HI 12 7 18 3 fadd.c:1 (parallel [
            (set (reg/i:DF 64 fr0 [ <result> ])
                (reg:DF 162))
            (use (reg/v:PSI 151 ))
            (clobber (scratch:SI))
        ]) 198 {movdf_i4} (expr_list:REG_DEAD (reg:DF 162)
        (expr_list:REG_DEAD (reg/v:PSI 151 )
            (nil))))

and .178r.ira says

Pass 0 for finding allocno costs

    a0 (r162,l0) best GENERAL_REGS, cover GENERAL_REGS

  a0(r162,l0) costs: SIBCALL_REGS:2000000 GENERAL_REGS:2000000 FP_REGS:2000000 MEM:2000000

though the old allocator choses r162 from FP_REGS.

Regards,
	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]