This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mem sharing fix [Re: Your flow.c change on 4/8]
- To: rearnsha at arm dot com
- Subject: Re: mem sharing fix [Re: Your flow.c change on 4/8]
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 20 Apr 2000 10:50:28 -0600
- cc: Richard Henderson <rth at cygnus dot com>, Rod Stewart <stewart at nexus dot carleton dot ca>, gcc-patches at gcc dot gnu dot org, Franz dot Sirl-kernel at lauterbach dot com
- Reply-To: law at cygnus dot com
In message <200004151129.MAA05279@cam-mail2.cambridge.arm.com>you write:
> Applied. I didn't supply an analysis and rationale last time. Here it is
> now ...
>
> Since addressof is shared across multiple rtx, replacing it can also
> replace any instances in the parameter list. If these shared instances
> then get manipulated (for example, by turning them into pre/post incs),
> then this can confuse later passes that need to refer back to the original
> parameters (for example debugging information dumpers). So we also need
> to re-unshare the parameter list.
>
> Having added that to the list of things to unshare, it now seems simpler
> (and certainly safer) to re-unshare everything by making
> unshare_all_rtl_again call unshare_all_rtl after clearing the used marks.
>
>
> Finally, here's a testcase (from cp/calls.c)
[ ... ]
Even though this is derived from GCC itself, it's a nice simple test, so I
added it to the testsuite.
Thanks for taking the time to produce a simple test for this bug.
jeff