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 <mli...@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 <mli...@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