Message from C, C++ talks

July 2019

— Not quite

— LLVM runs some general optimizations on code in its IL

— Not quite but I'm sort of convinced about how things r working.

— So it is optimising the intermediate code

— 

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines. The name "LLVM" itself is not an acronym; it is the full name of the project.

LLVM began as a research project at the University of Illinois, with the goal of providing a modern, SSA-based compilation strategy capable of supporting both static and dynamic compilation of arbitrary programming languages. Since then, LLVM has grown to be an umbrella project consisting of a number of subprojects, many of which are being used in production by a wide variety of commercial and open source projects as well as being widely used in academic research. Code in the LLVM project is licensed under the "Apache 2.0 License with LLVM exceptions"

The LLVM Core libraries provide a modern source- and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!) These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR"). The LLVM Core libraries are well documented, and it is particularly easy to invent your own language (or port an existing compiler) to use LLVM as an optimizer and code generator.

— And then there's so called backend

— So it is optimising the intermediate code but what about conversion the machine language.

— And backend compiles LLVM IL to target platform

— I guess LLVM is doing that too

— And target platform could be machine code, JavaScript etc

— LLVM Core compiles it to binary for the chosen cpu architecture

— *converting to machine lang. Typo there.

— Yeah,... but lets say, unterumarmung , that this js output is rather hacky and not part of the actual LLVM core, is it

Message permanent page

— The main goal of LLVM core is to generate code for a CPU

— Ok, I'm not an expert
Just telling what I learned :)