Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/IR/mlrisc-idefs.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/IR/mlrisc-idefs.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 245 - (view) (download)
Original Path: sml/branches/SMLNJ/src/MLRISC/IR/mlrisc-idefs.sml

1 : monnier 245 functor IDefsFn
2 :     (structure Dom : DOMINATOR_TREE
3 :     structure CFG : CONTROL_FLOW_GRAPH
4 :     ) : MLRISC_IDEFS =
5 :     struct
6 :    
7 :     structure Dom = Dom
8 :     structure CFG = CFG
9 :     structure I = CFG.I
10 :     structure G = Graph
11 :     structure IDefs = IDefs
12 :    
13 :     fun idefs defUse cfg =
14 :     let fun compute_def_use(b,CFG.BLOCK{insns,...}) =
15 :     let fun du([],D,U) = (List.concat D,List.concat U)
16 :     | du(i::is,D,U) =
17 :     let val (d,u) = defUse i
18 :     in du(is,d::D,u::U) end
19 :     in du(!insns,[],[])
20 :     end
21 :     in
22 :     IDefs.compute_idefs {cfg=cfg,def_use=compute_def_use}
23 :     end
24 :    
25 :     end
26 :    
27 :     (*
28 :     * $Log$
29 :     *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0