There are a few points worth saying:
1, instruction set can do type analysis, but do not say what iadd, fadd such a low-level CPU Operation instruction abstraction (JVM/CLR is so designed), the point is that the introduction of malloc and Alloca (heap allocation and stack allocation) is a C language library function, But made the virtual instruction (here the author does not control the difference between new and new[in C + +), and then through the getelementptr can access the data structure of the field;
In fact, LLVM's alloca directive means that dynamic allocations can be made on the stack, and of course, ALLOCA is the standard library function for C, but it might have been a little thought of before. Because the dynamic allocation on the stack means that the stack space is not enough to be able to dynamically expand the size.
2. Separate the PHI function in SSA into instructions
3, function call in the LLVM is also really wonderful, incredibly to write on the return type, and then other looks like C language syntax, but the variable name has a% prefix
4, in the middle with a lot of space to explain the "Data structure Diagram" (DSG), and use it to analyze the code is linear complexity. But I do not see how to understand, this and the classic CFG/DFG What is the difference between?
The authors emphasize that more is the IPO (inter-process optimization) on LLVM.
In short, LLVM is a set of RISC-style virtual instructions specific to the C language architecture, with built-in support for SSAS and type analysis.
Finished reading the original thesis thesis of LLVM author (doctoral dissertation?) )