The src/canon
Directory
Namespace canon
. Canonicalization and linearization of the HIR down to
LIR.
Reading the corresponding explanations in Appel’s book is mandatory.
File: libcanon.* (src/canon/)
The interface.
File: basic-block.* (src/canon/)
A basic block is a location independent piece of code, starting with a label and ending with a jump. The ordering of a program’s basic blocks has an impact on its performance.
File: canon.* (src/canon/)
Canonicalize the intermediate representation: remove
tree::Eseq
, flatten nestedtree::Seq
…
File: *-matcher.* (src/canon/)
Functors used to perform pattern-matching on IR for canonicalization. These make use of
misc::list
functions in order to ease the writing and reading of the code which is heavily inspired from A. Appel’s functional implementation in ML.
File: traces.* (src/canon/)
Linearize the canonicalized intermediate representation to generate basic blocks.