This is the mail archive of the gcc-patches@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: PATCH: PR target/40838: gcc shouldn't assume that the stack is aligned


On Mon, Oct 19, 2009 at 10:05 AM, Ian Lance Taylor <iant@google.com> wrote:
> "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.
>

It is about setting the incoming stack alignment, which has to be
done before RTL expansion. Vectorizer may not use any automatic
variables. But the RTL expander may generate pseudo vector registers
based on vector statement, at which time, it is too late to go back to
change incoming stack alignment.  I only modified vectorizer to
record what it does. I didn't change any statements generated by
vectorizer. The x86 backend uses this information to set the
incoming stack alignment before RTL expansion.


-- 
H.J.


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