File: ssa-instrgen.sig

package info (click to toggle)
mlton 20210117%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,464 kB
  • sloc: ansic: 27,682; sh: 4,455; asm: 3,569; lisp: 2,879; makefile: 2,347; perl: 1,169; python: 191; pascal: 68; javascript: 7
file content (35 lines) | stat: -rw-r--r-- 1,102 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(*
 * This module is responsible for generating new instructions from 
 * MLTREE and inserting them into the SSA graph.  This is useful for
 * patching in new instructions as the SSA graph is being transformed.
 *
 * Special MLRISC Magic(tm) for invoking the instruction selection 
 * module and ssa-ifying the output code are all hidden here.
 * 
 * -- Allen (leunga@cs.nyu.edu)
 * 
 *)
signature SSA_INSTRGEN =
sig

   structure SSA : SSA
   structure RTL : MLTREE_RTL
   structure MLTreeComp : MLTREECOMP
      sharing SSA.MLTreeComp = MLTreeComp
      sharing SSA.RTL = RTL

    exception Illegal

   (* Convert internal RTL into a mltree term *)
   val translate : SSA.ssa ->
                   {rtl:RTL.rtl, defs:SSA.value list, uses:SSA.value list} ->
                      MLTreeComp.T.stm
   (* Convert an mltree term into a list of instructions *)
   val instrGen  : SSA.ssa -> MLTreeComp.T.stm -> SSA.I.instruction list

   (* Insert instructions into the SSA graph *)

   (* Replace the instruction at id *)
   val replace : SSA.ssa -> {id:SSA.ssa_id, mltree:MLTreeComp.T.stm} -> bool

end