This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR82991
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Nov 2017 11:59:00 +0100
- Subject: Re: [PATCH] Fix PR82991
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1711221139410.12252@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote:
>
> I am testing the following (old) patch to value number call lhs
> according to the ERF_RETURNS_ARG annotation. This allows for
> more expression simplification and also changes downstream
> users of the argument to use the return value which should help
> register allocation and register lifetime in general.
If the argument is an SSA_NAME then that is generally a win, but won't
it also replace if the argument is say ADDR_EXPR of a VAR_DECL or similar?
If we only later (say some later forwprop) determine the argument is
gimple_min_invariant, shouldn't we have something that will effectively
undo this (i.e. replace the uses of the function result with whatever
we've simplified the argument to)?
Jakub