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: rtl-optimization/34408


On Feb 17, 2008 8:30 PM, Jan Hubicka <jh@suse.cz> wrote:
> Hi,
> This patch fixes invalid sharing reported in the PR.  I've
> bootstrapped/regtested it on i686-linux but it is not that good test
> given that the pass is not enabled ;)

Given that SEE is broken anyway this is ok.

Richard.

> Honza
>
> int isLegalIdChar (char);
> char get();
>
> char z;
>
> void  FillBuffer ( void )
> {
>  char c;
>  while(1)
>  {
>    c = get();
>    if (!isLegalIdChar(c))
>      break;
>    z = c;
>  }
> }
>         PR rtl-optimization/34408
>         see.c (see_def_extension_not_merged): Copy subreg so we don't have invalid sharing.
> Index: see.c
> ===================================================================
> *** see.c       (revision 132380)
> --- see.c       (working copy)
> *************** see_def_extension_not_merged (struct see
> *** 2508,2514 ****
>     d.to = new_pseudo_reg;
>     note_uses (&PATTERN (ref_copy), see_replace_src, &d);
>     /* Step b: Replace every instance of dest_reg with the subreg.  */
> !   ref_copy = replace_rtx (ref_copy, dest_reg, subreg);
>
>     /* Step c: Replace every use of the new pseudo register back to
>        dest_real_reg.  */
> --- 2508,2514 ----
>     d.to = new_pseudo_reg;
>     note_uses (&PATTERN (ref_copy), see_replace_src, &d);
>     /* Step b: Replace every instance of dest_reg with the subreg.  */
> !   ref_copy = replace_rtx (ref_copy, dest_reg, copy_rtx (subreg));
>
>     /* Step c: Replace every use of the new pseudo register back to
>        dest_real_reg.  */
>


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