[LLVMdev] builtin_apply?

Chris Lattner clattner at apple.com
Thu Oct 17 04:15:30 PDT 2013


On Oct 16, 2013, at 2:34 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:

> The __builtin_va_arg_pack() and __builtin_va_arg_pack_len() builtins are useful in this context and, unlike __builtin_apply(), are possible to implement correctly in the general case.  I believe that some GNU system headers use them when they are available, so they are probably worth supporting.
> 
> I'd love to see __builtin_apply() implemented and working properly too, but on most architectures / ABIs it's possible to implement it in such a way that it works except for some corner cases and on others it's impossible to implement correctly at all.  Code that uses it is either non-portable or just plain broken currently, and that's not something I'd like to see clang encourage.

I don't think we'd say "no" to a (well implemented) version of this, so long as it is localized and doesn't cause widespread increase in complexity in the compiler.  Specifically, I wouldn't want to see an IR change to support it.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131017/3f254d9a/attachment.html>


More information about the llvm-dev mailing list