[PATCH] Don't Promote Args for Variadic Functions
rnk at google.com
Mon Aug 25 15:17:12 PDT 2014
>>! In D5055#9, @tjablin wrote:
> I think the answer is 'no' as long as LLVM handles variadic args the way it
> currently does. Currently, the fits_in_gp predicate is computed based on
> assumptions about the size of arguments on the stack. Anything that could
> change that will break variadic functions.
I don't think this is entirely accurate. Each va_arg expansion from Clang should be completely independent, and so far as I can tell doesn't encode any information about how many non-variadic parameters there were. It *does* encode information about the AST-level type, which is what is breaking this test case of 5 pointers plus one 2 x i64 struct.
More information about the llvm-commits