[llvm-dev] LLVM Newbie

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 25 14:36:13 PDT 2016

On 25 April 2016 at 22:00, Wolfgang McSneed via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi,
> I am trying to write my own backend using LLVM and I downloaded the support
> files from the book titled "LLVM Cookbook" for the "Toy" architecture
> described in the book.
> I made the changes described in the book to register the TOY architecture
> but am seeing compile errors. I am not sure if I set this up correctly. The
> code that I am compiling for the backend was downloaded from the publisher
> and should be tested? (I think they used 3.5 whereas I am using 3.8.0)

Yeah, that book is old enough and the content, mainly based on current
code, doesn't age well. :)

However, it should still contain the general ideas, but you'll have to
dig the code more deeper than you would a few years ago.

You could try the official document:


or an old but very thorough experiment (probably same age as the book):


Or this tutorial:


Or, as Bruce said, you could use 3.5.

A good rule of thumb is, if you're serious about LLVM, grab ToT and
suffer the initial impact. It's not that big. If, OTOH, this is just
for fun, or a side project, use and old but sure version, and spend
more time on the core of your project.


More information about the llvm-dev mailing list