[LLVMdev] How to represent __attribute__((fastcall)) functions in the IL

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 19 09:27:37 PDT 2012

> Don't get me wrong, I don't have any good ideas about how to do this, I'm
> just hoping someone does. End result might allow something like:
> declare void @foo(double inreg <eax,edx> %x)

Not sure I would go all the way to specifying registers in the IL
(although I liked it at some point). What I like most right now is
something along the lines of
http://llvm.org/pr12193. That makes it explicit if something is on the
stack or in registers and that information is correct for both the
caller and callee. What is left for codegen is counting the  register
arguments and computing stack offsets.

Implementing that requires way more time than I have right now, but I
think this proposal is a small step in the right direction as it makes
clang the one responsible for marking an argument as memory or


More information about the llvm-dev mailing list