TC-6 Code to Write

You can run the LIR using HAVM.

Relevant pages:
lib/misc/variant.hh

Complete the VariantTypes concept. We advise you to look at these pages on concepts: Named Req, Metaprogramming Library.

For the The src/canon Directory folder you will find more information on this part in the book (Modern Compiler Implementation), in the chapter “8. Basic Blocks and Traces”.

src/canon/libcanon.cc

Generate traces for each ProcFrag as for the canonicalize part.

src/canon/canon.cc

Complete canonicalization helpers is_nop, commute_p and reorder.

src/canon/exp-matcher.cc and src/canon/stm-matcher.cc

Complete pattern-matching for canonicalization.

src/canon/traces.cc

Generate the LIR, linearize the canonicalized IR, create basic blocks and traces.