[llvm-commits] [patch] Fix va_arg for double and some cleanups

Dan Gohman gohman at apple.com
Thu Jul 8 18:11:26 PDT 2010


On Jul 8, 2010, at 10:35 AM, Rafael Espindola wrote:

> On 8 July 2010 13:20, Dan Gohman <gohman at apple.com> wrote:
>> getTransientStackAlignment does not seem the right tool here.  You want to
>> know how arguments in memory for varargs are aligned, not how the stack
>> pointer itself is aligned.
> 
> No, I what to know the stack alignment. The VAARG node already contain
> by how much the argument is aligned. The question we are trying to
> answer is "Is this argument more alignment that what we know the stack
> already is?". Knowing that we can insert alignment instructions only
> when necessary.

But it's not the stack pointer itself that you care about here, it's the
alignment of whatever the prior argument was. So you really want to know
"What's the least alignment of any argument?" That's why I thought
getCallFrameTypeAlignment would work. If it's not returning the right
value, that may be a bug.

Dan




More information about the llvm-commits mailing list