Add the tiger source code bundle from the book site
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
915660c8a7
commit
33d8bac511
87 changed files with 3252 additions and 0 deletions
23
tiger/chap9/flowgraph.sml
Normal file
23
tiger/chap9/flowgraph.sml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
structure Flow =
|
||||
struct
|
||||
datatype flowgraph = FGRAPH of {control: Graph.graph,
|
||||
def: Temp.temp list Graph.Table.table,
|
||||
use: Temp.temp list Graph.Table.table,
|
||||
ismove: bool Graph.Table.table}
|
||||
|
||||
(* Note: any "use" within the block is assumed to be BEFORE a "def"
|
||||
of the same variable. If there is a def(x) followed by use(x)
|
||||
in the same block, do not mention the use in this data structure,
|
||||
mention only the def.
|
||||
|
||||
More generally:
|
||||
If there are any nonzero number of defs, mention def(x).
|
||||
If there are any nonzero number of uses BEFORE THE FIRST DEF,
|
||||
mention use(x).
|
||||
|
||||
For any node in the graph,
|
||||
Graph.Table.look(def,node) = SOME(def-list)
|
||||
Graph.Table.look(use,node) = SOME(use-list)
|
||||
*)
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue