Embedded Systems Group (ES)

MiniC Compiler

This is a toy compiler implemented for education and research on code generation and processor architectures. The compiler expects programs given in the MiniC programming language (see reference card) and generates assembler code for the Abacus processor that has been designed in the Embedded Systems Group of the University of Kaiserslautern (more about Abacus). The Abacus assembler program can then be simulated with the Abacus simulator. More example programs can be found on this page.

The compiler translates the MiniC program into an internal code that is similar to three address code, i.e., a virtual machine code with infinitely many temporary registers. It then applies dataflow analysis to compute the liveness of variables, and based on that computes a register allocation to may the program variables and temporary registers to the available machine registers.

Source Code Transformations
convert to SSA form
convert to predicated form
translate to F# programs
translate to C programs
translate to Dataflow Process Networks
translate to Abacus assembler
translate to CMD program
Abacus Code Generation Details
print control flow graph
print control dataflow graph
print dataflow analysis and register assignment