Intro to the architecture of LLVM

Sharing a link to a presentation I gave recently on the basics of
working with LLVM:

I have an extended+modified version of this talk I'm preparing for
LLVM dev conf.

Hi Nick,

Sorry for the late reply. Here are some thoughts that may be useful to you:

  1. You might want to see if there’s any overlap with previous similar talks. I think there may be some with these two:

In the same spirit, at the end it would be good if you put other similar talks that people can watch tii. Apart from the
two already mentioned, also:

You might think that the last 3-4 are maybe too specific but actually the DS, Address Spaces and Scalar Evolution are almost
everywhere (the DS are truly everywhere). And register allocation is considered by a lot the most important
optimization. The ones that don’t agree with that, probably think that inlining is the most important. But sadly
we don’t have a tutorial that explains LLVM’s inlining.

Finally, note that even having a single slide with these is helpful because I remember myself as a beginner. I found
those after a lot of time searching and some of them by luck. It would be good to have a slide “Start with these”.

  1. Around 25:06: You can mention Polly’s file:
    For the Clang part, you can get even less stuff in the emitted IR with this: clang -c -S -emit-llvm -g0 -Xclang -disable-O0-optnone

  2. In the example that you show on the video, we can’t actually use memcpy(). It’s nitpicking and maybe you actually
    mentioned it and I missed it but we can’t because mempcy() copies only one byte across a buffer. It can’t copy
    e.g. an int that is 4 bytes.

  3. Regarding Canonical Loop Forms in LLVM: There are really more than one loop canonical forms in LLVM
    but if we had to say there is one, I guess that would be the Loop Simplify Form. You can read more
    about loop forms and generally loops in the loop terminology:
    (You can also tell me if there’s something unclear there because I would be one of the first candidates to fix it :slight_smile: ).


Στις Τρί, 11 Αυγ 2020 στις 11:53 μ.μ., ο/η Nick Desaulniers via llvm-dev <> έγραψε: