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 1168, Fri Mar 22 19:19:32 2002 UTC revision 1180, Tue Mar 26 22:24:24 2002 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume
17    Date: 2002/03/25 17:25:00 EST
18    Tag: blume-20020325-divmod
19    Description:
20    
21    I improved (hopefully without breaking them) the implementation of Int.div,
22    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
23    advantage of the following observations:
24    
25      Let  q = x quot y      r = x rem y
26           d = x div  y      m = x mod y
27    
28    where "quot" is the round-to-zero version of integer division that
29    hardware usually provides.  Then we have:
30    
31         r = x - q * y        where neither the * nor the - will overflow
32         d = if q >= 0 orelse x = q * y then q else q - 1
33                              where neither the * nor the - will overflow
34         m = if q >= 0 orelse r = 0 then r else r + y
35                              where the + will not overflow
36    
37    This results in substantial simplification of the generated code.
38    The following table shows the number of CFG nodes and edges generated
39    for
40            fun f (x, y) = x OPER y
41            (* with OPER \in div, mod, quot, rem *)
42    
43    
44        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
45        --------------------------------------------------------
46         div |         24 |         39 |         12 |         16
47         mod |         41 |         71 |         12 |         16
48        quot |          8 |         10 |          8 |         10
49         rem |         10 |         14 |          8 |         10
50    
51    
52    ----------------------------------------------------------------------
53    Name: Matthias Blume
54    Date: 2002/03/25 22:06:00 EST
55    Tag: blume-20020325-cprotobug
56    Description:
57    
58    Fixed a bug in cproto (c prototype decoder).
59    
60    ----------------------------------------------------------------------
61    Name: Matthias Blume
62    Date: 2002/03/25 16:00:00 EST
63    Tag: blume-20020325-raw-primops
64    Description:
65    
66    I did some cleanup to Allen's new primop code and
67    replaced yesterday's bootfiles with new ones.
68    (But they are stored in the same place.)
69    
70    ----------------------------------------------------------------------
71    Name: Matthias Blume
72    Date: 2002/03/24 22:40:00 EST
73    Tag: blume-20020324-bootfiles
74    Description:
75    
76    Made the bootfiles that Allen asked for.
77    
78    ----------------------------------------------------------------------
79    Name: Allen Leung
80    Date: 2002/03/23 15:50:00 EST
81    Tag: leunga-20020323-flint-cps-rcc-primops
82    Description:
83    
84      1. Changes to FLINT primops:
85    
86        (* make a call to a C-function;
87         * The primop carries C function prototype information and specifies
88         * which of its (ML-) arguments are floating point. C prototype
89         * information is for use by the backend, ML information is for
90         * use by the CPS converter. *)
91      | RAW_CCALL of { c_proto: CTypes.c_proto,
92                       ml_args: ccall_type list,
93                       ml_res_opt: ccall_type option,
94                       reentrant : bool
95                     } option
96       (* Allocate uninitialized storage on the heap.
97        * The record is meant to hold short-lived C objects, i.e., they
98        * are not ML pointers.  With the tag, the representation is
99        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
100        *)
101      | RAW_RECORD of {tag:bool,sz:int}
102      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
103    
104      2.  These CPS primops are now overloaded:
105    
106           rawload of {kind:numkind}
107           rawstore of {kind:numkind}
108    
109          The one argument form is:
110    
111             rawload {kind} address
112    
113          The two argument form is:
114    
115             rawload {kind} [ml object, byte-offset]
116    
117      3. RAW_CCALL/RCC now takes two extra arguments:
118    
119         a. The first is whether the C call is reentrant, i.e., whether
120            ML state should be saved and restored.
121         b. The second argument is a string argument specifying the name of
122            library and the C function.
123    
124         These things are currently not handled in the code generator, yet.
125    
126      4. In CProto,
127    
128         An encoding type of "bool" means "ml object" and is mapped into
129         C prototype of PTR.  Note that "bool" is different than "string",
130         even though "string" is also mapped into PTR, because "bool"
131         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
132    
133      5. Pickler/unpicker
134    
135         Changed to handle RAW_RECORD and newest RAW_CCALL
136    
137      6. MLRiscGen,
138    
139         1. Changed to handle the new rawload/rawstore/rawrecord operators.
140         2. Code for handling C Calls has been moved to a new module CPSCCalls,
141            in the file CodeGen/cpscompile/cps-c-calls.sml
142    
143      7. Added the conditional move operator
144    
145             condmove of branch
146    
147         to cps.  Generation of this is still buggy so it is currently
148         disabled.
149    
150    ----------------------------------------------------------------------
151  Name: Lal George  Name: Lal George
152  Date: 2002/03/22 14:18:25 EST  Date: 2002/03/22 14:18:25 EST
153  Tag: blume-20020321-cps-branch-prob  Tag: george-20020322-cps-branch-prob
154  Description:  Description:
155    
156  Implemented the Ball-Larus branch prediction-heuristic, and  Implemented the Ball-Larus branch prediction-heuristics, and
157  incorporated graphical viewers for control flow graphs.  incorporated graphical viewers for control flow graphs.
158    
159  Ball-Larus Heuristic:  Ball-Larus Heuristics:
160  ---------------------  ---------------------
161  See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.  See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
162    
# Line 33  Line 168 
168  the ball-larus heuristics predicts that the n=0 is unlikely  the ball-larus heuristics predicts that the n=0 is unlikely
169  (OH-heuristic), and the 'then' branch is unlikely because of the  (OH-heuristic), and the 'then' branch is unlikely because of the
170  RH-heuristic -- giving the 'then' branch an even lower combined  RH-heuristic -- giving the 'then' branch an even lower combined
171  probability using the Dempster-Shater theory.  probability using the Dempster-Shafer theory.
172    
173  Finally, John Reppy's loop analysis in MLRISC, further lowers the  Finally, John Reppy's loop analysis in MLRISC, further lowers the
174  probability of the 'then' branch because of the loop in the else  probability of the 'then' branch because of the loop in the else

Legend:
Removed from v.1168  
changed lines
  Added in v.1180

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