[llvm-dev] A beginner's tutorial about LLVM IR

387 views
Skip to first unread message

Sudakshina Dutta via llvm-dev

unread,
Feb 22, 2021, 6:23:39 AM2/22/21
to LLVM Development List
Dear all,

I am a professor who wants my students to write a very simple compiler using LLVM. The students will have their own frontends. They will generate machine code after converting their codes to LLVM IR. I just want them to have the basic understanding of LLVM IR. Which tutorial will be best to learn the basics of LLVM IR ? I understand that the documentation in the link https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html is the best document; however, I also understand that this is very elaborate for a beginner to LLVM.

Thanks,
Sudakshina

Stefanos Baziotis via llvm-dev

unread,
Feb 22, 2021, 7:28:06 AM2/22/21
to Sudakshina Dutta, LLVM Development List
Hi Sudakshina,

Here's a tutorial that I think will be helpful: https://www.youtube.com/watch?v=m8G_S5LwlTo

Best,
Stefanos

_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Shivam Gupta via llvm-dev

unread,
Feb 22, 2021, 8:29:08 AM2/22/21
to Sudakshina Dutta, llvm-dev
Hello,

It would be very helpful if in the learning process a few of your interested students update the OCaml Kaleidoscope.  It is similar to the tutorial written in C++ but not updated from a long time.

Currently, It is not in the trunk of the LLVM mono repo but can be found in 11.0.0 here- https://releases.llvm.org/11.0.0/docs/tutorial/index.html#kaleidoscope-implementing-a-language-with-llvm-in-objective-caml.

They may have a good chance to learn LLVM IR, LLVM APIs, OCaml binding, writing test cases in LLVM IR using lit and filecheck, patch review process with Phabricator instance (https://reviews.llvm.org/), etc.

Best,
Shivam

Reply all
Reply to author
Forward
0 new messages