Friday Hacks #112 - Make your own LLVM compiler - NUS Hackers

preview_player
Показать описание
Speaker: Omer Iqbal

Talk Description:

LLVM is a compiler infrastructure project, designed as a set of reusable libraries. From humble beginnings as a research project, it has recently gained much traction, thanks to Apple adopting it as their default compiler toolchain for iOS and Mac OS platforms.

At it's core, LLVM features an architecture independent, type safe, instruction set called "LLVM IR", which LLVM compiles to several instruction sets including x86/x86-64, ARM, Power PC etc. So in essence, if you're lazy and want to implement a multi platform programming language that runs "natively", LLVM saves you tons of time and effort.

This talk will go through implementing a very very simple compiler for a very very simple, toy programming language, using LLVM.

Speaker Profile

Omer is an NUS Hackers alumnus, currently working as an iOS Software Engineer at Garena. He also moonlights as a Functional Programming Evangelical, and is a little obsessed with writing useless, toy compilers.

Produced by Engineers.SG

Help us caption & translate this video!

Рекомендации по теме
Комментарии
Автор

Nice to see blocks from small talk still being used

Kenbomp
Автор

LLVM's instructions aren't "typesafe", they specify explicit types. There's a difference. LLVM isn't doing any type checking. It assumes the front end did all that and issued any type errors during parsing. Type safety is a function of the front end, not the back end.

dlwatib
Автор

28:19 "This is my Israel" OMEGALUL

muonx
Автор

Thank you very much for such a great. Can you put a link to sources on git?

ZainUlabidin
Автор

Why did you pass -03 in the clang emit llvm command again??

cv_ruddha
Автор

Thanks! From Malaysia ;) I like the Singapore accent

wliaputs
Автор

if what you are doing is parsing your code file to convert it to llvm ir so that it can compile it, why not just parse the file and convert it to c++ and compile that?

dosluke
Автор

"Inside" is not the same as "at". You can't store a value "inside" a pointer, you store a value at a pointer (at the location where the pointer is pointing.) Same with load. You can't load a value from "inside" a pointer. You load from (the location at) a pointer.

dlwatib
Автор

Can we really make compiler by following this video?

chiru
Автор

Jesus dude cool it with all the sexual comments, this frat house boy's club atmosphere is cringy

TheBilly
Автор

Vague explanation, crappy jokes, indian accent... incredible combo if you are looking to spend 58:44 mins of your life without learning anything.

sahilbaori