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: Richard Biener <richard dot guenther at gmail dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Jeff Law <law at redhat 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, 10 Jun 2015 15:26:00 +0200
- Subject: Re: [PR64164] drop copyrename, integrate into expand
- Authentication-results: sourceware.org; auth=none
- References: <orvbhmz59m dot fsf at livre dot home> <orego9x6zw dot fsf at livre dot home> <551A2C7C dot 8060005 at redhat dot com> <orvbhdz6yy dot fsf at livre dot home> <5522AF73 dot 5000706 at redhat dot com> <or1tjajnl8 dot fsf at livre dot home> <CAFiYyc0Map6+zB1Cp89Njm5kAFBK2ibroxzPSLdUs2v=BM46iw at mail dot gmail dot com> <orpp59bpui dot fsf at livre dot home> <orwpzcv2a2 dot fsf at livre dot home>
On Wed, Jun 10, 2015 at 2:24 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> On Jun 5, 2015, Alexandre Oliva <aoliva@redhat.com> wrote:
>
>> On Apr 27, 2015, Richard Biener <richard.guenther@gmail.com> wrote:
>
>>>> +/* Return the promoted mode for name. If it is a named SSA_NAME, it
>>>> + is the same as promote_decl_mode. Otherwise, it is the promoted
>>>> + mode of a temp decl of same type as the SSA_NAME, if we had created
>>>> + one. */
>>>> +
>>>> +machine_mode
>>>> +promote_ssa_mode (const_tree name, int *punsignedp)
>>>> +{
>>>> + gcc_assert (TREE_CODE (name) == SSA_NAME);
>>>> +
>>>> + if (SSA_NAME_VAR (name))
>>>> + return promote_decl_mode (SSA_NAME_VAR (name), punsignedp);
>
>>> As above I'd rather not have different paths for anonymous vs. non-anonymous
>>> vars (so just delete the above two lines).
>
>> Check
>
> This caused the sparc regression reported by Eric in
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64164#c37
>
> We need to match the mode of the rtl created for the partition and the
> promoted mode expected for the parm. I recall working to make parm and
> result decls the partition leaders, so that promote_ssa_mode would DTRT,
> but this escaped my mind when revisiting the patch after some time on
> another project.
>
> So we either restore promote_ssa_mode's check for an underlying decl, at
> least for PARM_ and RESULT_DECLs, or further massage function.c to deal
> with the mode difference. Any preference?
Alternatively not coalesce SSA names when promote_decl_mode gives
different answers (for their underlying decl)? It sounds wrong to do that
(if that is really what happens).
Richard.
> I'm reverting the patch for now, so that we don't have to rush to a fix
> on this, and I can have more time to test and fix other arches. It was
> a terrible mistake to not do so before submitting the final version of
> the patch, or at least before installing it. I apologize for that.
>
> --
> 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