This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use DECL_ARG_TYPE for argument types in fnsplitting (PR tree-optimization/47148)
On Sun, Jan 02, 2011 at 06:43:34PM +0100, Richard Guenther wrote:
> Ick ... I don't like
>
> > + ? ? ? arg = gimple_default_def (cfun, parm);
> > + ? ? ? if (!useless_type_conversion_p (DECL_ARG_TYPE (parm), TREE_TYPE (arg))
> > + ? ? ? ? ? && fold_convertible_p (DECL_ARG_TYPE (parm), arg))
>
> this check. Can we instead not do function splitting here? And maybe
You're worried just about the fold_convertible_p check, right?
If the conversion is useless, there is no point to add it.
It was added there just in case, I guess it could be an gcc_checking_assert
too, or such test could be moved to execute_split_function. split_function
is already meant to be executed when we are committed to do the splitting.
> fix the x86 backend as well for a start?
x86_64? Maybe. I don't think we want to touch i?86 ABI (where the test
fails too), haven't tried other targets to see where else it fails as well.
I think DECL_ARG_TYPE isn't a target thing, it is something the FE decided
and the middle-end should honor it. So it isn't something that should
be controlled by a target hook.
Jakub