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

SCM Repository

[smlnj] Diff of /sml/trunk/HISTORY
ViewVC logotype

Diff of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1158, Fri Mar 22 01:21:25 2002 UTC revision 1175, Mon Mar 25 03:38:44 2002 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume
17    Date: 2002/03/24 22:40:00 EST
18    Tag: blume-20020324-bootfiles
19    Description:
20    
21    Made the bootfiles that Allen asked for.
22    
23    ----------------------------------------------------------------------
24    Name: Allen Leung
25    Date: 2002/03/23 15:50:00 EST
26    Tag: leunga-20020323-flint-cps-rcc-primops
27    Description:
28    
29      1. Changes to FLINT primops:
30    
31        (* make a call to a C-function;
32         * The primop carries C function prototype information and specifies
33         * which of its (ML-) arguments are floating point. C prototype
34         * information is for use by the backend, ML information is for
35         * use by the CPS converter. *)
36      | RAW_CCALL of { c_proto: CTypes.c_proto,
37                       ml_args: ccall_type list,
38                       ml_res_opt: ccall_type option,
39                       reentrant : bool
40                     } option
41       (* Allocate uninitialized storage on the heap.
42        * The record is meant to hold short-lived C objects, i.e., they
43        * are not ML pointers.  With the tag, the representation is
44        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
45        *)
46      | RAW_RECORD of {tag:bool,sz:int}
47      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
48    
49      2.  These CPS primops are now overloaded:
50    
51           rawload of {kind:numkind}
52           rawstore of {kind:numkind}
53    
54          The one argument form is:
55    
56             rawload {kind} address
57    
58          The two argument form is:
59    
60             rawload {kind} [ml object, byte-offset]
61    
62      3. RAW_CCALL/RCC now takes two extra arguments:
63    
64         a. The first is whether the C call is reentrant, i.e., whether
65            ML state should be saved and restored.
66         b. The second argument is a string argument specifying the name of
67            library and the C function.
68    
69         These things are currently not handled in the code generator, yet.
70    
71      4. In CProto,
72    
73         An encoding type of "bool" means "ml object" and is mapped into
74         C prototype of PTR.  Note that "bool" is different than "string",
75         even though "string" is also mapped into PTR, because "bool"
76         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
77    
78      5. Pickler/unpicker
79    
80         Changed to handle RAW_RECORD and newest RAW_CCALL
81    
82      6. MLRiscGen,
83    
84         1. Changed to handle the new rawload/rawstore/rawrecord operators.
85         2. Code for handling C Calls has been moved to a new module CPSCCalls,
86            in the file CodeGen/cpscompile/cps-c-calls.sml
87    
88      7. Added the conditional move operator
89    
90             condmove of branch
91    
92         to cps.  Generation of this is still buggy so it is currently
93         disabled.
94    
95    ----------------------------------------------------------------------
96    Name: Lal George
97    Date: 2002/03/22 14:18:25 EST
98    Tag: george-20020322-cps-branch-prob
99    Description:
100    
101    Implemented the Ball-Larus branch prediction-heuristics, and
102    incorporated graphical viewers for control flow graphs.
103    
104    Ball-Larus Heuristics:
105    ---------------------
106    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
107    
108    By design it uses the Dempster-Shafer theory for combining
109    probabilities.  For example, in the function:
110    
111        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
112    
113    the ball-larus heuristics predicts that the n=0 is unlikely
114    (OH-heuristic), and the 'then' branch is unlikely because of the
115    RH-heuristic -- giving the 'then' branch an even lower combined
116    probability using the Dempster-Shafer theory.
117    
118    Finally, John Reppy's loop analysis in MLRISC, further lowers the
119    probability of the 'then' branch because of the loop in the else
120    branch.
121    
122    
123    Graphical Viewing:
124    ------------------
125    I merely plugged in Allen's graphical viewers into the compiler. The
126    additional code is not much. At the top level, saying:
127    
128            Control.MLRISC.getFlag "cfg-graphical-view" := true;
129    
130    will display the graphical view of the control flow graph just before
131    back-patching.  daVinci must be in your path for this to work. If
132    daVinci is not available, then the default viewer can be changed
133    using:
134    
135            Control.MLRISC.getString "viewer"
136    
137    which can be set to "dot" or "vcg" for the corresponding viewers. Of
138    course, these viewers must be in your path.
139    
140    The above will display the compilation unit at the level of clusters,
141    many of which are small, boring, and un-interesting. Also setting:
142    
143            Control.MLRISC.getInt "cfg-graphical-view_size"
144    
145    will display clusters that are larger than the value set by the above.
146    
147    
148    ----------------------------------------------------------------------
149    Name: Matthias Blume
150    Date: 2002/03/21 22:20:00 EST
151    Tag: blume-20020321-kmp-bugfix
152    Description:
153    
154    Changed the interface to the KMP routine in PreString and fixed
155    a minor bug in one place where it was used.
156    
157    ----------------------------------------------------------------------
158  Name: Allen Leung  Name: Allen Leung
159  Date: 2002/03/21 20:30:00 EST  Date: 2002/03/21 20:30:00 EST
160  Tag: leunga-20020321-cfg  Tag: leunga-20020321-cfg

Legend:
Removed from v.1158  
changed lines
  Added in v.1175

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