[LLVMdev] Problems with optimizations and va_arg intrinsic

Tim Northover t.p.northover at gmail.com
Thu Dec 19 23:59:58 PST 2013


Hi Rinaldini,

> I know that clang is *not* relying on the va_arg intrinsic, but implements itself this set of function, hence my question: is the va_arg intrinsic
> something we can trust to work with, or not?

Probably not, Someone seems to have made an attempt to get something
working in the x86 backend, but unfortunately it doesn't have all the
information needed to obey the ABI properly (e.g. for over-aligned
struct types, LLVM just doesn't know that the type itself is
over-aligned). I certainly wouldn't want to rely on it.

Cheers.

Tim.



More information about the llvm-dev mailing list