On 12/03/13 09:53, Martin Jambor wrote:
Hi,

the patch below fixes a failure on the epiphany target where callers
and callees do not agree on registers for parameter passing because
they see different alignment of actual arguments and formal parameters
(there is some more information on this in bugzilla).  The actual
arguments are SSA names - created by force_gimple_operand_gsi in
ipa_modify_call_arguments - which are of a naturally aligned type
while formal parameters are PARM_DECLs - directly built in
ipa_modify_formal_parameters - of the types specified in
ipa_parm_adjustment_vec which may not be aligned.

Because we use the alignment of types in ipa_parm_adjustment_vec to
signal to ipa_modify_call_arguments that it needs to built unaligned
MEM_REFs, it is ipa_modify_formal_parameters that has to fix up the
PARM_DECLs in cases where callers will produce SSA_NAMES, i.e. when
the type is a gimple_register_type.  That's what the patch below
does.

Bootstrapped and tested on x86_64-linux, only a slightly different
patch also passed bootstrap on ppc64-linux and has been confirmed to
fix the problem on epiphany.  OK for trunk?

Thanks,

Martin


2013-11-28  Martin Jambor  <mjam...@suse.cz>

        PR ipa/58253
        * ipa-prop.c (ipa_modify_formal_parameters): Create decls of
        non-BLKmode in their naturally aligned type.
OK for the trunk.
jeff

Reply via email to