www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - alternative D frontends should have a LLVM backend

reply BLS <nanali nospam-wanadoo.fr> writes:
LLVM advantages are well known, but IMO alternative D Frontends like DIL 
should have a LLVM backend because this will open us a backdoor to DOT 
NET via MSIL
Quote :
LLVM now has a new MSIL backend. llc -march=msil will now turn LLVM into 
MSIL (".net") bytecode. This is still fairly early development with a 
number of limitations.
End Quote
Problems? Yes indeed ...
http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-March/008244.html

Your opinion ?

Bjoern
Oct 29 2007
next sibling parent Christopher Wright <dhasenan gmail.com> writes:
BLS wrote:
 LLVM advantages are well known, but IMO alternative D Frontends like DIL 
 should have a LLVM backend because this will open us a backdoor to DOT 
 NET via MSIL
 Quote :
 LLVM now has a new MSIL backend. llc -march=msil will now turn LLVM into 
 MSIL (".net") bytecode. This is still fairly early development with a 
 number of limitations.
 End Quote
 Problems? Yes indeed ...
 http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-March/008244.html
 
 Your opinion ?
 
 Bjoern
Unless you get your kicks from generating native RISC machine code, it's sensible. Though you still have to generate LLVM assembly, correct? I didn't see any higher-level means of interacting with LLVM. Granted, LLVM assembly is high level.
Oct 29 2007
prev sibling next sibling parent Tomas Lindquist Olsen <tomas famolsen.dk> writes:
You could take a look at my LLVMDC compiler.

http://www.dsource.org/projects/llvmdc

It's not yet a complete D 1.0 compiler, but it's getting there. I 
usually check in bugfixes etc. (mostly) every day.
I'm not sure if there are any limitations to what the bitcode should 
look like when used with the MSIL backend, but probably it's doable.

And of course... Any help is much appreciated.

-Tomas Lindquist Olsen
Oct 29 2007
prev sibling next sibling parent Clay Smith <clayasaurus gmail.com> writes:
BLS wrote:
 LLVM advantages are well known, but IMO alternative D Frontends like DIL 
 should have a LLVM backend because this will open us a backdoor to DOT 
 NET via MSIL
 Quote :
 LLVM now has a new MSIL backend. llc -march=msil will now turn LLVM into 
 MSIL (".net") bytecode. This is still fairly early development with a 
 number of limitations.
 End Quote
 Problems? Yes indeed ...
 http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-March/008244.html
 
 Your opinion ?
 
 Bjoern
http://www.dsource.org/projects/llvmdc Check it out.
Oct 29 2007
prev sibling parent reply 0ffh <spam frankhirsch.net> writes:
BLS wrote:
 LLVM advantages are well known, but IMO alternative D Frontends like DIL 
 should have a LLVM backend because this will open us a backdoor to DOT 
 NET via MSIL
I don't really know. Whenever I need to generate code, I go via C because it supports every architecture I could ever need (or in fact think of). For a D backend the LLVM might have it's advantages, but I really can't think of any. How is generating LLVM better than generating C source? Regards, Frank
Oct 29 2007
parent reply Clay Smith <clayasaurus gmail.com> writes:
0ffh wrote:
 BLS wrote:
 LLVM advantages are well known, but IMO alternative D Frontends like 
 DIL should have a LLVM backend because this will open us a backdoor to 
 DOT NET via MSIL
I don't really know. Whenever I need to generate code, I go via C because it supports every architecture I could ever need (or in fact think of). For a D backend the LLVM might have it's advantages, but I really can't think of any. How is generating LLVM better than generating C source? Regards, Frank
I looked at the LLVM features page, and it says... "A C back-end useful for testing and for generating native code on targets other than the ones listed above." So, LLVM can generate C code, and it can do more. I suppose that's why it is better.
Oct 30 2007
parent 0ffh <spam frankhirsch.net> writes:
Clay Smith wrote:
 0ffh wrote:
 I don't really know. Whenever I need to generate code, I go via C because
 it supports every architecture I could ever need (or in fact think of).
 For a D backend the LLVM might have it's advantages, but I really can't
 think of any. How is generating LLVM better than generating C source?
"A C back-end useful for testing and for generating native code on targets other than the ones listed above." So, LLVM can generate C code, and it can do more. I suppose that's why it is better.
Well, but there is also a C compiler with LLVM backend. So if you really want LLVM code, you can generate it from the C code... Regards, Frank
Oct 30 2007