IT lexicon › Programming › fastcc

fastcc

Programming På svenska → Updated: 2026-11-07

LLVM's internal calling convention with no ABI promises, which the compiler may shape freely as long as both caller and callee belong to it.

An externally visible function has to follow the platform ABI, because anyone might call it. An internal function whose address is never taken has only callers the compiler can see, so the convention is up for grabs. LLVM's GlobalOpt does exactly that and marks such functions fastcc. On 32-bit x86 that moves arguments from the stack into registers.

The other point is tail calls. With -tailcallopt, fastcc guarantees that a call in tail position becomes a jump, even when caller and callee take different numbers of stack arguments — something functional languages compiled through LLVM depend on. That guarantee later got a convention of its own, tailcc. Since the layout can change between releases, fastcc must never cross a library boundary.

← Back to the lexicon