Expand description
§Homework: IR Generation
The goal of this homework is to translate the components of a C file into KECC IR. While doing so, you will familarize yourself with the structure of KECC IR, and understand the semantics of C in terms of KECC.
We highly recommend checking out the slides and github repo for useful information.
§Guide
§High Level Guide
Please watch the following video from 2020 along the lecture slides.
§Coding Guide
We highly recommend you copy-and-paste the code given in the following lecture videos from 2020:
- IRgen (Code, Variable Declaration)
- IRgen (Code, Function Definition)
- IRgen (Code, Statement 1)
- IRgen (Code, Statement 2)
The skeleton code roughly consists of the code for the first two videos, but you should still watch them to have an idea of what the code is like.
Structs§
- Context 🔒Storage for instructions up to the insertion of a block
- A C file going through IR generation.
- A C function being translated.
Enums§
- Error format when a compiler error happens.