discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LLVM


From: David Chisnall
Subject: Re: LLVM
Date: Sat, 1 Mar 2008 11:34:44 +0000

This post is from Chris Lattner, LLVM lead developer and now head of Apple's LLVM team. The compiler he is talking about is gcc-llvm, which uses the scanner and parser from GCC and the code generation from LLVM.

For various reasons (licensing, ability to use the code in other projects, compilation speed, NIH), Apple have since started the clang project, which aims to produce a C/C++/Objective-C scanner and parser. This is then transformed into an AST which is transformed into LLVM IR, which can then be compiled to native code (or interpreted). The current status of clang is that C parsing and code generation is pretty much finished, as is Objective-C parsing. I have started working on code generation for Objective-C, and there are other people working on C++.

For me, the big advantage of LLVM is made obvious by the way in which the GSLS implementation on OS X works. To implement a Smalltalk compiler on LLVM and an Objective-C runtime you would need a Smalltalk parser (trivial), something that generates LLVM IR message sends (I've already written this for the GNU runtime) and an Objective-C implementation of a few core classes, like BlockClosure. You then get something like StepTalk but compiled to native speed with runtime optimisations in significantly less code (and can add languages like Self or Io fairly easily). Note that these would be first-class GNUstep development languages, not simply scripting languages. For this reason, I am keeping the runtime-specific bits of the code generation free of clang-specific code. They only use pure LLVM constructs and so can be easily reused elsewhere.

David

On 1 Mar 2008, at 08:03, hns@computer.org wrote:

As usual, world isn't white or black:

There was/is a proposal to integrate LLVM into gcc and this message
also addresses some of the licence issues.

http://gcc.gnu.org/ml/gcc/2005-11/msg00888.html

He reports a LLVM based compiler that is command-line compatible to
gcc. I don't know anything about the status though.

Nikolaus
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep





reply via email to

[Prev in Thread] Current Thread [Next in Thread]