| 1 |
(* |
| 2 |
* Emit code and build a CFG |
| 3 |
* |
| 4 |
* -- Allen |
| 5 |
*) |
| 6 |
|
| 7 |
signature CONTROL_FLOW_GRAPH_GEN = |
| 8 |
sig |
| 9 |
|
| 10 |
structure CFG : CONTROL_FLOW_GRAPH |
| 11 |
structure I : INSTRUCTIONS |
| 12 |
structure S : INSTRUCTION_STREAM |
| 13 |
sharing CFG.I = I |
| 14 |
sharing S.P = CFG.P |
| 15 |
|
| 16 |
(* |
| 17 |
* This creates an emitter which can be used to build a CFG |
| 18 |
*) |
| 19 |
val builder : CFG.cfg -> |
| 20 |
{ stream : (I.instruction, |
| 21 |
Annotations.annotations, |
| 22 |
I.C.cellset |
| 23 |
) S.stream, |
| 24 |
next : CFG.cfg -> unit (* start with a new CFG *) |
| 25 |
} |
| 26 |
|
| 27 |
end |