Samo Jelovšek (2013) Extending LLVM-based Kaleidoscope compiler. EngD thesis.
Abstract
This thesis first describes the concept of a compiler, what it is and what typical compiler consists of. This basic definition has been used to develop a improved compiler for Kaleidoscope programming language. Compiler was developed using LLVM framework. Compiler uses its own front end, back end was developed with use of the LLVM library. The thesis presents the LLVM project, with main focus on the LLVM intermediate representation, which is one of the main most important parts of the developed compiler. It presentes the stages of the developed compiler: lexical analysis (using Flex tool), syntax analysis (using Bison tool), LLVM intermediate representation code generation, where it describes the part of the LLVM code library, which was used in the development. It is described how the generated LLVM intermediate representation code is executed by conversion to an ELF object file. In the last part it is described addition of new while-do and repeat-until loops.
Actions (login required)