LLVM

LLVM

June 21, 2021

From this ELI5 https://www.reddit.com/r/learnprogramming/comments/t6y74/eli5_what_is_llvm_can_it_be_used_for_general/

  • Normally source code to assembly

  • LLVM is a middleman VM that can make things easier on both ends (source code to LLVM, LLVM to assembly)

  • You now only need two things (depending)

    • creating new high level language: front end (source code to LLVM)
    • creating new chip/instruction set: LLVM assembler (LLVM to assembly)
  • Previous state of the world before LLVM: must be responsible from source code all the way to assembly PER language PER chip = massive headache.

  • practically high level assembly

  • need to develop a front end (high level to LLVM)

  • develop a back end (LLVM to ISA)

  • compile time

    • translate symbolic to absolute address
  • link time

    • external dependency link, still part of generating executable
  • load time

    • putting executable in RAM
  • run time

  • JIT

Follow-up

  • RISC vs CISC and chip ISA’s (instruction set architectures)
  • JVM

More