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

Duncan Sands baldrick at free.fr
Thu Oct 14 13:19:45 PDT 2010


Hi, I haven't been following this thread so I'm a bit lost.

+/* Calls to __builtin_va_arg correspond to the VA_ARG_EXPR tree operator; we
+ * lower this to a call to the built-in function BUILT_IN_VA_ARG which is
+ * then lowered to the LLVM va_arg instruction. This call exists only
+ * transiently during gimplification. We hackishly store the va_arg macro's
+ * type argument in the tree.type field of the function call result.

Why lower VA_ARG_EXPR to the builtin - why not just keep VA_ARG_EXPR and teach
llvm-convert.cpp how to handle it?

Ciao,

Duncan.



More information about the llvm-commits mailing list