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/NOTES/HISTORY
ViewVC logotype

Diff of /sml/trunk/NOTES/HISTORY

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

revision 1132, Mon Mar 11 18:32:50 2002 UTC revision 1175, Mon Mar 25 03:38:44 2002 UTC
# Line 14  Line 14 
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16  Name: Matthias Blume  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
159    Date: 2002/03/21 20:30:00 EST
160    Tag: leunga-20020321-cfg
161    Description:
162    
163      Fixed a potential problem in cfg edge splitting.
164    
165    ----------------------------------------------------------------------
166    Name: Allen Leung
167    Date: 2002/03/21 17:15:00 EST
168    Tag: leunga-20020321-x86-fp-cfg
169    Description:
170    
171      1. Recoded the buggy parts of x86-fp.
172    
173         a. All the block reordering code has been removed.
174            We now depend on the block placement phases to do this work.
175    
176         b. Critical edge splitting code has been simplified and moved into the
177            CFG modules, as where they belong.
178    
179         Both of these were quite buggy and complex.  The code is now much, much
180         simpler.
181    
182      2. X86 backend.
183    
184         a. Added instructions for 64-bit support.  Instruction selection for
185            64-bit has not been committed, however, since that
186            requires changes to MLTREE which haven't been approved by
187            Lal and John.
188    
189         b. Added support for FUCOMI and FUCOMIP when generating code for
190            PentiumPro and above.  We only generate these instructions in
191            the fast-fp mode.
192    
193         c. Added cases for JP and JNP in X86FreqProps.
194    
195      3. CFG
196    
197         CFG now has a bunch of methods for edge splitting and merging.
198    
199      4. Machine description.
200    
201         John's simplification of MLTREE_BASIS.fcond broke a few machine
202         description things:
203    
204         rtl-build.{sig,sml} and hppa.mdl fixed.
205    
206         NOTE: the machine description stuff in the repository is still broken.
207               Again, I can't put my fixes in because that involves
208               changes to MLTREE.
209    
210    ----------------------------------------------------------------------
211    Name: Matthias Blume
212    Date: 2002/03/20 15:55:00 EST
213    Tag: blume-20020320-kmp
214    Description:
215    
216    Implemented Knuth-Morris-Pratt string matching in PreString and used
217    it for String.isSubstring, Substring.isSubstring, and
218    Substring.position.
219    
220    (Might need some stress-testing.  Simple examples worked fine.)
221    
222    ----------------------------------------------------------------------
223    Name: Matthias Blume
224    Date: 2002/03/19 16:37:00 EST
225    Tag: blume-20020319-witnesses
226    Description:
227    
228    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
229    
230    This implements a generic mechanism for changing constness qualifiers
231    anywhere within big C types without resorting to outright "casts".
232    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
233    modify the constness at the outermost level.)
234    The implementation of "convert" is based on the idea of "witness"
235    values -- values that are not used by the operation but whose types
236    "testify" to their applicability.  On the implementation side, "convert"
237    is simply a projection (returning its second curried argument).  With
238    cross-module inlining, it should not result in any machine code being
239    generated.
240    
241    ----------------------------------------------------------------------
242    Name: Matthias Blume
243    Date: 2002/03/15 16:40:00 EST
244    Tag: blume-20020315-basis
245    Description:
246    
247    Provided (preliminary?) implementations for
248    
249      {String,Substring}.{concatWith,isSuffix,isSubstring}
250    
251    and
252    
253      Substring.full
254    
255    Those are in the Basis spec but they were missing in SML/NJ.
256    
257    ----------------------------------------------------------------------
258    Name: Matthias Blume
259    Date: 2002/03/14 21:30:00 EST
260    Tag: blume-20020314-controls
261    Description:
262    
263    Controls:
264    ---------
265    
266    1. Factored out the recently-added Controls : CONTROLS stuff and put
267       it into its own library $/controls-lib.cm.  The source tree for
268       this is under src/smlnj-lib/Controls.
269    
270    2. Changed the names of types and functions in this interface, so they
271       make a bit more "sense":
272    
273          module -> registry
274          'a registry -> 'a group
275    
276    3. The interface now deals in ref cells only.  The getter/setter interface
277       is (mostly) gone.
278    
279    4. Added a function that lets one register an already-existing ref cell.
280    
281    5. Made the corresponding modifications to the rest of the code so that
282       everything compiles again.
283    
284    6. Changed the implementation of Controls.MLRISC back to something closer
285       to the original.  In particular, this module (and therefore MLRISC)
286       does not depend on Controls.  There now is some link-time code in
287       int-sys.sml that registers the MLRISC controls with the Controls
288       module.
289    
290    CM:
291    ---
292    
293      * One can now specify the lambda-split aggressiveness in init.cmi.
294    
295    ----------------------------------------------------------------------
296    Name: Allen Leung
297    Date: 2002/03/13 17:30:00 EST
298    Tag: leunga-20020313-x86-fp-unary
299    Description:
300    
301    Bug fix for:
302    
303    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
304    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
305    > - fun f(x,(y,z)) = Real.~ y;
306    > [autoloading]
307    > [autoloading done]
308    >       fchsl   (%eax), 184(%esp)
309    > Error: MLRisc bug: X86MCEmitter.emitInstr
310    >
311    > uncaught exception Error
312    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
313    
314    The problem was that the code generator did not generate any fp registers
315    in this case, and the ra didn't know that it needed to run the X86FP phase to
316    translate the pseudo fp instruction.   This only happened with unary fp
317    operators in certain situations.
318    
319    ----------------------------------------------------------------------
320    Name: Matthias Blume
321    Date: 2002/03/13 14:00:00 EST
322    Tag: blume-20020313-overload-etc
323    Description:
324    
325    1. Added _overload as a synonym for overload for backward compatibility.
326       (Control.overloadKW must be true for either version to be accepted.)
327    
328    2. Fixed bug in install script that caused more things to be installed
329       than what was requested in config/targets.
330    
331    3. Made CM aware of the (_)overload construct so that autoloading
332       works.
333    
334    ----------------------------------------------------------------------
335    Name: Matthias Blume
336    Date: 2002/03/12 22:03:00 EST
337    Tag: blume-20020312-url
338    Description:
339    
340    Forgot to update BOOT and srcarchiveurl.
341    
342    ----------------------------------------------------------------------
343    Name: Matthias Blume
344    Date: 2002/03/12 17:30:00 EST
345    Tag: blume-20020312-version110392
346    Description:
347    
348    Yet another version number bump (because of small changes to the
349    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
350    
351    Changes:
352    
353      The new pid generation scheme described a few weeks ago was overly
354      complicated.  I implemented a new mechanism that is simpler and
355      provides a bit more "stability":  Once CM has seen a compilation
356      unit, it keeps its identity constant (as long as you do not delete
357      those crucial CM/GUID/* files).  This means that when you change
358      an interface, compile, then go back to the old interface, and
359      compile again, you arrive at the original pid.
360    
361      There now also is a mechanism that instructs CM to use the plain
362      environment hash as a module's pid (effectively making its GUID
363      the empty string).  For this, "noguid" must be specified as an
364      option to the .sml file in question within its .cm file.
365      This is most useful for code that is being generated by tools such
366      as ml-nlffigen (because during development programmers tend to
367      erase the tool's entire output directory tree including CM's cached
368      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
369      revert to the old, broken behavior of SML/NJ, but in specific cases
370      where there is no danger of interface confusion, its use is ok
371      (I think).
372    
373      ml-nlffigen by default generates "noguid" annotations.  They can be
374      turned off by specifying -guid in its command line.
375    
376    ----------------------------------------------------------------------
377    Name: Lal George
378    Date: 2002/03/12 12 14:42:36 EST
379    Tag: george-20020312-frequency-computation
380    Description:
381    
382    Integrated jump chaining and static block frequency into the
383    compiler. More details and numbers later.
384    
385    ----------------------------------------------------------------------
386    Name: Lal George
387    Date: 2002/03/11 11 22:38:53 EST
388    Tag: george-20020311-jump-chain-elim
389    Description:
390    
391    Tested the jump chain elimination on all architectures (except the
392    hppa).  This is on by default right now and is profitable for the
393    alpha and x86, however, it may not be profitable for the sparc and ppc
394    when compiling the compiler.
395    
396    The gc test will typically jump to a label at the end of the cluster,
397    where there is another jump to an external cluster containing the actual
398    code to invoke gc. This is to allow factoring of common gc invocation
399    sequences. That is to say, we generate:
400    
401            f:
402               testgc
403               ja   L1      % jump if above to L1
404    
405            L1:
406               jmp L2
407    
408    
409    After jump chain elimination the 'ja L1' instructions is converted to
410    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
411    up being implemented in their long form (if L2 is far away) using:
412    
413            jbe     L3      % jump if below or equal to L3
414            jmp     L2
415         L3:
416            ...
417    
418    
419    For large compilation units L2  may be far away.
420    
421    
422    ----------------------------------------------------------------------
423    Name: Matthias Blume
424  Date: 2002/03/11 13:30:00 EST  Date: 2002/03/11 13:30:00 EST
425  Tag: blume-20020311-mltreeeval  Tag: blume-20020311-mltreeeval
426  Description:  Description:
# Line 23  Line 430 
430  ----------------------------------------------------------------------  ----------------------------------------------------------------------
431  Name: Allen Leung  Name: Allen Leung
432  Date: 2002/03/11 10:30:00 EST  Date: 2002/03/11 10:30:00 EST
433  Tag: leunga-20020310-runtime-string0  Tag: leunga-20020311-runtime-string0
434  Description:  Description:
435    
436     The representation of the empty string now points to a     The representation of the empty string now points to a

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

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