[LLVMdev] LLVM Newb: Getting started

Wolfgang Draxinger Wolfgang.Draxinger at darkstargames.de
Thu Nov 23 10:47:06 PST 2006


A few days ago Craig Black made the suggestion in the D newsgroup, 
that someone creates a D <http://www.digitalmars.com/d/index.html> 
frontend for LLVM. Never having heard of LLVM in the past, I 
immediately got captured by its design when I've read the 
documentation. I was always scared by GCC - a great piece of 
software, but horribly bad documented, and in it's own way not very 
KISS.

Since I'm currently working on a clean ABI draft for D I thought, that 
implementing a D frontend for LLVM would also be a good test case for 
my ABI drafts and so I agreed to implement that frontend.

Today I've built LLVM from source (however not the GCC frontend yet) 
and played a bit with the assembly language, and it brought up the 
following questions:

* How can I define parts of the ABI that cover calling conventions?

* Which is the LLVM way of creating object files?
From what I've tried out yet, the llvm-ld will generate a executable. 
llc produces target specific assembly; there is an option to output 
object files, but this crashes on my system.

* Which is the best way to add support for new object file types. One 
thing that a lot of people in the D community anticipate is the 
possibility to compile modules into self contained objects, which can 
be redistributed without additional header files, and be linked 
either statically or dynamically into the final program. Kinda like 
Pascal units. This of course requires to put additional information 
into the created binary. And I'd like to try, to let the thing to 
create CLI binaries 
<http://www.ecma-international.org/publications/standards/Ecma-335.htm>.

And last but not least: Which parts of the documentation must I 
definitely read in the first place to get started to hack LLVM (I'll 
read all of course, but I'd like to focus right now).

-- 
Wolfgang Draxinger
lead programmer - DARKSTARgames

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20061123/81e21638/attachment.sig>


More information about the llvm-dev mailing list