This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR64164] drop copyrename, integrate into expand
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: Alan Lawrence <Alan dot Lawrence at arm dot com>, Jeff Law <law at redhat dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Christophe Lyon <christophe dot lyon at linaro dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Wed, 07 Oct 2015 19:36:42 -0300
- Subject: Re: [PR64164] drop copyrename, integrate into expand
- Authentication-results: sourceware.org; auth=none
- References: <orio9cw10j dot fsf at livre dot home> <CAFiYyc3k9xh_6RGbTdHYOJ-aEmUWVeFRoWy=YzCHFDNSdtTXCA at mail dot gmail dot com> <orwpxqvqnp dot fsf at livre dot home> <20150723203112 dot GB27818 at gate dot crashing dot org> <CAMe9rOpR+2gPxo0tKaRPtcML_Q4=r-_=9iqk+_JZFPkM=eN=BQ at mail dot gmail dot com> <CAMe9rOpbLEyDexVJqJAFJ3W6o4AktNog-jwk2CY4GZkrmT+nfA at mail dot gmail dot com> <or4mkmhgc9 dot fsf at livre dot home> <CAMe9rOp=S5fu1N=i7waswCYqJeLBCrySqYdFYkVa7LV04vpQSg at mail dot gmail dot com> <CAMe9rOrq+ZBAg1nZ1twEcPqwBj4j9+XA+SXQJVWWzjfdvidjtw at mail dot gmail dot com> <or1tfkdjhj dot fsf at livre dot home> <20150810082355 dot GA31149 at arm dot com> <55C8BFC3 dot 3030603 at redhat dot com> <CAKQMxzRzMrGtf921vqXCno5uoBN+uzsnJ5wX2Twmvhp1ziAEcA at mail dot gmail dot com> <or37zlpujd dot fsf at livre dot home> <55E72D4C dot 40705 at arm dot com> <orfv2wxygm dot fsf at livre dot home> <55FC3171 dot 7040509 at arm dot com> <ord1x8nblu dot fsf at livre dot home> <560A6B26 dot 7010701 at arm dot com>
On Sep 29, 2015, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> this commit
> commit 33cc9081157a8c90460e4c0bdda2ac461a3822cc
> Author: aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date: 2015-09-27 09:02:00 +0000
> revert to assign_parms assignments using default defs
> ...
> introduced a test failure on arm-none-eabi (using newlib, compiling
> with -mthumb -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard ):
> FAIL: gcc.target/arm/pr43920-2.c scan-assembler-times pop 2
Thanks for the report.
The problem here is that we don't allocate the pseudo assigned to
<retval> to r0. That's because we coalesce <retval> versions with
another variable that crosses a function call. We do that because
uncprop brings these unrelated variables, that happen to contain the
same -1 value we want to return, into the PHI node with the final
<retval> value.
We can't coalesce both start and end with <retval>, because start and
end conflict, but by chance we try start first, and that succeeds. If
we tried end first (e.g., by giving it a higher coalesce priority,
because fewer calls are crossed by its value in the path to the relevant
edge), we could have got the coalesced variable assigned to r0, and that
would enable us to optimize out the copy to r0 before return, and so
merge the return-only basic block with other blocks. But ATM we don't
take the definition point or path to the edge into account when
computing coalesce costs, so we can't deterministically do better for
this testcase, and I'm not sure using these additional information would
make it better overall.
Compiling with -fno-tree-dominator-opts skips uncprop so that we don't
even try to coalesce other variables with <retval>, so we get the code
expected by the testcase. But we obviously don't want to disable this
optimization in general.
Any other thoughts, anyone?
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer