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 580, Wed Mar 22 06:33:52 2000 UTC revision 684, Tue Jul 11 04:57:48 2000 UTC
# Line 12  Line 12 
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14  ----------------------------------------------------------------------  ----------------------------------------------------------------------
15    Name: Matthias Blume
16    Date: 2000/07/11 13:58:00 JST
17    Tag: blume-20000711-doctypo
18    Description:
19    
20    Fixed a few typos in CM manual.
21    
22    ----------------------------------------------------------------------
23    Name: Allen Leung
24    Date: 2000/06/15 00:38:00
25    Tag: leunga-20000704-sparc-x86
26    
27    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
28    2. fix to x86 RET bug [found by Dan Grossman]
29    3. sparc assembly bug fix for ticc instructions [found by Fermin]
30    
31       Affects c-- and moby only
32    
33    ----------------------------------------------------------------------
34    Name: Matthias Blume
35    Date: 2000/07/04 15:26:00
36    Tag: blume-20000704-trigger
37    Description:
38    
39    1. Improvements to CM manual.
40    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
41       of getting a back-trace.  The function, when called, raises an
42       internal exception which explicitly carries the full back-trace history,
43       so it is unaffected by any intervening handle-raise pairs ("trivial"
44       or not).  The interactive loop will print that history once it arrives
45       at top level.
46       Short of having all exceptions implicitly carry the full history, the
47       recommended way of using this facility is:
48         - compile your program with instrumentation "on"
49         - run it, when it raises an exception, look at the history
50         - if the history is "cut off" because of some handler, go and modify
51           your program so that it explicitly calls BTrace.trigger
52         - recompile (still instrumented), and rerun; look at the full history
53    
54    ----------------------------------------------------------------------
55    Name: Matthias Blume
56    Date: 2000/07/03 15:36:00 JST
57    Tag: blume-20000702-manual
58    Description:
59    
60    Small corrections and updates to CM manual.
61    
62    ----------------------------------------------------------------------
63    Name: Matthias Blume
64    Date: 2000/06/29 16:04:00 JST
65    Tag: blume-20000629-yacctool
66    Description:
67    
68    Changes:
69    
70    1. Class "mlyacc" now takes separate arguments to pass options to
71       generated .sml- and .sig-files independently.
72    2. Corresponding CM manual updates.
73    3. BTrace module now also reports call sites.  (However, for loop clusters
74       it only shows from where the cluster was entered.)  There are associated
75       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
76    
77    ----------------------------------------------------------------------
78    Name: Matthias Blume
79    Date: 2000/06/27 16:51:00 JST
80    Tag: blume-20000627-noweb
81    Description:
82    
83    Changes:
84    
85     1. Implemented "subdir" and "witness" options for noweb tool.
86        This caused some slight internal changes in CM's tool implementation.
87     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
88        some remaining issues from earlier path anchor changes.
89     3. Updated CM manual accordingly.
90    
91     4. Changed implementation of back-tracing so that I now consider it
92        ready for prime-time.
93    
94        In particular, you don't have to explicitly trigger the back-trace
95        anymore.  Instead, if you are running BTrace-instrumented code and
96        there is an uncaught exception (regardless of whether or not it was
97        raised in instrumented code), the top-level evalloop will print
98        the back-trace.
99    
100        Features:
101    
102          - Instrumented and uninstrumented code work together seemlessly.
103            (Of course, uninstrumented code is never mentioned in actual
104             back-traces.)
105    
106          - Asymptotic time- and space-complexity of instrumented code is
107            equal to that of uninstrumented code.  (This means that
108            tail-recursion is preserved by the instrumentation phase.)
109    
110          - Modules whose code has been instrumented in different sessions
111            work together without problem.
112    
113          - There is no penalty whatsoever on uninstrumented code.
114    
115          - There is no penalty on "raise" expressions, even in
116            instrumented code.
117    
118        A potential bug (or perhaps it is a feature, too):
119    
120          A back-trace reaches no further than the outermost instrumented
121          non-trivial "raise".  Here, a "trivial" raise is one that is the
122          sole RHS of a "handle" rule.  Thus, back-traces reach trough
123    
124               <exp> handle e => raise e
125    
126          and even
127    
128               <exp> handle Foo => raise Bar
129    
130          and, of course, through
131    
132               <exp> handle Foo => ...
133    
134         if the exception was not Foo.
135    
136         Back-traces always reach right through any un-instrumented code
137         including any of its "handle" expressions, trivial or not.
138    
139       To try this out, do the following:
140    
141         - Erase all existing binfiles for your program.
142           (You may keep binfiles for those modules where you think you
143            definitely don't need back-tracing.)
144         - Turn on back-trace instrumentation:
145              SMLofNJ.Internals.BTrace.mode (SOME true);
146         - Recompile your program.  (I.e., run "CM.make" or "use".)
147         - You may now turn instrumentation off again (if you want):
148              SMLofNJ.Internals.BTrace.mode (SOME false);
149         - Run your program as usual.  If it raises an exception that
150           reaches the interactive toplevel, then a back-trace will
151           automatically be printed.  After that, the toplevel loop
152           will print the exception history as usual.
153    
154    ----------------------------------------------------------------------
155    Name: Matthias Blume
156    Date: 2000/06/26 09:56:46 JST
157    Tag: blume-20000626-setup
158    Description:
159    
160    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
161          ML code before and after compiling a file (e.g., to set compiler
162          flags)
163    
164    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
165              - associated changes to btrace.sml (BTrace instrumentation pass)
166              - cleaner implementation of btimp.sml (BTrace tracing and report
167                module)
168    
169    CM manual: * new path encoding documented
170               * description of setup-parameter to "sml" added
171    
172    The biggest user-visible change to back-tracing is that it is no
173    longer necessary to compile all traced modules within the same
174    session.  (This was a real limitation.)
175    
176    ----------------------------------------------------------------------
177    Name: Matthias Blume
178    Date: 2000/06/24 12:40:00 JST
179    Tag: blume-20000624-startup
180    Description:
181    
182    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
183    bit too often -- to put it mildly. :)
184    
185    ----------------------------------------------------------------------
186    Name: Matthias Blume
187    Date: 2000/06/23 18:20:00 JST
188    Tag: blume-20000623-btrace
189    Description:
190    
191    This updates adds a backtrace facility to aid programmers in debugging
192    their programs.  This involves the following changes:
193    
194    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
195       keeping track of the current call stack.  When programs are compiled
196       in a special mode, the compiler will insert calls to these hooks
197       into the user program.
198       "Hook" means that it is possible for different implementations of
199       back-tracing to register themselves (at different times).
200    
201    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
202       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
203       It can be turned on using this call:
204         SMLofNJ.Internals.BTrace.mode (SOME true);
205       Turning it off again:
206         SMLofNJ.Internals.BTrace.mode (SOME false);
207       Querying the current status:
208         SMLofNJ.Internals.BTrace.mode NONE;
209       Annotated programs are about twice as big as normal ones, and they
210       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
211       where all hooks do nothing).  The slowdown with a plugin that is
212       actually useful (such as the one supplied by default) is even greater,
213       but in the case of the default plugin it is still only an constant
214       factor (amortized).
215    
216    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
217       with a sub-structure BTrace for controlling back-tracing.  In particular,
218       the above-mentioned function "mode" controls whether the annotation
219       phase is invoked by the compiler.  Another important function is
220       "trigger": when called it aborts the current execution and causes
221       the top-level loop to print a full back-trace.
222    
223    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
224       for back-tracing.  It keeps track of the dynamic call stack and in
225       addition to that it keeps a partial history at each "level" of that
226       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
227       d and b (at separate times, dynamically), then the report will show:
228    
229       GOTO   d
230             /c
231       GOTO  \b
232       CALL   a
233    
234       This shows that there was an initial non-tail call of a, then a
235       tail-call to b or c, looping behavior in a cluster of functions that
236       consist of b and c, and then a goto from that cluster (i.e., either from
237       b or from c) to d.
238    
239       Note that (depending on the user program) the amount of information
240       that the back-trace module has to keep track of at each level is bounded
241       by a constant.  Thus, the whole implementation has the same asymptotical
242       complexity as the original program (both in space and in time).
243    
244    5. compiler/TopLevel/interact/evalloop.sml has been modified to
245       handle the special exception SMLofNJ.Internals.BTrace.BTrace
246       which is raised by the "trigger" function mentioned above.
247    
248    Notes on usage:
249    
250    - Annotated code works well together with unannotated code:
251    Unannotated calls simply do not show up at all in the backtrace.
252    
253    - It is not a good idea to let modules that were annotated during
254    different sessions run at the same time.  This is because the compiler
255    chooses small integers to identify individual functions, and there
256    will be clashes if different modules were compiled in separate sessions.
257    (Nothing will crash, and you will even be told about the clashes, but
258    back-trace information will in general not be useful.)
259    
260    - Back-tracing can be confused by callcc and capture.
261    
262    - The only way of getting a back-trace right now is to explicitly
263    invoke the "trigger" function from your user program.  Eventually, we
264    should make every exception carry back-trace information (if
265    available).  But since this creates more overhead at "raise"-time
266    (similar to the current exnHistory overhead), I have not yet
267    implemented this.  (The implementation will be rather easy.)  With
268    exceptions carrying back-trace information, this facility will be even
269    more useful because users don't need to modify their programs...
270    
271    - While it is possible to compile the compiler with back-trace
272    annotations turned on (I did it to get some confidence in
273    correctness), you must make absolutely sure that core.sml and
274    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
275    be compiled with annotation because there is no core access yet, but
276    if you compile btimp.sml with annotation, then the system will go into
277    an infinite recursion and crash.)
278    Since CM currently does not know about BTrace, the only way to turn
279    annotations on and off for different modules of the compiler is to
280    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
281    this is awkward and clumsy.
282    
283    Sample sessions:
284    
285    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
286    - SMLofNJ.Internals.BTrace.mode (SOME true);
287    [autoloading]
288    [autoloading done]
289    val it = false : bool
290    - structure X = struct
291    -     fun main n = let
292    -         fun a (x, 0) = d x
293    -           | a (x, n) = b (x, n - 1)
294    -         and b (x, n) = c (x, n)
295    -         and c (x, n) = a (x, n)
296    -         and d x = e (x, 3)
297    -         and e (x, 0) = f x
298    -           | e (x, n) = e (x, n - 1)
299    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
300    -           | f n = n * g (n - 1)
301    -         and g n = a (n, 3)
302    -     in
303    -         f n
304    -     end
305    - end;
306    structure X : sig val main : int -> int end
307    - X.main 3;
308    *** BACK-TRACE ***
309    GOTO   stdIn:4.2-13.20: X.main[2].f
310    GOTO-( stdIn:4.2-13.20: X.main[2].e
311    GOTO   stdIn:4.2-13.20: X.main[2].d
312         / stdIn:4.2-13.20: X.main[2].a
313         | stdIn:4.2-13.20: X.main[2].b
314    GOTO-\ stdIn:4.2-13.20: X.main[2].c
315    CALL   stdIn:4.2-13.20: X.main[2].g
316    GOTO   stdIn:4.2-13.20: X.main[2].f
317    GOTO-( stdIn:4.2-13.20: X.main[2].e
318    GOTO   stdIn:4.2-13.20: X.main[2].d
319         / stdIn:4.2-13.20: X.main[2].a
320         | stdIn:4.2-13.20: X.main[2].b
321    GOTO-\ stdIn:4.2-13.20: X.main[2].c
322    CALL   stdIn:4.2-13.20: X.main[2].g
323    GOTO   stdIn:4.2-13.20: X.main[2].f
324    GOTO-( stdIn:4.2-13.20: X.main[2].e
325    GOTO   stdIn:4.2-13.20: X.main[2].d
326         / stdIn:4.2-13.20: X.main[2].a
327         | stdIn:4.2-13.20: X.main[2].b
328    GOTO-\ stdIn:4.2-13.20: X.main[2].c
329    CALL   stdIn:4.2-13.20: X.main[2].g
330    GOTO   stdIn:4.2-13.20: X.main[2].f
331    CALL   stdIn:2.15-17.4: X.main[2]
332    -
333    
334    (Note that because of a FLINt bug the above code currently does not
335    compile without BTrace turned on.)
336    
337    Here is another example, using my modified Tiger compiler:
338    
339    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
340    - SMLofNJ.Internals.BTrace.mode (SOME true);
341    [autoloading]
342    [autoloading done]
343    val it = false : bool
344    - CM.make "sources.cm";
345    [autoloading]
346    ...
347    [autoloading done]
348    [scanning sources.cm]
349    [parsing (sources.cm):parse.sml]
350    [creating directory CM/SKEL ...]
351    [parsing (sources.cm):tiger.lex.sml]
352    ...
353    [wrote CM/sparc-unix/semant.sml]
354    [compiling (sources.cm):main.sml]
355    [wrote CM/sparc-unix/main.sml]
356    [New bindings added.]
357    val it = true : bool
358    - Main.compile ("../testcases/merge.tig", "foo.out");
359    *** BACK-TRACE ***
360    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
361    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
362    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
363    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
364    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
365    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
366    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
367         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
368    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
369    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
370    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
371    CALL   main.sml:1.18-118.4: Main.compile[2]
372    -
373    
374    ----------------------------------------------------------------------
375    Name: Matthias Blumen
376    Date: 2000/06/21 18:00:00 JST
377    Tag: blume-20000621-manual
378    Description:
379    
380    CM manual update: Path environments documented.
381    
382    ----------------------------------------------------------------------
383    Name: Matthias Blume
384    Date: 2000/06/19 13:40:00
385    Tag: blume-20000619-manual
386    Description:
387    
388    CM manual and system/README update.  This only covers the fact that
389    there are no more implicit anchors.  (Path environments and the "bind"
390    option to "cm" have yet to be documented.)
391    
392    ----------------------------------------------------------------------
393    Name: Matthias Blume
394    Date: 2000/06/19 11:05:00 JST
395    Tag: blume-20000619-chdir-bugfix
396    Description:
397    
398    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
399    
400    ----------------------------------------------------------------------
401    Name: Matthias Blume
402    Date: 2000/06/18 22:00:10 JST
403    Tag: blume-20000618-implicit-anchors-really-gone
404    Description:
405    
406    I updates the previous HISTORY entry where I forgot to mention that
407    implicit anchors are no longer with us.
408    
409    The current update also gets rid of the (now useless) controller
410    CM.Control.implicit_anchors.
411    
412    ----------------------------------------------------------------------
413    Name: Matthias Blume
414    Date: 2000/06/16 17:30:00 JST
415    Tag: blume-20000616-anchorenv
416    Description:
417    
418    This patch implements the long anticipated (just kidding :) "anchor
419    environment" mechanism.  In the course of doing this, I also
420    re-implemented CM's internal "SrcPath" module from scratch.  The new
421    one should be more robust in certain boundary cases.  In any case, it
422    is a lot cleaner than its predecessor (IMHO).
423    
424    This time, although there is yet another boot file format change, I
425    kept the unpickler backward-compatible.  As a result, no new bootfiles
426    are necessary and bootstrapping is straightforward.  (You cannot read
427    new bootfiles into an old system, but the other way around is no
428    problem.)
429    
430    Visible changes:
431    
432    ** 0. Implicit path anchors (without the leading $-symbol) are no
433    longer recognized at all. This means that such path names are not
434    illegal either.  For example, the name basis.cm simply refers to a
435    local file called "basis.cm" (i.e, the name is an ordinary path
436    relative to .cm-files directory).  Or, to put it differently, only
437    names that start with $ are anchored paths.
438    
439    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
440    vanished.
441    
442    John (Reppy) had critizised this as soon as I originally proposed and
443    implemented it, but at that time I did not really deeply believe
444    him. :) Now I came full-circle because I need the $<singlearc> syntax
445    in another place where it cannot be seen as an abbreviation for
446    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
447    seems to mean (i.e., it "expands" into the corresponding anchor
448    value).
449    
450    However, when paths are used as members in CM description files, it
451    continues to be true that there must be at least another arc after the
452    anchor.  This is now enforced separately during semantic analysis
453    (i.e., from a lexical/syntactical point of view, the notation is ok.)
454    
455    ** 2. The "cm" class now accepts an option "bind".  The option's value
456    is a sub-option list of precisely two items -- one labeled "anchor"
457    and the other one labeled "value".  As you might expect, "anchor" is
458    used to specify an anchor name to be bound, and "value" specifies what
459    the anchor is being bound to.
460    
461    The value must be a directory name and can be given in either standard
462    syntax (including the possibility that it is itself an anchored path)
463    or native syntax.
464    
465    Examples:
466    
467       foo.cm (bind:(anchor:bar value:$mystuff/bar))
468       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
469    
470    and so on.
471    
472    The meaning of this is that the .cm-file will be processed with an
473    augmented anchor environment where the given anchor(s) is/are bound to
474    the given values(s).
475    
476    The rationale for having this feature is this: Suppose you are trying
477    to use two different (already stable) libraries a.cm and b.cm (that
478    you perhaps didn't write yourself).  Further, suppose each of these
479    two libraries internally uses its own auxiliary library $aux/lib.cm.
480    Normally you would now have a problem because the anchor "lib" can not
481    be bound to more than one value globally.  Therefore, the project that
482    uses both a.cm and b.cm must locally redirect the anchor to some other
483    place:
484    
485       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
486       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
487    
488    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
489    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
490    
491    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
492    you when you do so at the time of CM.stabilize).  Therefore, you can
493    also use an anchored path as the value:
494    
495      a.cm (bind:(anchor:lib value:$a-lib))
496      b.cm (bind:(anchor:lib value:$b-lib))
497    
498    Now you can globally configure (using the usual CM.Anchor.anchor or
499    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
500    itself is always locally bound, setting it globally is no longer
501    meaningful or necessary (but it does not hurt either).  In fact, "lib"
502    can still be used as a global anchor for separate purposes.  As a
503    matter of fact, one can locally define "lib" in terms of a global
504    "lib":
505    
506      a.cm (bind:(anchor:lib value:$lib/a))
507      b.cm (bind:(anchor:lib value:$lib/b))
508    
509    ** 3: The encoding of path names has changed.  This affects the way
510    path names are shown in CM's progress report and also the internal
511    protocol encoding used for parallel make.
512    
513    The encoding now uses one or more ':'-separated segments.  Each
514    segments corresponds to a file that has been specified relative to the
515    file given by its preceding segment.  The first segment is either
516    relative to the CWD, absolute, or anchored.  Each segment itself is
517    basically a Unix pathname; all segments but the first are relative.
518    
519    Example:
520    
521       $foo/bar/baz.cm:a/b/c.sml
522    
523    This path denotes the file bar/a/b/c.sml relative to the directory
524    denoted by anchor "foo".  Notice that the encoding also includes
525    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
526    paths are resolved relative to the .cm-files directory, so baz.cm must
527    be ignored to get the "real" pathname.
528    
529    To make this fact more obvious, CM puts the names of such "virtual
530    arcs" into parentheses when they appear in progress reports. (No
531    parentheses will appear in the internal protocol encoding.)  Thus,
532    what you really see is:
533    
534      $foo/bar/(baz.cm):a/b/c.sml
535    
536    I find this notation to be much more informative than before.
537    
538    Another new feature of the encoding is that special characters
539    including parentheses, colons, (back)slashes, and white space are
540    written as \ddd (where ddd is the decimal encoding of the character).
541    
542    *** The CM manual still needs to be updated.
543    
544    ----------------------------------------------------------------------
545    Name: Allen Leung
546    Date: 2000/06/15 00:38:00
547    Tag: leunga-20000615-x86-peephole
548    
549    x86 Peephole fix by Fermin.  Affects c-- and moby only.
550    
551    ----------------------------------------------------------------------
552    Name: Matthias Blume
553    Date: 2000/06/12 11:40:00
554    Tag: blume-20000612-parmakefix
555    Description:
556    
557    More cleanup after changing the file naming scheme: This time I
558    repaired the parallel make mechanism for CMB.make which I broke earlier.
559    
560    ----------------------------------------------------------------------
561    Name: Allen Leung
562    Date: 2000/06/09 01:25:00
563    Tag: leunga-20000609-various
564    
565    None of these things should affect normal SML/NJ operations
566    
567    1. Peephole improvements provided by Fermin (c--)
568    2. New annotation DEFUSE for adding extra dependence (moby)
569    3. New X86 LOCK instructions (moby)
570    4. New machine description language for reservation tables (scheduling)
571    5. Fixes to various optimization/analysis modules (branch chaining, dominator
572       trees etc.)
573    6. I've changed the CM files so that they can work with versions
574       110.0.6, 110.25 and 110.28
575    
576    ----------------------------------------------------------------------
577    Name: Matthias Blume
578    Date: 2000/06/09 12:40:00
579    Tag: blume-20000609-log
580    Description:
581    
582    - Removed all(?) remaining RCS Log entries from sources.
583    
584    - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
585      anchored paths).
586    
587    ----------------------------------------------------------------------
588    Name: Matthias Blume
589    Date: 2000/06/07 17:00:00 JST
590    Tag: blume-20000607-no-implicit-anchors
591    Description:
592    
593    1. This update changes the default setting for
594    CM.Control.implicit_anchors from true to false.  This means that
595    implicit anchors are no longer permitted by default.  I also tried to
596    make sure that nothing else still relies on implicit anchors.
597    (This is the next step on the schedule towards a CM that does not even
598    have the notion of implicit anchors anymore.)
599    
600    2. More CM manual updates.
601    
602    3. I managed to track down and fix the pickling bug I mentioned last
603    time.  Because of the previously existing workaround, this entails no
604    immediate practical changes.
605    
606    ----------------------------------------------------------------------
607    Name: Matthias Blume
608    Date: 2000/06/06 11:15:00 JST
609    Tag: blume-20000606-lazierpickle
610    Description:
611    
612    !!!! NEW BOOT FILES !!!!
613    
614    * The main purpose of this update is to make library pickles lazier in
615    order to reduce the initial space penalty for autoloading a library.
616    As a result, it is now possible to have $smlnj/compiler.cm
617    pre-registered.  This should take care of the many complaints or
618    inquiries about missing structure Compiler.  This required changes to
619    CM's internal data structures and small tweaks to some algorithms.
620    
621    As a neat additional effect, it is no longer necessary (for the sake
622    of lean heap image files) to distinguish between a "minimal" CM and a
623    "full" CM.  Now, there is only one CM (i.e., the "full" version:
624    $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
625    interactive top level. ($smlnj/cm/minimal.cm is gone.)
626    
627    To make the life of compiler-hackers easier, "makeml" now also
628    pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm).  In other
629    words, after you bootstrap a new sml for the first time, you will not
630    have to autoload $smlnj/cmb.cm again afterwards.  (The first time
631    around you will still have to do it, though.)
632    
633    * A second change consists of major updates to the CM manual.  There
634    are now several appendices with summary information and also a full
635    specification of the CM description file syntax.
636    
637    * In directory src/system I added the script "allcross".  This script
638    invokes sml and cross-compiles the compiler for all supported
639    architectures.  (Useful when providing a new set of boot files.)
640    
641    * There seems to be a latent bug in my "lazy pickles" mechanism.  I
642    added a small tweak to pickle-util.sml to work around this problem,
643    but it is not a proper fix yet.  I will investigate further.  (The
644    effect of the bug was an inflation of library pickle size.)
645    
646    * Version number increased to 110.28.1 (to avoid compatibility problems).
647    
648    ----------------------------------------------------------------------
649    Name: Allen Leung
650    Date: 2000/05/25 17:28 EDT
651    Tag: leunga-20000525-ra
652    Description:
653    
654      Fixed a bug in freezing phase of the register allocator.
655    
656    ----------------------------------------------------------------------
657    Name: Allen Leung
658    Date: 2000/05/15 22:53 EDT
659    Tag: leunga-20000515-alpha-x86-ra
660    Description:
661    
662      1. Alpha
663    
664          Slight cleanup.  Removed the instruction SGNXL
665    
666      2. X86
667    
668          Added the following instructions to the instruction set:
669    
670            ROLx, RORx,
671            BTx, BTSx, BTLx, BTRx,
672            XCHGx, and variants with the LOCK prefix
673    
674      3. Register Allocation
675    
676          The module ra-rewrite-with-renaming has been improved.
677    
678      These have no effect on SML/NJ.
679    
680    ----------------------------------------------------------------------
681    Name: Matthias Blume
682    Date: 2000/05/15 16:20:00 JST
683    Tag: blume-20000515-lightrebuild
684    Description:
685    
686    1. I added an alternative to "-rebuild" to "makeml".  The difference is
687       that prior to calling CMB.make' the CM-variable "LIGHT" will be
688       defined.  In effect, the command will not build any cross-compiler
689       backends and therefore finish more quickly.
690    
691       The "fixpt" script also takes a "-light" switch to be able to use
692       this new facility while compiling for a fixpoint.
693    
694    2. I replaced all mentions of anchored paths in group owner specifications
695       with simple relative paths (usually starting with "..").
696       The rationale is that a library's internal workings should not be
697       compromised by the lack of some anchor.  (An anchor is necessary
698       for someone who wants to refer to the library by an anchored path,
699       but it should not be necessary to build the same library in the first
700       place.)
701    
702    3. I changed the way CM's tool mechanism determines the shell command
703       string used for things like ml-yacc etc. so that it does not break
704       when CM.Control.implicit_anchors is turned off.
705    
706    ----------------------------------------------------------------------
707    Name: Matthias Blume
708    Date: 2000/05/12 18:20:00 JST
709    Tag: blume-20000512-ml-build
710    Description:
711    
712    Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
713    getting installed properly (by config/install.sh).
714    
715    ----------------------------------------------------------------------
716    Name: Matthias Blume
717    Date: 2000/05/12 17:30:00 JST
718    Tag: blume-20000512-anchors
719    Description:
720    
721    !!! NEW BOOT FILES !!!
722    
723    This change is in preparation of fading out support for "implicitly
724    anchored path names".  I went through all sources and used the
725    explicit (and relatively new) $-notation.  See system/README and the
726    CM manual for more info on this.
727    
728    I also modified the anchoring scheme for some things such as "smlnj",
729    "MLRISC", "cm", etc. to take advantage of the fact that explicit
730    anchors are more expressive: anchor name and first arc do not have to
731    coincide.  This entails the following user-visible change:
732    
733    You have to write $smlnj/foo/bar instead of smlnj/foo/bar.  In
734    particular, when you fire up sml with a command-line argument, say,
735    e.g.:
736    
737       sml '$smlnj/cmb.cm'
738    
739    At the ML toplevel prompt:
740    
741       CM.autoload "$smlnj/cmb.cm";
742    
743    There is also a new controller in CM.Control that can be used to turn
744    off all remaining support for implicit anchors by saying:
745    
746        CM.autoload "$smlnj/
747        #set CM.Control.implicit_anchors false;
748    
749    This causes CM to reject implicitly anchored paths.  This is (for the
750    time being) less permissive than the "final" version where there will
751    be no more such implicit anchors and relative paths will be just that:
752    relative.
753    
754    The next step (version after next version?) will be to make the
755    default for CM.Control.implicit_anchors false.  After the dust has
756    settled, I can then produce the "final" version of this...
757    
758    Note: Since bootstrapping is a bit tricky, I provided new boot files.
759    
760    ----------------------------------------------------------------------
761    Name: Matthias Blume
762    Date: 2000/05/11 16:30:00 JST
763    Tag: blume-20000511-sources
764    Description:
765    
766    The main change is that I added function CM.sources as a generalized
767    version of the earlier CM.makedepend.  This entails the following
768    additional changes:
769    
770      - CM.makedepend has been dropped.
771    
772      - CM manual has been updated.
773    
774      - TOOLS signature and API have been changed.
775    
776    ----------------------------------------------------------------------
777    Name: Allen Leung
778    Date: 2000/05/10 21:17 EDT
779    Tag: leunga-20000510-moby-c--ssa
780    Description:
781    
782      Various bug fixes and new features for C--, Moby and MLRISC optimizations.
783    None of these affect SML/NJ.
784    
785    1. Register Allocation
786    
787        a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
788           This module tries to remove local (i.e. basic block level) redundancies
789           during spilling.
790    
791        b. A new framework for performing region based register allocation.
792           Not yet entirely functional.
793    
794    2. X86
795    
796       a. DefUse for POP was missing the stack pointer [found by Lal]
797       b. Reload for CALL was incorrect in X86Spill [found by John]
798       c. Various fixes in X86Spill so that it can be used correctly for
799          the new spilling module.
800    
801    3. SSA/IR
802    
803       a. New module ir/dj-dataflow.sml implements elimination based
804          data flow analysis.
805    
806    4. MLRiscGen
807    
808       a. Fix for gc type annotation
809    
810    5. MDGen
811    
812       Various fixes for machine description -> ml code translation.  For ssa
813       only.
814    
815    ----------------------------------------------------------------------
816    Name: Allen Leung
817    Date: 2000/05/08 22:17 EDT
818    Tag: leunga-20000508-labexp
819    Description:
820    
821      Fermin has found a few assembly problems with constant expressions
822      generated in LabelExp.  Mostly, the problems involve extra parentheses,
823      which choke on dumb assemblers.  This is his fix.
824    
825    ----------------------------------------------------------------------
826    Name: Dave MacQueen
827    Date: 2000/04/09 14:00 EDT
828    Tag: dbm-20000502-Version_110_28
829    Description:
830    
831    1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
832    
833    2. Updated config/version to 110.28
834    
835    3. Updated config/srcarchiveurl
836    
837    3. New boot files!
838       ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
839    
840    ----------------------------------------------------------------------
841    Name: Matthias Blume
842    Date: 2000/05/01 19:05:00 JST
843    Tag: blume-20000501-noweb
844    Description:
845    
846    A new noweb tool has been added.  The existing system is entirely
847    unaffected by this, but some CM users have asked for renewed noweb
848    support.  Everything is documented in the CM manual.
849    
850    New (plugin) libraries:
851    
852       noweb-tool.cm
853       nw-ext.cm
854    
855    ----------------------------------------------------------------------
856    Name: Dave MacQueen
857    Date: 2000/04/30 12:40PM EDT
858    Tag: dbm-20000430-bug_fixes
859    Description:
860    
861    1. Fix for bug 1498
862       smlnj/src/system/Basis/Implementation/Unsafe/object.sig
863       smlnj/src/system/Basis/Implementation/Unsafe/object.sml
864         added toRealArray function
865       smlnj/src/compiler/MiscUtil/print/ppobj.sml
866         added check for tag Obj.RealArray to array printing case in ppObj
867    
868    2. Fix for bug 1510
869       smlnj/src/compiler/Semant/types/typesutil.sml
870         fixed definition of dummyargs (used by equalTycon) so that
871         dummy args are distinct types
872    
873    ----------------------------------------------------------------------
874    Name: Matthias Blume
875    Date: 2000/04/30 01:00:00 JST
876    Tag: blume-20000430-versions
877    Description:
878    
879    1. CM version numbering added.  This is an implementation of Lal's
880       proposal for adding version numbers and version checking to .cm
881       files.  Lal said that his proposal was just that -- a proposal.
882       For the time being I went ahead and implemented it so that people
883       can comment on it.  Everything is completely backward-compatible
884       (except for the stable library format, i.e., new bootfiles!).
885    
886       As usual, see the CM manual for details.
887    
888    2. An alternative syntax for anchored paths has been implemented.
889       Dave has recently voiced the same concerns that I had when I did
890       this, so there should be some support.  My take is that eventually
891       I will let support for the current syntax (where anchors are
892       "implicit") fade out in favor of the new, explicit syntax.
893       In order to be backward-compatible, both old and new syntax are
894       currently supported.
895    
896       Again, see the CM manual for details.
897    
898    3. Parallel make is trying to be slightly smarter:  When the master
899       process finds a "bottleneck", i.e., when there is only one
900       compilation unit that can be compiled and everybody else is
901       waiting on it, then it will simply compile it directly instead
902       of clumsily telling one of the slaves to do it.
903    
904    4. Support for "unsharing" added.  This is necessary in order to be
905       able to have two different versions of the same library running
906       at the same time (e.g., for trying out a new MLRISC while still
907       having the old MLRISC linked into the current compiler, etc.)
908       See the CM manual.
909    
910    5. Simple "makedepend" functionality added for generating Makefile
911       dependency information.  (This is rather crude at the moment.
912       Expect some changes here in the future.)
913    
914    6. ".fun" added as a recognized suffix for ML files. Also documented
915       explicitly in the manual that the fallback behavior (unknown suffix
916       -> ML file) is not an official feature!
917    
918    7. Small changes to the pickler for stable libraries.
919    
920    8. Several internal changes to CM (for cleanup/improvement).
921    
922    
923    !!!! NEW BINFILES !!!!
924    
925    ----------------------------------------------------------------------
926    Name: Matthias Blume
927    Date: 2000/04/28 17:30:00 JST
928    Tag: blume-20000428-pathconfig
929    Description:
930    
931    1. I changed config/install.sh to remove duplicate entries from the
932       lib/pathconfig file at the end.  Moreover, the final version of
933       lib/pathconfig is sorted alphabetically.  The same (sorting) is done
934       in src/system/installml.
935    
936    2. The config/install.sh script now consistently uses relative
937       pathnames in lib/pathconfig whenever the anchor is in the lib
938       directory.  (So far this was true for the libraries that come
939       pre-compiled and bundled as part of the bootfiles but not for
940       libraries that are compiled by the script itself.)
941    
942    ----------------------------------------------------------------------
943    Name: Matthias Blume
944    Date: 2000/04/26 13:10:00 JST
945    Tag: blume-20000426-fun_suffix
946    Description:
947    
948    Added ".fun" as a recognized file name suffix (for ML code).
949    
950    ----------------------------------------------------------------------
951    Name: Allen Leung
952    Date: 2000/04/25 17:00:00 EST
953    Tag: leunga-20000425-alpha-ra
954    Description:
955    
956    1. Alpha
957    
958        PSEUDOARITH was missing in AlphaRewrite.  This causes an endless loop
959    in C--.
960    
961    2. RA
962    
963       Added a flag "ra-dump-size" to print out the size of the flowgraph
964       and the interference graph.
965    
966    ----------------------------------------------------------------------
967    Name: Dave MacQueen
968    Date: 2000/04/25/
969    Tag: dbm-20000425-mlyacc_doc_examples
970    Description:
971      Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
972      Updated all three examples in src/ml-yacc/examples to run
973      under 110.* using CM.make.
974    
975    ----------------------------------------------------------------------
976    Name: Allen Leung
977    Date: 2000/04/20 23:04:00 EST
978    Tag: leunga-20000420-ssa-c---stuff
979    Description:
980    
981      This update synchronizes my repository with Yale's.  Most of these
982    changes, however, do not affect SML/NJ at all (the RA is an exception).
983    
984    1. Register Allocator
985    
986       a. An improvement in the interference graph construction:
987          Given a copy
988    
989                s <- t
990    
991          no interference edge between s and t is added for this definition of s.
992    
993       b. I've added two new spill heuristic modules that Fermin and I developed
994          (in the new library RA.cm). These are unused in SML/NJ but maybe
995          useful for others (Moby?)
996    
997    2. X86
998    
999       a. Various fixes in the backend provided by Fermin [C--] and Lal.
1000    
1001    3. Alpha
1002    
1003       a. Added the BSR instruction and code generation that goes with it [C--]
1004       b. Other fixes too numerous to recount provided by Fermin [C--]
1005    
1006    4. Regmaps
1007    
1008       a. The regmaps are not initialized with the identity physical bindings
1009          at creation time.  This is unneeded.
1010    
1011    5. MLRISC Optimizations
1012    
1013       a. The DJ-Graph module can now compute the iterated dominance frontiers
1014          intersects with liveness incrementally in linear time! Woohoo!
1015          This is now used in my new SSA construction algorithm.
1016    
1017       b. THe branch reorganization module is now smarter about linear chains of
1018          basic blocks.
1019    
1020    
1021    ----------------------------------------------------------------------
1022    Name: Matthias Blume
1023    Date: 2000/04/12 13:52:00 JST
1024    Tag: blume_main_v110p27_1
1025    Description:
1026    
1027    Changed install.sh script to handle archive files without version number
1028    and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
1029    name of the boot file archive.
1030    
1031    ----------------------------------------------------------------------
1032    Name: Dave MacQueen
1033    Date: 2000/04/09 14:00 EDT
1034    Tag: dbm-20000410-Version_110_27
1035    Description:
1036    
1037    1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
1038    
1039    2. Updated src/config/version to 110.27
1040    
1041    3. New boot files!
1042    
1043    ----------------------------------------------------------------------
1044    Name: Allen Leung
1045    Date: 2000/04/09 19:09:00 EST
1046    Tag: leunga-20000409-misc
1047    Description:
1048    
1049    1.  Yet another fix for x86 assembly for idivl, imull, mull and friends.
1050    
1051    2.  Miscellaneous improvements to MLRISC (unused in sml/nj)
1052    
1053    ----------------------------------------------------------------------
1054    Name: Stefan
1055    Date: 2000/04/07 10:00:00 EDT
1056    Tag: monnier-20000406-branch-handling
1057    Description:
1058    
1059    Improved handling of branches (mostly those generated from
1060    polymorphic equality), removed switchoff and changed the
1061    default optimization settings (more cpsopt and less flintopt).
1062    
1063    ----------------------------------------------------------------------
1064    Name: Allen Leung
1065    Date: 2000/04/06 01:30:00 EST
1066    Tag: leunga-20000406-peephole-x86-SSA-2
1067    Description:
1068    
1069       Forgot a few files.
1070    
1071    ----------------------------------------------------------------------
1072    Name: Allen Leung
1073    Date: 2000/04/06 00:36:00 EST
1074    Tag: leunga-20000406-peephole-x86-SSA
1075    Description:
1076    
1077    1.  New Peephole code
1078    
1079    2.  Minor improvement to X86 instruction selection
1080    
1081    3.  Various fixes to SSA and machine description -> code translator
1082    
1083    ----------------------------------------------------------------------
1084    Name: Matthias Blume
1085    Date: 2000/04/05 12:30:00 JST
1086    Tag: blume_main_v110p26p2_3
1087    Description:
1088    
1089    This update just merges three minor cosmetic updates to CM's sources
1090    to get ready for the 110.27 code freeze on Friday.  No functionality
1091    has changed.
1092    
1093    ----------------------------------------------------------------------
1094    Name: Allen Leung
1095    Date: 2000/04/04 19:39:00 EST
1096    Tag: leunga-20000404-x86-asm
1097    Description:
1098    
1099    1.  Fixed a problem in X86 assembly.
1100    
1101        Things like
1102    
1103           jmp %eax
1104           jmp (%eax)
1105    
1106        should be output as
1107    
1108           jmp *%eax
1109           jmp *(%eax)
1110    
1111    2.  Assembly output
1112    
1113          Added a new flag
1114    
1115              "asm-indent-copies" (default to false)
1116    
1117          When this flag is on, parallel copies will be indented an extra level.
1118    
1119    ----------------------------------------------------------------------
1120    Name: Allen Leung
1121    Date: 2000/04/04 03:18:00 EST
1122    Tag: leunga-20000404-C--Moby
1123    Description:
1124    
1125        All of these fixes are related to C--, Moby, and my own optimization
1126        stuff; so they shouldn't affect SML/NJ.
1127    
1128    1.  X86
1129    
1130        Various fixes related floating point, and extensions.
1131    
1132    2.  Alpha
1133    
1134        Some extra patterns related to loads with signed/zero extension
1135        provided by Fermin.
1136    
1137    3.  Assembly
1138    
1139        When generating assembly, resolve the value of client defined constants,
1140        instead of generating symbolic values.  This is controlled by the
1141        new flag "asm-resolve-constants", which is default to true.
1142    
1143    4.  Machine Descriptions
1144    
1145        a. The precedence parser was slightly broken when parsing infixr symbols.
1146        b. The type generalizing code had the bound variables reversed, resulting
1147           in a problem during arity raising.
1148        c. Various fixes in machine descriptions.
1149    
1150    ----------------------------------------------------------------------
1151    Name: Matthias Blume
1152    Date: 2000/04/03 16:05:00 JST
1153    Tag: blume_main_v110p26p2_2
1154    Description:
1155    
1156    I eliminated coreEnv from compInfo.  Access to the "Core" structure is
1157    now done via the ordinary static environment that is context to each
1158    compilation unit.
1159    
1160    To this end, I arranged that instead of "structure Core" as "structure
1161    _Core" is bound in the pervasive environment.  Core access is done via
1162    _Core (which can never be accidentally rebound because _Core is not a
1163    legal surface-syntax symbol).
1164    
1165    The current solution is much cleaner because the core environment is
1166    now simply part of the pervasive environment which is part of every
1167    compilation unit's context anyway.  In particular, this eliminates all
1168    special-case handling that was necessary until now in order to deal
1169    with dynamic and symbolic parts of the core environment.
1170    
1171    Remaining hackery (to bind the "magic" symbol _Core) is localized in the
1172    compilation manager's bootstrap compiler (actually: in the "init group"
1173    handling).  See the comments in src/system/smlnj/init/init.cmi for
1174    more details.
1175    
1176    I also tried to track down all mentions of "Core" (as string argument
1177    to Symbol.strSymbol) in the compiler and replaced them with a
1178    reference to the new CoreSym.coreSym.  Seems cleaner since the actual
1179    name appears in one place only.
1180    
1181    Binfile and bootfile format have not changed, but the switchover from
1182    the old "init.cmi" to the new one is a bit tricky, so I supplied new
1183    bootfiles anyway.
1184    
1185    ----------------------------------------------------------------------
1186    Name: Allen Leung
1187    Date: 2000/04/02 21:17:00 EST
1188    Tag: leunga-20000402-mltree
1189    Description:
1190    
1191       1. Renamed the constructor CALL in MLTREE by popular demand.
1192       2. Added a bunch of files from my repository.  These are currently
1193          used by other non-SMLNJ backends.
1194    
1195    ----------------------------------------------------------------------
1196    Name: Allen Leung
1197    Date: 2000/03/31 21:15:00 EST
1198    Tag: leunga-20000331-aliasing
1199    Description:
1200    
1201    This update contains a rewritten (and hopefully more correct) module
1202    for extracting aliasing information from CPS.
1203    
1204       To turn on this feature:
1205    
1206            Compiler.Control.CG.memDisambiguate := true
1207    
1208       To pretty print the region information with assembly
1209    
1210           Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
1211    
1212       To control how many levels of aliasing information are printed, use:
1213    
1214           Compiler.Control.MLRISC.getInt "points-to-show-level" := n
1215    
1216       The default of n is 3.
1217    
1218    ----------------------------------------------------------------------
1219    Name: David MacQueen
1220    Date: 2000/03/31 11:15:00 EST
1221    Tag: dbm-20000331-runtime_fix
1222    Description:
1223    
1224    This update contains:
1225    
1226    1. runtime/c-lib/c-libraries.c
1227       includes added in revision 1.2 caused compilation errors on hppa-hpux
1228    
1229    2. fix for bug 1556
1230       system/Basis/Implementation/NJ/internal-signals.sml
1231    
1232    ----------------------------------------------------------------------
1233    Name: Matthias Blume
1234    Date: 2000/03/31 18:00:00 JST
1235    Tag: blume_main_v110p26p2_1
1236    Description:
1237    
1238    This update contains:
1239    
1240    1. A small change to CM's handling of stable libraries:
1241       CM now maintains one "global" modmap that is used for all stable
1242       libraries.  The use of such a global modmap maximizes sharing and
1243       minimizes the need for re-traversing parts of environments during
1244       modmap construction.  (However, this has minor impact since modmap
1245       construction seems to account for just one percent or less of total
1246       compile time.)
1247    
1248    2. I added a "genmap" phase to the statistics.  This is where I got the
1249       "one percent" number (see above).
1250    
1251    3. CM's new tool parameter mechanism just became _even_ better. :)
1252       - The parser understands named parameters and recursive options.
1253       - The "make" and "shell" tools use these new features.
1254         (This makes it a lot easier to cascade these tools.)
1255       - There is a small syntax change: named parameters use a
1256    
1257           <name> : ( <option> ... )            or
1258           <name> : <string>
1259    
1260         syntax.  Previously, named parameters were implemented in an
1261         ad-hoc fashion by each tool individually (by parsing strings)
1262         and had the form
1263    
1264           <name>=<string>
1265    
1266       See the CM manual for a full description of these issues.
1267    
1268    ----------------------------------------------------------------------
1269    Name: Matthias Blume
1270    Date: 2000/03/30 18:00:00 JST
1271    Tag: blume_main_v110p26p2_0
1272    Description:
1273    
1274    !!!!! WARNING !!!!!!
1275    !!  New binfiles  !!
1276    !!!!!!!!!!!!!!!!!!!!
1277    
1278    This update contains:
1279    
1280    1. Moderate changes to CM:
1281    
1282       - Changes to CM's tools mechanism.  In particular, it is now possible
1283       to have tools that accept additional "command line" parameters
1284       (specified in the .cm file at each instance where the tool's class is
1285       used).
1286    
1287       This was done to accommodate the new "make" and "shell" tools which
1288       facilitate fairly seamless hookup to portions of code managed using
1289       Makefiles or Shell scripts.
1290    
1291       There are no classes "shared" or "private" anymore.  Instead, the
1292       sharing annotation is now a parameter to the "sml" class.
1293    
1294       There is a bit of generic machinery for implementing one's own
1295       tools that accept command-line parameters.  However, I am not yet fully
1296       satisfied with that part, so expect changes here in the future.
1297    
1298       All existing tools are described in the CM manual.
1299    
1300       - Slightly better error handling.  (CM now suppresses many followup
1301       error messages that tended to be more annoying than helpful.)
1302    
1303    2. Major changes to the compiler's static environment data structures.
1304    
1305       - no CMStaticEnv anymore.
1306            - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
1307              but it is called Environment), no conversions between different
1308              kinds of static environments
1309    
1310       - There is still a notion of a "modmap", but such modmaps are generated
1311         on demand at the time when they are needed.  This sounds slow, but I
1312         sped up the code that generates modmaps enough for this not to lead to
1313         a slowdown of the compiler (at least I didn't detect any).
1314    
1315       - To facilitate rapid modmap generation, static environments now
1316         contain an (optional) "modtree" structure.  Modtree annotations are
1317         constructed by the unpickler during unpickling.  (This means that
1318         the elaborator does not have to worry about modtrees at all.)
1319         Modtrees have the advantage that they are compositional in the same
1320         way as the environment data structure itself is compositional.
1321         As a result, modtrees never hang on to parts of an environment that
1322         has already been rendered "stale" by filtering or rebinding.
1323    
1324       - I went through many, many trials and errors before arriving at the
1325         current solution.  (The initial idea of "linkpaths" did not work.)
1326         But the result of all this is that I have touched a lot of files that
1327         depend on the "modules" and "types" data structures (most of the
1328         elaborator). There were a lot of changes during my "linkpath" trials
1329         that could have been reverted to their original state but weren't.
1330         Please, don't be too harsh on me for messing with this code a bit more
1331         than what was strictly necessary...  (I _did_ resist the tempation
1332         of doing any "global reformatting" to avoid an untimely death at
1333         Dave's hands. :)
1334    
1335       - One positive aspect of the previous point:  At least I made sure that
1336         all files that I touched now compile without warnings (other than
1337         "polyEqual").
1338    
1339       - compiler now tends to run "leaner" (i.e., ties up less memory in
1340         redundant modmaps)
1341    
1342    ----------------------------------------------------------------------
1343    Name: Allen Leung
1344    Date: 2000/03/29 18:00:00
1345    Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
1346    Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
1347    Description:
1348    
1349       This update contains *MAJOR* changes to the way code is generated from CPS
1350    in the module mlriscGen, and in various backend modules.
1351    
1352    CHANGES
1353    =======
1354    
1355    1. MLRiscGen: forward propagation fix.
1356    
1357       There was a bug in forward propagation introduced at about the same time
1358       as the MLRISC x86 backend, which prohibits coalescing to be
1359       performed effectively in loops.
1360    
1361       Effect: speed up of loops in RISC architectures.
1362               By itself, this actually slowed down certain benchmarks on the x86.
1363    
1364    2. MLRiscGen:  forward propagating addresses from consing.
1365    
1366       I've changed the way consing code is generated.  Basically I separated
1367       out the initialization part:
1368    
1369            store tag,   offset(allocptr)
1370            store elem1, offset+4(allocptr)
1371            store elem2, offset+8(allocptr)
1372            ...
1373            store elemn, offset+4n(allocptr)
1374    
1375       and the address computation part:
1376    
1377            celladdr <- offset+4+alloctpr
1378    
1379       and move the address computation part
1380    
1381       Effect:  register pressure is generally lower as a result.  This
1382                makes compilation of certain expressions much faster, such as
1383                long lists with non-trivial elements.
1384    
1385                 [(0,0), (0,0), .... (0,0)]
1386    
1387    3. MLRiscGen: base pointer elimination.
1388    
1389        As part of the linkage mechanism, we generate the sequence:
1390    
1391         L:  ...  <- start of the code fragment
1392    
1393         L1:
1394             base pointer <- linkreg - L1 + L
1395    
1396         The base pointer was then used for computing relocatable addresses
1397       in the code fragment.  Frequently (such as in lots of continuations)
1398       this is not needed.  We now eliminate this sequence whenever possible.
1399    
1400         For compile time efficiency, I'm using a very stupid local heuristic.
1401       But in general, this should be done as a control flow analysis.
1402    
1403       Effect:  Smaller code size.  Speed up of most programs.
1404    
1405    4. Hppa back end
1406    
1407         Long jumps in span dependence resolution used to depend on the existence
1408      of the base pointer.
1409    
1410         A jump to a long label L was expanded into the following sequence:
1411    
1412          LDIL %hi(L-8192), %r29
1413          LDO  %lo(L-8192)(%r29), %r29
1414          ADD  %r29, baseptr, %r29
1415          BV,n %r0(%r29)
1416    
1417         In the presence of change (3) above, this will not work.  I've changed
1418       it so that the following sequence of instructions are generated, which
1419       doesn't mention the base pointer at all:
1420    
1421             BL,n  L', %r29           /* branch and link, L' + 4 -> %r29 */
1422        L':  ADDIL L-(L'+4), %r29     /* Compute address of L */
1423             BV,n  %r0(%r29)          /* Jump */
1424    
1425    5. Alpha back end
1426    
1427          New alpha instructions LDB/LDW have been added, as per Fermin's
1428       suggestions.   This is unrelated to all other changes.
1429    
1430    6. X86 back end
1431    
1432         I've changed andl to testl in the floating point test sequence
1433         whenever appropriate.  The Intel optimization guide states that
1434         testl is preferable to andl.
1435    
1436    7. RA (x86 only)
1437    
1438         I've improved the spill propagation algorithm, using an approximation
1439       of maximal weighted independent sets.   This seems to be necessary to
1440       alleviate the negative effect in light of the slow down in (1).
1441    
1442         I'll write down the algorithm one of these days.
1443    
1444    8. MLRiscGen: frequencies
1445    
1446         I've added an annotation that states that all call gc blocks have zero
1447       execution frequencies.  This improves register allocation on the x86.
1448    
1449    BENCHMARKS
1450    ==========
1451    
1452       I've only perform the comparison on 110.25.
1453    
1454       The platforms are:
1455    
1456        HPPA  A four processor HP machine (E9000) with 5G of memory.
1457        X86   A 300Hhz Pentium II with 128M of memory, and
1458        SPARC An Ultra sparc 2 with 512M of memory.
1459    
1460       I used the following parameters for the SML benchmarks:
1461    
1462                 @SMLalloc
1463         HPPA    256k
1464         SPARC   512k
1465         X86     256k
1466    
1467    COMPILATION TIME
1468    ----------------
1469       Here are the numbers comparing the compilation times of the compilers.
1470       I've only compared 110.25 compiling the new sources versus
1471       a fixpoint version of the new compiler compiling the same.
1472    
1473                     110.25                                  New
1474               Total  Time in RA  Spill+Reload   Total  Time In RA Spill+Reload
1475         HPPA   627s    116s        2684+3584     599s    95s       1003+1879
1476         SPARC  892s    173s        2891+3870     708s    116s      1004+1880
1477         X86    999s    315s       94006+130691   987s    296s    108877+141957
1478    
1479                   110.25         New
1480                Code Size      Code Size
1481         HPPA   8596736         8561421
1482         SPARC  8974299         8785143
1483         X86    9029180         8716783
1484    
1485       So in summary, things are at least as good as before.   Dramatic
1486       reduction in compilation is obtained on the Sparc; I can't explain it,
1487       but it is reproducible.  Perhaps someone should try to reproduce this
1488       on their own machines.
1489    
1490    SML BENCHMARKS
1491    --------------
1492    
1493        On the average, all benchmarks perform at least as well as before.
1494    
1495          HPPA         Compilation Time     Spill+Reload      Run Time
1496                     110.25  New            110.25    New   110.25  New
1497    
1498          barnesHut  3.158  3.015  4.75%    1+1       0+0   2.980  2.922   2.00%
1499              boyer  6.152  5.708  7.77%    0+0       0+0   0.218  0.213   2.34%
1500       count-graphs  1.168  1.120  4.32%    0+0       0+0  22.705 23.073  -1.60%
1501                fft  0.877  0.792 10.74%    1+3       1+3   0.602  0.587   2.56%
1502        knuthBendix  3.180  2.857 11.32%    0+0       0+0   0.675  0.662   2.02%
1503             lexgen  6.190  5.290 17.01%    0+0       0+0   0.913  0.788  15.86%
1504               life  0.803  0.703 14.22%   25+25      0+0   0.153  0.140   9.52%
1505              logic  2.048  2.007  2.08%    6+6       1+1   4.133  4.008   3.12%
1506         mandelbrot  0.077  0.080 -4.17%    0+0       0+0   0.765  0.712   7.49%
1507             mlyacc 22.932 20.937  9.53%  154+181    32+57  0.468  0.430   8.91%
1508            nucleic  5.183  5.060  2.44%    2+2       0+0   0.125  0.120   4.17%
1509      ratio-regions  3.357  3.142  6.84%    0+0       0+0  116.225 113.173 2.70%
1510                ray  1.283  1.290 -0.52%    0+0       0+0   2.887  2.855   1.11%
1511             simple  6.307  6.032  4.56%   28+30      5+7   3.705  3.658   1.28%
1512                tsp  0.888  0.862  3.09%    0+0       0+0   7.040  6.893   2.13%
1513               vliw 24.378 23.455  3.94%  106+127    25+45  2.758  2.707   1.91%
1514      --------------------------------------------------------------------------
1515       Average                     6.12%                                   4.09%
1516    
1517          SPARC        Compilation Time     Spill+Reload      Run Time
1518                     110.25  New            110.25    New   110.25  New
1519    
1520          barnesHut  3.778  3.592  5.20%    2+2       0+0   3.648  3.453    5.65%
1521              boyer  6.632  6.110  8.54%    0+0       0+0   0.258  0.242    6.90%
1522       count-graphs  1.435  1.325  8.30%    0+0       0+0  33.672 34.737   -3.07%
1523                fft  0.980  0.940  4.26%    3+9       2+6   0.838  0.827    1.41%
1524        knuthBendix  3.590  3.138 14.39%    0+0       0+0   0.962  0.967   -0.52%
1525             lexgen  6.593  6.072  8.59%    1+1       0+0   1.077  1.078   -0.15%
1526               life  0.972  0.868 11.90%   26+26      0+0   0.143  0.140    2.38%
1527              logic  2.525  2.387  5.80%    7+7       1+1   5.625  5.158    9.05%
1528         mandelbrot  0.090  0.093 -3.57%    0+0       0+0   0.855  0.728   17.39%
1529             mlyacc 26.732 23.827 12.19%  162+189    32+57  0.550  0.560   -1.79%
1530            nucleic  6.233  6.197  0.59%    3+3       0+0   0.163  0.173   -5.77%
1531      ratio-regions  3.780  3.507  7.79%    0+0       0+0 133.993 131.035   2.26%
1532                ray  1.595  1.550  2.90%    1+1       0+0   3.440  3.418    0.63%
1533             simple  6.972  6.487  7.48%   29+32      5+7   3.523  3.525   -0.05%
1534                tsp  1.115  1.063  4.86%    0+0       0+0   7.393  7.265    1.77%
1535               vliw 27.765 24.818 11.87%  110+135    25+45  2.265  2.135    6.09%
1536      ----------------------------------------------------------------------------
1537       Average                     6.94%                                    2.64%
1538    
1539          X86          Compilation Time     Spill+Reload      Run Time
1540                     110.25  New            110.25    New   110.25  New
1541    
1542          barnesHut  5.530  5.420  2.03%  593+893   597+915   3.532  3.440   2.66%
1543              boyer  8.768  7.747 13.19%  493+199   301+289   0.327  0.297  10.11%
1544       count-graphs  2.040  2.010  1.49%  298+394   315+457  26.578 28.660  -7.26%
1545                fft  1.327  1.302  1.92%  112+209   115+210   1.055  0.962   9.71%
1546        knuthBendix  5.218  5.475 -4.69%  451+598   510+650   0.928  0.932  -0.36%
1547             lexgen  9.970  9.623  3.60% 1014+841  1157+885   0.947  0.928   1.97%
1548               life  1.183  1.183  0.00%  162+182   145+148   0.127  0.103  22.58%
1549              logic  3.285  3.512 -6.45%  514+684   591+836   5.682  5.577   1.88%
1550         mandelbrot  0.147  0.143  2.33%   38+41     33+54    0.703  0.690   1.93%
1551             mlyacc 35.457 32.763  8.22% 3496+4564 3611+4860  0.552  0.550   0.30%
1552            nucleic  7.100  6.888  3.07%  239+168   201+158   0.175  0.173   0.96%
1553      ratio-regions  6.388  6.843 -6.65% 1182+257   981+300  120.142 120.345 -0.17%
1554                ray  2.332  2.338 -0.29%  346+398   402+494   3.593  3.540   1.51%
1555             simple  9.912  9.903  0.08% 1475+941  1579+1168  3.057  3.178  -3.83%
1556                tsp  1.623  1.532  5.98%  266+200   250+211   8.045  7.878   2.12%
1557               vliw 33.947 35.470 -4.29% 2629+2774 2877+3171  2.072  1.890   9.61%
1558      ----------------------------------------------------------------------------
1559       Average                     1.22%                                     3.36%
1560    
1561    ----------------------------------------------------------------------
1562    Name: Allen Leung
1563    Date: 2000/03/23 16:25:00
1564    Tag: leunga-20000323-fix_x86_alpha
1565    Description:
1566    
1567    1. X86 fixes/changes
1568    
1569       a.  The old code generated for SETcc was completely wrong.
1570           The Intel optimization guide is VERY misleading.
1571    
1572    2. ALPHA fixes/changes
1573    
1574       a.  Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
1575       b.  Added a new mode byteWordLoadStores to the functor parameter to Alpha()
1576       c.  Added reassociation code for address computation.
1577    
1578    ----------------------------------------------------------------------
1579  Name: Allen Leung  Name: Allen Leung
1580  Date: 2000/03/22 01:23:00  Date: 2000/03/22 01:23:00
1581  Tag: leunga-20000322-fix_x86_hppa_ra  Tag: leunga-20000322-fix_x86_hppa_ra
# Line 49  Line 1613 
1613    
1614  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
1615  additional argument called "template" which is an optional string that  additional argument called "template" which is an optional string that
1616  specifiel the layout of the tool command line.  See the CM manual for  specifies the layout of the tool command line.  See the CM manual for
1617  explanation.  explanation.
1618    
1619  2. A special-purpose tool can be "regisitered" by simply dropping the  2. A special-purpose tool can be "registered" by simply dropping the
1620  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
1621  directory where the .cm file lives that uses this tool.  (The  directory where the .cm file lives that uses this tool.  (The
1622  behavior/misfeature until now was to look for the tool description  behavior/misfeature until now was to look for the tool description
# Line 96  Line 1660 
1660  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
1661  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,
1662  they might be the result of an earlier partial run of fixpt (which  they might be the result of an earlier partial run of fixpt (which
1663  perhaps got accidentially killed).  In this case, fixpt will quickly  perhaps got accidentally killed).  In this case, fixpt will quickly
1664  move through what exists before continuing where it left off earlier,  move through what exists before continuing where it left off earlier,
1665  and, thus, saves a lot of time.  and, thus, saves a lot of time.
1666    
# Line 146  Line 1710 
1710    it from that remote directory.    it from that remote directory.
1711    This should simplify installation further:  For machines that have    This should simplify installation further:  For machines that have
1712    access to the internet, just fetch <version>-config.tgz, unpack it,    access to the internet, just fetch <version>-config.tgz, unpack it,
1713    edit config/targets, and go (run config/install.sh).  The scipt will    edit config/targets, and go (run config/install.sh).  The script will
1714    fetch everything else that it might need all by itself.    fetch everything else that it might need all by itself.
1715    
1716    For CVS users, this mechanism is not relevant for source archives, but    For CVS users, this mechanism is not relevant for source archives, but

Legend:
Removed from v.580  
changed lines
  Added in v.684

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