Efficient IR for the OpenModelica Compiler

University essay from Linköpings universitet/Programvara och system

Author: Simon Eriksson; Patrik Andersson; [2018]

Keywords: ;

Abstract: The OpenModelica compiler currently generates code directly from a syntax tree representation, which leads to inefficient code in several cases. This thesis work introduces a lower-level intermediate representation for the compiler which aims to simplify the compiler back end and enable more optimizations. The resulting design of the representation features flat primitive operations and control flow using basic blocks and terminators. Variables are mutable, unlike SSA-based representations. Introducing the IR did not significantly change the runtime performance of the test programs. The number of lines of code compared to the old back end was reduced to a quarter, this and the simpler representation will help future work on optimization passes and implementing an LLVM-based back end.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)