This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix calls.c for a _complex type (PR ipa/80104).
- From: Jeff Law <law at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>, Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>, Martin Jambor <mjambor at suse dot cz>
- Date: Mon, 27 Mar 2017 12:15:10 -0600
- Subject: Re: [PATCH] Fix calls.c for a _complex type (PR ipa/80104).
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 63AA9C3A98
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 63AA9C3A98
- References: <5040cf25-9cfb-995c-2442-c4c705533733@suse.cz> <CAFiYyc1eSRJJUk+szY1T6DKs=ZphSc=ekMmb6ahYOvNy_3+6Bg@mail.gmail.com> <009b4260-0669-11cb-7152-d48e1b815fe7@suse.cz>
On 03/27/2017 05:40 AM, Martin Liška wrote:
Hello.
There's alternative approach suggested by Martin Jambor.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests and
s390x cross compiler does not ICE.
Martin
0001-Fix-calls.c-for-a-_complex-type-PR-ipa-80104.patch
From f9e40be62e525d29347339316073fae425b0d516 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 24 Mar 2017 15:47:34 +0100
Subject: [PATCH] Fix calls.c for a _complex type (PR ipa/80104).
gcc/ChangeLog:
2017-03-23 Martin Liska <mliska@suse.cz>
PR ipa/80104
* cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
thunk call as DECL_GIMPLE_REG_P when vector or complex type.
Can you fix the documentation for DECL_GIMPLE_REG_P to indiate that it
can be set on parameters.
In gimplify_function_tree we have this:
for (parm = DECL_ARGUMENTS (fndecl); parm ; parm = DECL_CHAIN (parm))
{
/* Preliminarily mark non-addressed complex variables as eligible
for promotion to gimple registers. We'll transform their uses
as we find them. */
if ((TREE_CODE (TREE_TYPE (parm)) == COMPLEX_TYPE
|| TREE_CODE (TREE_TYPE (parm)) == VECTOR_TYPE)
&& !TREE_THIS_VOLATILE (parm)
&& !needs_to_live_in_memory (parm))
DECL_GIMPLE_REG_P (parm) = 1;
}
Aren't you essentially doing the same thing for thunks? Does it make
sense to pull that into a little function and just call it from both places?
If not, do we need to add the !TREE_THIS_VOLATILE and
!needs_to_live_in_memory checks to the thunks version?
Generally OK, just want to work through these couple niggling details.
jeff