[LLVMdev] Some question on LLVM design
Marc Ordinas i Llopis
lists at tragnarion.com
Mon Oct 25 05:18:16 PDT 2004
Misha Brukman wrote:
>
>>1. Opcodes and intrinsics
>>
> That's not really correct. The intrinsics such as llvm.frameaddress and
> llvm.returnaddress have no equivalents in LLVM opcodes -- the meaning of
> the intrinsics is specifically machine-dependent, and LLVM (and its
> opcodes) are machine-independent, so there is no valid interchange of
> these intrinsics with any combination of LLVM opcodes.
>
Yes, I understand that those intrinsics are mapped differently on
different machines, but isn't 'add' mapped differently too?
It seems to me that those intrinsics are there to support the GNU C
extensions, making them a 'language feature' of sorts. That's why they
are intrinsics and not opcodes.
>>3. Control transfer
>>
> LLVM has the 'call' instruction that abstracts the target machine's
> calling convention. See http://llvm.cs.uiuc.edu/docs/LangRef.html#i_call
> for more information.
>
Yes, it abstracts the target's C calling convention. But I'm trying to
see if other types of languages can be implemented using LLVM.
> What is that you are looking to express that isn't captured by the
> `call' instruction?
>
Tail calls, closures, continuations, lazy allocation... Basically I'm
trying to see how am I going to implement high-level functions on LLVM.
> Hope that helps,
Certainly, thanks!
Marc Ordinas i Llopis | Tragnarion Studios
More information about the llvm-dev
mailing list