http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58253

--- Comment #8 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #7)
> Thanks I have posted the updated patch (which checks for
> gimple_register_type rather than non-BLKmode)

FWIW, it is possible to have a BLKmode struct passed in a register.
The compat testcases have a number of those.  Not sure if it's
possible to craft a testcase that also triggers this ipa path.

> Computing, storing and re-using the types would certainly be too
> invasive a change for stage 3.  Moreover, it would basically mean
> passing the PARM_DECL types as types of actual arguments and I am not
> even sure that it is correct, the back-end should probably see the
> actual arguments as exactly what they are in the callers.

The idea of a function is that there can be multiple callers, using
different actual arguments, thus you shoud pick one formal argument type
for each argument, and stick with it for all callers and the callee.
The formal argument type determines how the argument is passed.
Now, I understand that with ipa, you will often have only a single
caller, and the compiler can change the types with consideration of the
passed actual arguments to fit various optimization purposes, but
it still has to pick one list of formal parameters types for each specialized
callee, and stick to this list at the corresponding call site(s).

Reply via email to