LWN.net Logo

The Design of LLVM (Dr. Dobb's)

The Design of LLVM (Dr. Dobb's)

Posted May 30, 2012 21:52 UTC (Wed) by daglwn (subscriber, #65432)
In reply to: The Design of LLVM (Dr. Dobb's) by wahern
Parent article: The Design of LLVM (Dr. Dobb's)

This is exactly right. LLVM's use of a fully descriptive IR, ability to write that IR out to files and process it via piped commands is nothing new. This has been done in the research environment for a couple of decades, at least.

LLVM is well-designed, no doubt, and its modular nature helps tremendously when putting a project together. But it is not the first modular compiler nor the first to put compiler components into libraries.

LLVM is certainly not perfect. I would change quite a bit of the software engineering, actually. But overall, it is the most useful open source compiler tool set out there.


(Log in to post comments)

The Design of LLVM (Dr. Dobb's)

Posted May 31, 2012 4:00 UTC (Thu) by rsidd (subscriber, #2582) [Link]

I would change quite a bit of the software engineering, actually.

So might Lattner if he were starting from scratch. But clearly they got a lot right, and now the benefits of fundamental changes are probably not worth the pain. There is a difference between a research compiler and a compiler that is used by several production platforms and dozens of serious projects. LLVM may not be the first modular compiler but it is the first to have a real-world impact.

The Design of LLVM (Dr. Dobb's)

Posted May 31, 2012 14:31 UTC (Thu) by daglwn (subscriber, #65432) [Link]

> So might Lattner if he were starting from scratch.

Some, yes, but not much as he has been asked about it before.

The leadership has no problem completely replacing or removing APIs so stability is not a problem. Users simply have to bear the pain. Pain does not seem to be a concern of the project. And that's fine. I completely understand why they choose to operate that way. I wouldn't want to be locked into a set of APIs either.

Certainly they did get a lot right. As for real-world impact, I suspect that something like MSVC is pretty modular and that Microsoft uses that to its advantage in Visual Studio. Of course we can't prove that.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds