Re: [PATCH, SMS 1/2] Avoid generating redundant reg-moves

2011-09-30 Thread Ayal Zaks
On Fri, Sep 30, 2011 at 10:03 AM, Revital Eres wrote: > Hello, > >> This >> +  /* Skip instructions that do not set a register.  */ >> +  if (set && !REG_P (SET_DEST (set))) >> +    continue; >> is ok. Can you also prevent !set insns from having reg_moves? (To be updated >> once auto_i

Re: [PATCH, SMS 1/2] Avoid generating redundant reg-moves

2011-09-30 Thread Revital Eres
Hello, > This > +  /* Skip instructions that do not set a register.  */ > +  if (set && !REG_P (SET_DEST (set))) > +    continue; > is ok. Can you also prevent !set insns from having reg_moves? (To be updated > once auto_inc insns will be supported, if they'll deserve reg_moves too.)

Re: [PATCH, SMS 1/2] Avoid generating redundant reg-moves

2011-09-27 Thread Ayal Zaks
On Tue, Sep 27, 2011 at 10:47 AM, Revital Eres wrote: > Hello, > >> This >> +  /* Skip instructions that do not set a register.  */ >> +  if (set && !REG_P (SET_DEST (set))) >> +    continue; >> is ok. Can you also prevent !set insns from having reg_moves? (To be updated >> once auto_i

Re: [PATCH, SMS 1/2] Avoid generating redundant reg-moves

2011-09-27 Thread Revital Eres
Hello, > This > +  /* Skip instructions that do not set a register.  */ > +  if (set && !REG_P (SET_DEST (set))) > +    continue; > is ok. Can you also prevent !set insns from having reg_moves? (To be updated > once auto_inc insns will be supported, if they'll deserve reg_moves too.)

Re: [PATCH, SMS 1/2] Avoid generating redundant reg-moves

2011-09-26 Thread Ayal Zaks
>OK for mainline? Doh, hard to believe we never checked that an insn defines a register before spitting out reg_moves for it ... nice catch. This +  /* Skip instructions that do not set a register.  */ +  if (set && !REG_P (SET_DEST (set))) +    continue; is ok. Can you also prevent !

[PATCH, SMS 1/2] Avoid generating redundant reg-moves

2011-09-25 Thread Revital Eres
Hello, The attached patch contains a fix to generate_reg_moves function. Currently we can generate reg-moves for stores which are later eliminated. This happens when we have mem dependency with distance 1 and as a result the number of regmoves is at least 1 based on the following calculation take