~/talk

Compilers and LLVM Demystified

Talkat UIKonf 2018 · 2018-05-13..05-16· [compilers-and-language-design]
links:none on file
slides:none on file

Builds a tiny Swift compiler for a language called calc using the Swift LLVM wrapper LLVMSwift and emits LLVM IR then object code. All values are doubles, print simply forwards its string to printf, variables use alloca store load, and the ternary compiles to a branch plus a phi nodes merge. Demonstrates running function-level optimization (instruction combining / constant folding) that removes deterministic checks and shows final codegen and linking with libSystem to produce a runnable binary.

AI-written summary · about

  1. 0:00Intro
  2. 2:43What is LLVM?
  3. 3:43Example: CALC
  4. 7:36Calc: AST
  5. 10:49CALC: IR Code Generation
  6. 13:39LLVMSwift: pre Hello World
  7. 14:58LLVM IR: Allocate Memory a = 3
  8. 16:36LLVM IR: Call Function print("Hello World")
  9. 18:09LLVM IR: Phi Node
  10. 20:51Optimizations
  11. 22:22Target Code Generation
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.