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

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