PATCH: PR target/40838: gcc shouldn't assume that the stack is aligned

Ian Lance Taylor iant@google.com
Mon Oct 19 17:08:00 GMT 2009


"H.J. Lu" <hjl.tools@gmail.com> writes:

> Vectorizer may not call assign_*_temp at all. Instead, x86 backend
> may call gen_reg_rtx to generate pseudo registers when expanding
> vector statement.

It simply does not make sense to change the vectorizer, of all things,
to set the stack alignment.  Stack alignment depends upon the
types/modes of automatic variables stored on the stack.  Therefore,
you should set the required stack alignment based on the creation of
automatic variables.  Ideally you would set the required stack
alignment for automatic variables stored on the stack, but apparently
you can't change the stack alignment after expand (though I don't see
why not).  So if you can't set the stack alignment based on automatic
variables stored on the stack, then you should set it based on the
creation of automatic variables.

Ian



More information about the Gcc-patches mailing list