> I do think so.
Huh? What do your version and mine return for the following assignment?
void foo (int i)
{
struct S s;
s.a = i;
}
> Which in the following example makes i = *p not likely eliminated
> but makes j = *q likely eliminated.
>
> void foo (int *p, struct X *q)
> {
> int i;
> struct X j;
> i = *p;
> j = *q;
> bar (&i, &q);
> }
>
> That doesn't make sense.
Yet that's what's supposed to be implemented, see the comment: "loads from
parameters passed by reference".
> What makes sense is that all scalar (thus gimple_reg_typed)
> loads/stores to/from parameters or the result are free.
Precisely not, they aren't free, otherwise they wouldn't exist in the first
place. Scalar loads/stores are never free, aggregate loads/stores may be
free if they are created only to pass the object around.
--
Eric Botcazou