This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: assign_parm_setup_block handling of parallels
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc at gcc dot gnu dot org,Richard Henderson <rth at redhat dot com>,dje at watson dot ibm dot com
- Date: Tue, 11 Jan 2005 19:48:50 +0100
- Subject: Re: assign_parm_setup_block handling of parallels
- References: <20041223202824.GA8247@redhat.com> <200412232328.55916.ebotcazou@libertysurf.fr> <20050110234232.GA3369@redhat.com>
> First, some background. I'm attaching my testcase. As you can see,
> nominal_mode (SFmode) != passed_mode (DFmode).
>
> The multi-member optimization will nicely translate this:
>
> (parallel:DF (expr_list (reg:DI 3)))
>
> into
>
> (reg:DI 3) -> pseudoDI -> subreg:DF(pseudoDI) -> float_truncate:SF(DF)
>
> which is exactly what we want, and gets flattened and joined back into
> the appropriate registers.
I see, thanks for the explanation. So this would avoid going through the
stack altogether?
> In the multi-member parallel optimization, we already check for
> incompatability between nominal_mode and passed_mode, and do the conversion
> appropriately.
You added this code, right?
> Although I think we should do the conversion in this case as well, I
> believe we will generate better code if we allow the multi-member
> parallel optimization.
Agreed. Then the problem boils down to devising the best predicate. I think
the right criterion is that the optimization should avoid using the stack,
because in this case it can only do a worse job than the rest of the code in
assign_parm_setup_block (that was the pessimization on SPARC 64-bit). Of
course that's probably not very easy to write.
--
Eric Botcazou