Skip to content

Comment on Learning Almost Nothing About LLVM

Comments

I had a not terrible time emitting LLVM IR text directly as part of an exploration of language backends.

Here are the three parts:

  * Introduction: https://notes.eatonphil.com/compiler-basics-llvm.html
  * Conditionals: https://notes.eatonphil.com/compiler-basics-llvm-conditionals.html
  * And system calls: https://notes.eatonphil.com/compiler-basics-llvm-system-calls.html
The hardest part I can remember is figuring out how LLVM IR's embedded assembly works since it's not exactly like Clang or GCC's IIRC. And the documentation was definitely confusing.

I think the libraries wrapping LLVM IR are frankly harder to figure out than emitting the IR text directly.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.