Skip to content

lumaier/Compiler-Design-ETHZ-HS21

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assignments: Compiler Design HS2021 at ETHZ

HW1: Hellocaml

Introduction to OCaml programming and warm-up exercises involving tree manipulations and recursive programming. Familiarize with the basic workflow of the projects in the course, including the testing framework that's used to automate the grading.

HW2: x86Lite

Implementation of an assembler and simulator for a small, idealized subset of the x86-64 platform that serves as the target language for the compilers built in the following projects. Another goal is to be more comfortable when programming in OCaml.

HW3: Compiling LLVM

Implementation of a non-optimizing compiler for a subset of the LLVM IR language. The source language consists of a 64-bit, simplified subset of the LLVMlite. The target language is X86lite as defined in HW2.

HW4: Compiling Oat v.1

Implementation of a compiler frontend for a simple imperative language called Oat that has boolean, int, string, and array types as well as top-level, mutually recursive functions and global variables. The compiler accepts source files and produces an executable that can be linked and executed.

HW5: Compiling Full Oat

Implementation of a compiler typechecker for an extended version of Oat that has boolean, int, string, array, struct and function pointer types as well as "possibly null" and "definitely not null" references. The compiler accepts source files and produces an executable that can be linked and executed.

HW6: Dataflow Analysis and Register Allocation

The Oat compiler developed until HW5 produces very inefficient code, since it performs no optimizations at any stage of the compilation pipeline. This last project includes several simple dataflow analyses and some optimizations at the level of our LLVMlite intermediate representation in order to improve code size and speed.

About

A complete compiler for the C-like language Oat, translating source code into x86Lite assembly. The pipeline uses the LLVMlite Intermediate Representation (IR) for data-flow analysis and optimization. A central feature is the implementation of Register Allocation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors