This is the mail archive of the gcc@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: Bug with copyprop_hardreg_forward and shared RTX



Richard Henderson wrote:

>I guess we could run an unshare_all_rtl_again pass after reload is
>done...

The following patch fixes my test case, and passes bootstrap and
regression tests on s390-ibm-linux and s390x-ibm-linux (done on
the 3.1 branch).

OK to check it in to the branch and the trunk?

ChangeLog:

     * gcc/reload1.c (reload): Unshare all rtl after reload is done.


Index: gcc/reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.325
diff -c -p -r1.325 reload1.c
*** reload1.c  2002/02/19 02:53:11 1.325
--- reload1.c  2002/03/06 20:23:19
*************** reload (first, global)
*** 1278,1283 ****
--- 1278,1288 ----
    unused_insn_chains = 0;
    fixup_abnormal_edges ();

+   /* Replacing pseudos with their memory equivalents might have
+      created shared rtx.  Subsequent passes would get confused
+      by this, so unshare everything here.  */
+   unshare_all_rtl_again (first);
+
    return failure;
  }


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


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