This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: assign_parm_setup_block handling of parallels


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]