[llvm-dev] varargs, the x86, and clang

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 29 04:53:01 PDT 2015


On Mon, Sep 28, 2015 at 04:07:42PM -0700, Preston Briggs via llvm-dev wrote:
> I see LLVM that looks like it's been customized for the x86-64,
> versus the varargs stuff I was led to expect from the LLVM IR documentation.

This is not an optimisation, but based on the complexity of the ABI and
the limited functionality of the IR varargs support. While it tends to
work for the simple cases, passes of aggregates and unions is very
difficult to get right in many ABIs. Consider it the 80% solution -- it
makes it easy to interact with simple variadic functions or get the
common cases working for a new backend, but it often fails to handle all
the tricky cases.

Joerg


More information about the llvm-dev mailing list