Getting to know the LLVM compiler
Guobin Ye · 2011
Fast compile time, reducing execution time of program, providing useful error message and reducing size of file generated are the main purposes of a compiler. Following the development of compiler technologies, compilers have become more and more powerful and efficient. The performance of some open-source compilers is good enough to catch our focus. This thesis introduces an open-source compiler called LLVM (Low Level Virtual Machine [1, 2, 3] and discusses how the LLVM multiple language front-ends collaborate with LLVM back-end to provide effective lifetime optimization for a program. This thesis compares the performance of LLVM compiler (version 2.9) with other two compilers which are the Portland Group compiler (PGI) [4] and the GNU Compiler Collection (GCC) [5] version 4.l.2 and version 4.5.2. We also experiment which optimisation flags of each compiler can provide best performance for a program, and compare as many relevant aspects of the compilers as possible such as compile time, run-time and size of code generated. Three scientific benchmark codes are chosen for the performance testing. They are GADGET-2 [6], LAMMPS [7] and HELIUM [8]. The details of the benchmarks are introduced in Chapter 3.