[llvm-commits] PATCH: llvm-gcc option to emit "va_arg" instruction

Duncan Sands baldrick at free.fr
Sat Oct 16 05:15:06 PDT 2010


Hi David,

> The code was written by someone with a deeper understanding of gcc than myself,
> so I can't give an entirely perfect answer, but...
>
> I believe that VA_ARG_EXPR is only supposed to exist in the intermediate
> representation. It is expected to be lowered during gimplification. For example,
> in expand_expr(), there is an assertion if VA_ARG_EXPR is seen in the gimplified
> tree.

I think you are confusing the gimplifier with gimple to RTL expansion.  The
gimplifier supports VA_ARG_EXPR, as can be seen in gimplify.c.  When building
with LLVM support, expansion to RTL does not occur so expand_expr should never
be called, so the fact that the RTL expansion logic doesn't handle VA_ARG_EXPR
should not be relevant.

Ciao,

Duncan.



More information about the llvm-commits mailing list