This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug with copyprop_hardreg_forward and shared RTX
- From: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Mar 2002 23:14:39 +0100
- Subject: 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