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

Rafael Espindola espindola at google.com
Tue Oct 12 08:14:05 PDT 2010


> Hi David,
> I haven't looked at the patch, but I'm not in favor of this.  Having
> llvm-gcc generate the va_arg instruction (on targets where it works) is
> goodness, but we shouldn't add a user-visible knob for it.  We should just
> *always* generate it on those targets.

Right now the va_arg implementation have some inefficiencies. For
example, on ARM each va_arg will result in an increment to the
pointer, instead of having it being accumulated in one larger add. On
the other hand, having va_arg opens the possibility for more
optimizations (see README-x86-64.txt). When would you think it is a
good time to switch the FE to generating va_arg?

> -Chris

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the llvm-commits mailing list