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: Patch: [lno-branch] loop-invariant.c problem


Hello,

> Which is wrong, and causes invalid code to be produced when the outer 
> loop is completely peeled:  the REG_EQUAL from one iteration matches 
> with the set of 1597 from the previous iteration.  The fix is simply to 
> record 
> REG_EQUAL notes as uses: 
> 
> Index: loop-invariant.c 
> =================================================================== 
> RCS file: /cvs/gcc/gcc/gcc/Attic/loop-invariant.c,v 
> retrieving revision 1.1.4.9 
> diff -u -d -b -w -r1.1.4.9 loop-invariant.c 
> --- loop-invariant.c    10 May 2004 17:55:56 -0000      1.1.4.9 
> +++ loop-invariant.c    24 May 2004 21:24:38 -0000 
> @@ -303,7 +303,7 @@ 
>    for (i = 0; i < loop->num_nodes; i++) 
>      bitmap_set_bit (blocks, body[i]->index); 
>   
> -  df_analyze_subcfg (df, blocks, DF_UD_CHAIN | DF_HARD_REGS); 
> +  df_analyze_subcfg (df, blocks, DF_UD_CHAIN | DF_HARD_REGS | 
> DF_EQUIV_NOTES); 
>    BITMAP_XFREE (blocks); 
>  } 
>   
> I believe this is obvious.  Any problem? 

I believe this is OK.  Thanks for investigation.

Zdenek


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