[llvm-dev] Intro to the architecture of LLVM

Stefanos Baziotis via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 31 14:17:12 PDT 2020

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:
- Introduction to LLVM:  https://www.youtube.com/watch?v=J5xExRGaIIY
- Introduction to Clang:  https://www.youtube.com/watch?v=5kkMpJpIGYU

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:
- The Clang AST Tutorial:  https://www.youtube.com/watch?v=VqCkCDFLSsc
- LLVM IR Tutorial:  https://www.youtube.com/watch?v=m8G_S5LwlTo
-  Writing an LLVM Pass 101: https://www.youtube.com/watch?v=ar7cJl2aBuU
  This is for the new pass manager, one can also see the doc for the old
one:  https://llvm.org/docs/WritingAnLLVMPass.html
- Getting Started with LLVM: Basics:
- How to Contribute to LLVM:  https://www.youtube.com/watch?v=C5Y977rLqpw
- LLVM: A Modern, Open C++ Toolchain:
- Understanding Compiler Optimization:
- Hybrid Data Structures:  https://www.youtube.com/watch?v=vElZc6zSIXM
a lot about LLVM's internal DS)
... (here basically you can just say: "Any talk by Chandler Carruth" :p )
- Register Allocation: More than Coloring:
- Address Spaces in LLVM:  https://www.youtube.com/watch?v=Oj1BNoL1jpM
- Scalar Evolution - Demystified:

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".

2) Around 25:06: You can mention Polly's create_ll.sh 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

3) 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.

4) 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 :) ).


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

> Sharing a link to a presentation I gave recently on the basics of
> working with LLVM: https://youtu.be/bUTXhcf_aNc.
> I have an extended+modified version of this talk I'm preparing for
> LLVM dev conf.
> --
> Thanks,
> ~Nick Desaulniers
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200901/37c43224/attachment.html>

More information about the llvm-dev mailing list