LLVM note I

Cross Platform


LLVM uses clang as front end to translate c/c++/java/fortran to bitcode representation and then LLVM compiler will convert this to different platform's assembly.

Clang is not only the front end of LLVM for c/c++/objective c compiling, but also a static analyzer to help the development of software. Well, in the industry, there are couple static analyzer like Coverity , Klocwork. They can analysis the source code at development stage statically. That can save a lot effort in debugging in the runtime.

SSA( static single assignment )

LLVM IR(intermediary representation) is in the form of SSA. SSA should be the most influencial project because this is the base of the design of LLVM Assembly. SSA was originally be introduced in 1988 by Wegman, Zadeck , Alpern. Right now, it is in the production status with GCC 4.0 or Java JIT compiler. The basic idea of SSA is to limit the variable assignment counts to only 1. If a variable is changed 5 times in the computing, it will generate 5 copies of this variable.