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 572, Thu Mar 9 02:43:06 2000 UTC revision 972, Sun Oct 28 00:37:02 2001 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Allen Leung
17    Date: 2001/10/27 20:34:00 EDT
18    Tag: leunga-20011027-x86-fast-fp-call
19    Description:
20    
21       Fixed the bug described in blume-20010920-slowfp.
22    
23       The fix involves
24          1. generating FCOPYs in FSTP in ia32-svid
25          2. marking a CALL with the appropriate annotation
26    
27    ----------------------------------------------------------------------
28    Name: Matthias Blume
29    Date: 2001/10/16 11:32:00 EDT
30    Tag: blume-20011016-netbsd
31    Description:
32    
33    Underscore patch from Chris Richards (fixing problem with compiling
34    runtime system under recent NetBSD).
35    
36    ----------------------------------------------------------------------
37    Name: Allen Leung
38    Date: 2001/10/12 17:18:32 EDT 2001
39    Tag: leung-20011012-x86-printflowgraph
40    Description:
41    
42    X86RA now uses a valid (instead of dummy) PrintFlowgraph module.
43    
44    ----------------------------------------------------------------------
45    Name: Lal George
46    Date: 2001/10/11 23:51:34 EDT
47    Tag: george-20011011-too-many-instrs
48    Description:
49    
50    The representation of a program point never expected to see more
51    than 65536 instructions in a basic block!
52    
53    ----------------------------------------------------------------------
54    Name: Lal George
55    Date: 2001/10/09 09:41:37 EDT
56    Tag: george-20011008-mlrisc-labels
57    Description:
58    
59    Changed the machine description files to support printing of
60    local and global labels in assembly code, based on host assembler
61    conventions.
62    
63    ----------------------------------------------------------------------
64    Name: Matthias Blume
65    Date: 2001/09/25 15:25:00 EDT
66    Tag: blume-20010925-exninfo
67    Description:
68    
69    I provided a non-hook implementation of exnName (at the toplevel) and
70    made the "dummy" implementation of exnMessage (at the toplevel) more
71    useful: if nothing gets "hooked in", then at least you are going to
72    see the exception name and a message indicating why you don't see more.
73    
74    [For the time being, programs that need exnMessage and want to use
75    ml-build should either use General.exnMessage (strongly recommended) or
76    refer to structure General at some other point so that CM sees a
77    static dependency.]
78    
79    [Similar remarks go for "print" and "use":  If you want to use their
80    functionality in stand-alone programs generated by ml-build, then use
81    TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).]
82    
83    ----------------------------------------------------------------------
84    Name: Matthias Blume
85    Date: 2001/09/20 17:28:00 EDT
86    Tag: blume-20010920-slowfp
87    Description:
88    
89    Allen says that x86-fast-fp is not safe yet, so I turned it off again...
90    
91    ----------------------------------------------------------------------
92    Name: Matthias Blume
93    Date: 2001/09/20 17:20:00 EDT
94    Tag: blume-20010920-canonicalpaths
95    Description:
96    
97    0. Updated the BOOT file (something that I forgot to do earlier).
98    
99    1. Small internal change to CM so that it avoids "/../" in filenames
100       as much as possible (but only where it is safe).
101    
102    2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so
103       that arguments that contain delimiters are passed through correctly.
104       This change also means that all "special" arguments of the form
105       @SMLxxx... must come first.
106    
107    3. Changed install script to put relative anchor names for tool commands
108       into pathconfig.
109    
110    ----------------------------------------------------------------------
111    Name: Matthias Blume
112    >>>>>>> 1.169
113    Date: 2001/09/18 15:35:00 EDT
114    Tag: blume-20010918-readme11036
115    Description:
116    
117    Added README files.
118    
119    ----------------------------------------------------------------------
120    Name: Matthias Blume
121    Date: 2001/09/18 11:45:00 EDT
122    Tag: Release_110_36 (retag)
123    Description:
124    
125    Fixed mistake in config/preloads. Retagged as 110.36.
126    
127    ----------------------------------------------------------------------
128    Name: Matthias Blume
129    Date: 2001/09/18 09:40:00 EDT
130    Tag: Release_110_36_orig (tag changed)
131    Description:
132    
133    New version (110.36).  New bootfiles.
134    
135    ----------------------------------------------------------------------
136    Name: Matthias Blume
137    Date: 2001/09/14 16:15:00 EDT
138    Tag: blume-20010914-x86fastfp
139    Description:
140    
141    John committed some changes that Allen made, in particular a (hopefully)
142    correctly working version of the x86-fp module.
143    
144    I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp"
145    flag to "true".  Everything seems to compile to a fixpoint ok, and
146    "mandelbrot" speeds up by about 15%.
147    
148    ----------------------------------------------------------------------
149    Name: Matthias Blume
150    Date: 2001/09/13 11:20:00 EDT
151    Tag: blume-20010913-minimal
152    Description:
153    
154    1. Stefan Monnier's patch to fix a miscompilation problem that
155       was brought to light by John Reppy's work on Moby.
156    
157    2. Implemented a minimal "structure Compiler" that contains just
158       "version" and "architecture".  The minimal version will be
159       available when the full version is not.  This is for backward-
160       compatibility with code that wants to test Compiler.version.
161    
162    ----------------------------------------------------------------------
163    Name: Matthias Blume
164    Date: 2001/08/28 14:03:00 EDT
165    Tag: blume-20010828-ml-lex
166    Description:
167    
168    Fix for bug 1581, received from Neophytos Michael.
169    
170    ----------------------------------------------------------------------
171    Name: Matthias Blume
172    Date: 2001/08/27 11:20:00 EDT
173    Tag: blume-20010827-readme11035
174    Description:
175    
176    Fleshed out the README file for 110.35.
177    
178    ----------------------------------------------------------------------
179    Name: Matthias Blume
180    Date: 2001/08/24 17:10:00 EDT
181    Tag: Release_110_35
182    Description:
183    
184    New version number (110.35).  New bootfiles.
185    
186    ----------------------------------------------------------------------
187    Name: Lal George
188    Date: 2001/08/24 13:47:18 EDT 2001
189    Tag: george-20010824-MLRISC-graphs
190    Description:
191    
192     removed clusters from MLRISC completely and replaced with graphs.
193    
194    ----------------------------------------------------------------------
195    Name: Matthias Blume
196    Date: 2001/08/23 17:50:00 EDT
197    Tag: blume-20010823-toplevel
198    Description:
199    
200    - some reorganization of the code that implements various kinds of
201      environments in the compiler (static, dynamic, symbolic, combined)
202    - re-implemented the EnvRef module so that evalStream works properly
203      (if the stream contains references to "use", "CM.make", etc.)
204    - cleaned up evalloop.sml and interact.sml (but they need more cleaning)
205    
206    ----------------------------------------------------------------------
207    Name: Matthias Blume
208    Date: 2001/08/20 15:50 EDT
209    Tag: blume20010820-slipup
210    Description:
211    
212    I forgot to commit a few files.  Here they are...
213    
214    ----------------------------------------------------------------------
215    Name: Matthias Blume
216    Date: 2001/08/20 15:35:00 EDT
217    Tag: blume-20010820-debugprof
218    Description:
219    
220    !!!! NEW BOOTFILES !!!!
221    
222    This is another round of reorganizing the compiler sources.  This
223    time the main goal was to factor out all the "instrumentation"
224    passes (for profiling and backtracing) into their own library.
225    The difficulty was to do it in such a way that it does not depend
226    on elaborate.cm but only on elabdata.cm.
227    
228    Therefore there have been further changes to both elaborate.cm and
229    elabdata.cm -- more "generic" things have been moved from the former
230    to the latter.  As a result, I was forced to split the assignment
231    of numbers indicating "primtyc"s into two portions: SML-generic and
232    SML/NJ-specific.  Since it would have been awkward to maintain,
233    I bit the bullet and actually _changed_ the mapping between these
234    numbers and primtycs.  The bottom line of this is that you need
235    a new set of bin- and bootfiles.
236    
237    I have built new bootfiles for all architectures, so doing a fresh
238    checkout and config/install.sh should be all you need.
239    
240    The newly created library's name is
241    
242        $smlnj/viscomp/debugprof.cm
243    
244    and its sources live under
245    
246        src/compiler/DebugProf
247    
248    ----------------------------------------------------------------------
249    Name: Matthias Blume
250    Date: 2001/08/15 17:15:00 EDT
251    Tag: blume-20010815-compreorg
252    Description:
253    
254    This is a first cut at reorganizing the CM libraries that make up the
255    core of the compiler.  The idea is to separate out pieces that could
256    be used independently by tools, e.g., the parser, the typechecker, etc.
257    
258    The current status is a step in this direction, but it is not quite
259    satisfactory yet.  Expect more changes in the future.
260    
261    Here is the current (new) organization...
262    
263        What used to be $smlnj/viscomp/core.cm is now divided into
264        six CM libraries:
265    
266             $smlnj/viscomp/basics.cm
267                           /parser.cm
268                           /elabdata.cm
269                           /elaborate.cm
270                           /execute.cm
271                           /core.cm
272    
273        The CM files for these libraries live under src/system/smlnj/viscomp.
274        All these libraries are proxy libraries that contain precisely
275        one CM library component.  Here are the locations of the components
276        (all within the src/compiler tree):
277    
278             Basics/basics.cm
279             Parse/parser.cm
280             ElabData/elabdata.cm
281             Elaborator/elaborate.cm
282             Execution/execute.cm
283             core.cm
284    
285         [This organization is the same that has been used already
286         for a while for the architecture-specific parts of the visible
287         compiler and for the old version of core.cm.]
288    
289         As you will notice, many source files have been moved from their
290         respective original locations to a new home in one of the above
291         subtrees.
292    
293         The division of labor between the new libraries is the following:
294    
295             basics.cm:
296                - Simple, basic definitions that pertain to many (or all) of
297                  the other libraries.
298             parser.cm:
299                - The SML parser, producing output of type Ast.dec.
300                - The type family for Ast is also defined and exported here.
301             elabdata.cm:
302                - The datatypes that describe input and output of the elaborator.
303                  This includes types, absyn, and static environments.
304             elaborator.cm:
305                - The SML/NJ type checker and elaborator.
306                  This maps an Ast.dec (with a given static environment) to
307                  an Absyn.dec (with a new static environment).
308                - This libraries implements certain modules that used to be
309                  structures as functors (to remove dependencies on FLINT).
310             execute.cm:
311                - Everything having to do with executing binary code objects.
312                - Dynamic environments.
313             core.cm:
314                - SML/NJ-specific instantiations of the elaborator and MLRISC.
315                - Top-level modules.
316                - FLINT (this should eventually become its own library)
317    
318    Notes:
319    
320    I am not 100% happy with the way I separated the elaborator (and its
321    data structures) from FLINT.  Two instances of the same problem:
322    
323        1. Data structures contain certain fields that carry FLINT-specific
324           information.  I hacked around this using exn and the property list
325           module from smlnj-lib.  But the fact that there are middle-end
326           specific fields around at all is a bit annoying.
327    
328        2. The elaborator calculates certain FLINT-related information.  I tried
329           to make this as abstract as I could using functorization, but, again,
330           the fact that the elaborator has to perform calculations on behalf
331           of the middle-end at all is not nice.
332    
333        3. Having to used exn and property lists is unfortunate because it
334           weakens type checking.  The other alternative (parameterizing
335           nearly *everything*) is not appealing, though.
336    
337    I removed the "rebinding =" warning hack because due to the new organization
338    it was awkward to maintain it.  As a result, the compiler now issues some of
339    these warnings when compiling init.cmi during bootstrap compilation. On
340    the plus side, you also get a warning when you do, for example:
341       val op = = Int32.+
342    which was not the case up to now.
343    
344    I placed "assign" and "deref" into the _Core structure so that the
345    code that deals with the "lazy" keyword can find them there.  This
346    removes the need for having access to the primitive environment
347    during elaboration.
348    
349    ----------------------------------------------------------------------
350    Name: Matthias Blume
351    Date: 2001/08/13
352    Tag: blume-20010813-closures
353    Description:
354    
355    This fix was sent to us by Zhong Shao.  It is supposed to improve the
356    performance of certain loops by avoiding needless closure allocation.
357    
358    ----------------------------------------------------------------------
359    Name: Lal George
360    Date: 2001/07/31 10:03:23 EDT 2001
361    Tag: george-20010731-x86-fmalloc
362    Description: Fixed bug in x86 calls
363    
364        There was a bug where call instructions would mysteriously
365        vanish. The call instruction had to be one that returned
366        a floating point value.
367    
368    ----------------------------------------------------------------------
369    Name: Lal George
370    Date: 2001/07/19 16:36:29 EDT 2001
371    Tag: george-20010719-simple-cells
372    Description:
373    
374    I have dramatically simplified the interface for CELLS in MLRISC.
375    
376    In summary, the cells interface is broken up into three parts:
377    
378      1. CellsBasis : CELLS_BASIS
379    
380            CellsBasis is a top level structure and common for all
381            architectures.  it contains the definitions of basic datatypes
382            and utility  functions over these types.
383    
384      2. functor Cells() : CELLS
385    
386            Cells generates an interface for CELLS that incorporates the
387            specific resources on the target architecture, such as the
388            presence of special register classes, their number and size,
389            and various useful substructures.
390    
391      3. <ARCH>CELLS
392    
393            e.g. SparcCells: SPARCCELLS
394    
395            <ARCH>CELLS usually contains additional bindings for special
396            registers  on the architecture, such as:
397    
398                    val r0 : cell           (* register zero *)
399                    val y : cell            (* Y register *)
400                    val psr : cell          (* processor status register *)
401                    ...
402    
403            The structure returned by applying the Cells functor is opened
404            in this interface.
405    
406    The main implication of all this is that the datatypes for cells is
407    split between CellsBasis and CELLS -- a fairly simple change for user
408    code.
409    
410    In the old scheme the CELLS interface had a definitional binding of
411    the form:
412    
413            signature CELLS = sig
414    
415               structure CellsBasis = CellsBasis
416    
417               ...
418    
419            end
420    
421    With all the sharing constraints that goes on in MLRISC, this old
422    design  quickly leads to errors such as:
423    
424            "structure definition spec inside of sharing ... "
425    
426    
427    and appears to require an unacceptable amount of sharing and where
428    constraint hackery.
429    
430    I think this error message (the interaction of definitional specs and
431    sharing) requires more explanation on our web page.
432    
433    ----------------------------------------------------------------------
434    Name: Matthias Blume
435    Date: 2001/07/19 15:00:00 EDT
436    Tag: blume-20010719-libreorg
437    Description:
438    
439    This update puts together a fairly extensive but straightforward change
440    to the way the libraries that implement the interactive system are
441    organized:
442    
443       The biggest change is the elimination of structure Compiler.  As a
444       replacement for this structure, there is now a CM library
445       (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
446       that exports all the substructures of the original structure Compiler
447       directly.  So instead of saying Compiler.Foo.bar one now simply
448       says Foo.bar.  (The CM libraries actually export a collection of
449       structures that is richer than the collection of substructures of
450       structure Compiler.)
451    
452       To make the transition smooth, there is a separate library called
453       $smlnj/compiler/compiler.cm which puts together and exports the
454       original structure Compiler (or at least something very close to it).
455    
456       There are five members of the original structure Compiler
457       that are not exported directly but which instead became members
458       of a new structure Backend (described by signature BACKEND).  These are:
459       structure Profile (: PROFILE), structure Compile (: COMPILE), structure
460       Interact (: INTERACT), structure Machine (: MACHINE), and val
461       architecture (: string).
462    
463       Structure Compiler.Version has become structure CompilerVersion.
464    
465       Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
466       by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
467       or x86, respectively.
468       Each of these exports the same frontend structures that
469       $smlnj/compiler.cm exports.  But they do not have a structure Backend
470       and instead export some structure <Arch>Backend where <Arch> is Alpha32,
471       Hppa, PPC, Sparc, or X86, respectively.
472    
473       Library $smlnj/compiler/all.cm exports the union of the exports of
474       $smlnj/compiler/<arch>.cm
475    
476       There are no structures <Arch>Compiler anymore, use
477       $smlnj/compiler/<arch>.cm instead.
478    
479       Library host-compiler-0.cm is gone.  Instead, the internal library
480       that instantiates CM is now called cm0.cm.  Selection of the host
481       compiler (backend) is no longer done here but. (Responsibility for it
482       now lies with $smlnj/compiler/current.cm.  This seems to be more
483       logical.)
484    
485       Many individual files have been moved or renamed.  Some files have
486       been split into multiple files, and some "dead" files have been deleted.
487    
488    Aside from these changes to library organization, there are also changes
489    to the way the code itself is organized:
490    
491       Structure Binfile has been re-implemented in such a way that it no
492       longer needs any knowledge of the compiler.  It exclusively deals
493       with the details of binfile layout.  It no longer invokes the
494       compiler (for the purpose of creating new prospective binfile
495       content), and it no longer has any knowledge of how to interpret
496       pickles.
497    
498       Structure Compile (: COMPILE) has been stripped down to the bare
499       essentials of compilation.  It no longer deals with linking/execution.
500       The interface has been cleaned up considerably.
501    
502       Utility routines for dealing with linking and execution have been
503       moved into their own substructures.
504    
505       (The ultimate goal of these changes is to provide a light-weight
506       binfile loader/linker (at least for, e.g., stable libraries) that
507       does not require CM or the compiler to be present.)
508    
509    CM documentation has been updated to reflect the changes to library
510    organization.
511    
512    ----------------------------------------------------------------------
513    Name: Matthias Blume
514    Date: 2001/07/10 17:30:00 EDT
515    Tag: Release_110_34
516    Description:
517    
518    Minor tweak to 110.34 (re-tagged):
519    
520      - README.html file added to CVS repository
521      - runtime compiles properly under FreeBSD 3.X and 4.X
522    
523    ----------------------------------------------------------------------
524    Name: Matthias Blume
525    Date: 2001/07/10 17:30:00 EDT
526    Tag: Release_110_34
527    Description:
528    
529    New version number (110.34). New bootfiles.
530    
531    ----------------------------------------------------------------------
532    Name: Matthias Blume
533    Date: 2001/07/09 16:00:00 EDT
534    Tag: blume-20010709-more-varargs
535    Description:
536    
537    I changed the handling of varargs in ml-nlffigen again:
538    The ellipsis ... will now simply be ignored (with an accompanying warning).
539    
540    The immediate effect is that you can actually call a varargs function
541    from ML -- but you can't actually supply any arguments beyond the ones
542    specified explicitly.  (For example, you can call printf with its format
543    string, but you cannot pass additional arguments.)
544    
545    This behavior is only marginally more useful than the one before, but
546    it has the advantage that a function or, more importantly, a function
547    type never gets dropped on the floor, thus avoiding follow-up problems with
548    other types that refer to the offending one.
549    
550    ----------------------------------------------------------------------
551    Name: Matthias Blume
552    Date: 2001/07/09 11:25:00 EDT
553    Tag: blume-20010709-varargs
554    Description:
555    
556    1. ckit-lib.cm now exports structure Error
557    2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
558       with a warning accompanied by a source location.  Moreover, it
559       merely skips the offending function or type and proceeds with the
560       rest of its work.u  As a result, one can safely feed C code containing
561       "..." to ml-nlffigen.
562    3. There are some internal improvements to CM, providing slightly
563       more general string substitutions in the tools subsystem.
564    
565    ----------------------------------------------------------------------
566    Name: Matthias Blume
567    Date: 2001/06/27 15:10:00 EDT
568    Tag: blume-20010627-concur
569    Description:
570    
571    Fixed a small bug in CM's handling of parallel compilation.
572    (You could observe the bug by Control-C-interrupting an ordinary
573    CMB.make or CM.stabilize and then attaching some compile servers.
574    The result was that all of a sudden the previously interrupted
575    compilation would continue on its own.  This was because of
576    an over-optimization: CM did not bother to clean out certain queues
577    when no servers were attached "anyway", resulting in the contents
578    of these queues to grab control when new servers did get attached.)
579    
580    There is also another minor update to the CM manual.
581    
582    ----------------------------------------------------------------------
583    Name: Matthias Blume
584    Date: 2001/06/26 16:15:00 EDT
585    Tag: blume-20010626-cmdoc
586    Description:
587    
588    Minor typo fixed in CM manual (syntax diagram for libraries).
589    
590    ----------------------------------------------------------------------
591    Name: Matthias Blume
592    Date: 2001/06/25 22:55:00 EDT
593    Tag: blume-20010625-x86pc
594    Description:
595    
596    Fixed a nasty bug in the X86 assembly code that caused signal
597    handlers to fail (crash) randomly.
598    
599    ----------------------------------------------------------------------
600    Name: Matthias Blume
601    Date: 2001/06/25 12:05:00 EDT
602    Tag: blume-20010625-nlffigen
603    Description:
604    
605    This update fixes a number of minor bugs in ml-nlffigen as reported by
606    Nick Carter <nbc@andrew.cmu.edu>.
607    
608      1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
609      2. Default names for generated files are now derived from the name of
610         the C file *without its directory*.  In particular, this causes generated
611         files to be placed locally even if the C file is in some system directory.
612      3. Default names for generated signatures and structures are also derived
613         from the C file name without its directory.  This avoids silly things
614         like "structure GL/GL".
615         (Other silly names are still possible because ml-nlffigen does not do
616          a thorough check of whether generated names are legal ML identifiers.
617          When in doubt, use command line arguments to force particular names.)
618    
619    ----------------------------------------------------------------------
620    Name: Matthias Blume
621    Date: 2001/06/21 12:25:00 EDT
622    Tag: blume-20010621-eXene
623    Description:
624    
625    eXene now compiles and (sort of) works again.
626    
627    The library name (for version > 110.33) is $/eXene.cm.
628    
629    I also added an new example in src/eXene/examples/nbody.  See the
630    README file there for details.
631    
632    ----------------------------------------------------------------------
633    Name: Matthias Blume
634    Date: 2001/06/20 16:40:00 EDT
635    Tag: blume-20010620-cml
636    Description:
637    
638    CML now compiles and works again.
639    
640    Libraries (for version > 110.33):
641    
642      $cml/cml.cm            Main CML library.
643      $cml/basis.cm          CML's version of $/basis.cm.
644      $cml/cml-internal.cm   Internal helper library.
645      $cml/core-cml.cm       Internal helper library.
646      $cml-lib/trace-cml.cm  Tracing facility.
647      $cml-lib/smlnj-lib.cm  CML's version of $/smlnj-lib.cm
648    
649    The installer (config/install.sh) has been taught how to properly
650    install this stuff.
651    
652    ----------------------------------------------------------------------
653    Name: Matthias Blume
654    Date: 2001/06/19 17:55:00 EDT
655    Tag: blume-20010619-instantiate
656    Description:
657    
658    This un-breaks the fix for bug 1432.
659    (The bug was originally fixed in 110.9 but I broke it again some
660    time after that.)
661    
662    ----------------------------------------------------------------------
663    Name: Matthias Blume
664    Date: 2001/06/19 17:25:00 EDT
665    Tag: blume-20010619-signals
666    Description:
667    
668    This should (hopefully) fix the long-standing signal handling bug.
669    (The runtime system was constructing a continuation record with an
670    incorrect descriptor which would cause the GC to drop data on the floor...)
671    
672    ----------------------------------------------------------------------
673    Name: Matthias Blume
674    Date: 2001/06/15 15:05:00 EDT
675    Tag: blume-20010615-moresparc
676    Description:
677    
678    Here is a short late-hour update related to Sparc c-calls:
679    
680     -- made handling of double-word arguments a bit smarter
681    
682     -- instruction selection phase tries to collapse certain clumsily
683        constructed ML-Trees; typical example:
684    
685            ADD(ty,ADD(_,e,LI d1),LI d2)  ->  ADD(ty,e,LI(d1+d2))
686    
687        This currently has no further impact on SML/NJ since mlriscGen does
688        not seem to generate such patterns in the first place, and c-calls
689        (which did generate them in the beginning) has meanwhile been fixed
690        so as to avoid them as well.
691    
692    ----------------------------------------------------------------------
693    Name: Matthias Blume
694    Date: 2001/06/15 15:05:00 EDT
695    Tag: blume-20010615-sparc
696    Description:
697    
698    The purpose of this update is to provide an implementation of NLFFI
699    on Sparc machines.
700    
701    Here are the changes in detail:
702    
703       * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
704       the Sparc implementation of the c-calls API.
705       * The Sparc backend of SML/NJ has been modified to uniformely use %fp
706       for accessing the ML frame.  Thus, we have a real frame pointer and
707       can freely modify %sp without need for an omit-frame-ptr phase.
708       The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
709       this case.
710       * ml-nlffigen has been taught to produce code for different architectures
711       and calling conventions.
712       * In a way similar to what was done in the x86 case, the Sparc
713       backend uses its own specific extension to mltree.  (For example,
714       it needs to be able to generate UNIMP instructions which are part
715       of the calling convention.)
716       * ml-nlffi-lib was reorganized to make it more modular (in particular,
717       to make it easier to plug in new machine- and os-dependent parts).
718    
719    There are some other fairly unrelated bug fixes and cleanups as well:
720    
721       * I further hacked the .cm files for MLRISC tools (like MDLGen) so
722       that they properly share their libraries with existing SML/NJ libraries.
723       * I fixed a minor cosmetic bug in CM, supressing certain spurious
724       follow-up error messages.
725       * Updates to CM/CMB documentation.
726    
727    TODO items:
728    
729       * MLRISC should use a different register as its asmTemp on the Sparc.
730         (The current %o2 is a really bad choice because it is part of the
731         calling conventions, so things might interfere in unexpected ways.)
732    
733    ----------------------------------------------------------------------
734    Name: Matthias Blume
735    Date: 2001/06/07
736    Tag: blume-20010607-calls
737    Description:
738    
739    A number of internal changes related to C calls and calling conventions:
740    
741    1. ML-Tree CALL statements now carry a "pops" field.  It indicates the
742       number of bytes popped implicitly (by the callee).  In most cases
743       this field is 0 but on x86/win32 it is some non-zero value.  This
744       is information provided for the benefit of the "omit-frameptr" pass.
745    2. The CALL instruction on the x86 carries a similar "pops" field.
746       The instruction selection phase copies its value from the ML-Tree
747       CALL statement.
748    3. On all other architectures, the instruction selection phase checks
749       whether "pops=0" and complains if not.
750    4. The c-calls implementation for x86 now accepts two calling conventions:
751       "ccall" and "stdcall".  When "ccall" is selected, the caller cleans
752       up after the call and pops is set to 0.  For "stdcall", the caller
753       does nothing, leaving the cleanup to the callee; pops is set to
754       the number of bytes that were pushed onto the stack.
755    5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
756       distinguish between "ccall" and "stdcall".
757    6. The UNIMP instruction has been added to the supported Sparc instruction
758       set. (This is needed for implementing the official C calling convention
759       on this architecture.)
760    7. I fixed some of the .cm files under src/MLRISC/Tools to make them
761       work with the latest CM.
762    
763    ----------------------------------------------------------------------
764    Name: Matthias Blume
765    Date: 2001/06/05 15:10:00 EDT
766    Tag: blume-20010605-cm-index
767    Description:
768    
769    0. The "lambdasplit" parameter for class "sml" in CM has been documented.
770    
771    1. CM can now generate "index files".  These are human-readable files
772       that list on a per-.cm-file basis each toplevel symbol defined or
773       imported.  The location of the index file for
774       <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
775       To enable index-file generation, set CM.Control.generate_index to true
776       or export an environment-symbol: export CM_GENERATE_INDEX=true.
777    
778       The CM manual has been updated accordingly.
779    
780    2. I made some slight modifications to the c-calls API in MLRISC.
781    
782         a) There is now a callback to support saving/restoring of
783            dedicated but caller-save registers around the actual call
784            instruction.
785         b) One can optionally specify a comment-annotation for the
786            call instruction.
787    
788    3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
789       (For example, the comment annotation shows the C prototype of
790        the function being called.)
791    
792    ----------------------------------------------------------------------
793    Name: Matthias Blume
794    Date: 2001/06/01 13:30:00 EDT
795    Tag: blume-20010601-nlffi-cleanup
796    Description:
797    
798    This is mostly a cleanup of MLFFI stuff:
799    
800       - some signature files have been put into a more exposed place
801       - the ugly 'f type parameter is gone (simplifies types tremendously!)
802       - ml-nlffigen changed accordingly
803       - tutorial updated
804    
805    Other changes:
806    
807       - author's affiliation in CM manual(s) updated
808       - some more recognized keywords added to Allen's sml.sty
809    
810    ----------------------------------------------------------------------
811    Name: Matthias Blume
812    Date: 2001/05/25 15:30:00 EDT
813    Tag: blume-20010525-iptr
814    Description:
815    
816      - put the official 110.33-README (as it appears on the ftp server) under
817        CVS
818      - fixed a small bug related to incomplete pointer types in
819        ml-nlffigen
820      - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
821        (it does not need the 'f type parameter)
822    
823    ----------------------------------------------------------------------
824    Name: Matthias Blume
825    Date: 2001/05/23 14:30:00 EDT
826    Tag: Release_110_33
827    Description:
828    
829    New version number (110.33).  New bootfiles.
830    
831    ----------------------------------------------------------------------
832    Name: Matthias Blume
833    Date: 2001/05/22 18:06:00 EDT
834    Tag: blume-20010522-targets
835    Description:
836    
837    Made install.sh use file config/targets.customized if it exists, falling
838    back to config/targets if it doesn't.  This way one can have a customized
839    version of the targets file without touching the "real thing", thus
840    eliminating the constant fear of accidentally checking something bogus
841    back into the CVS repository...  (File config/targets.customized must
842    not be added to the repository!)
843    
844    ----------------------------------------------------------------------
845    Name: Matthias Blume
846    Date: 2001/05/22 16:30:00 EDT
847    Tag: blume-20010522-minitut
848    Description:
849    
850    1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
851       struct returns.
852    2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt.  This is some very
853       incomplete, preliminary documentation for NLFFI.
854    
855    ----------------------------------------------------------------------
856    Name: Matthias Blume
857    Date: 2001/05/14 11:30:00 EDT
858    Tag: blume-20010514-script
859    Description:
860    
861    Some bugs in install script fixed.
862    
863    In addition to that I also made a slight change to the NLFFI API:
864    Functors generated by ml-nlffigen now take the dynamic library as a
865    straight functor argument, not as a suspended one.  (The original
866    functor code used to force the suspension right away anyway, so there
867    was nothing gained by this complication of the interface.)
868    
869    ----------------------------------------------------------------------
870    Name: Matthias Blume
871    Date: 2001/05/11 14:35:00 EDT
872    Tag: blume-20010511-ml-nlffi
873    Description:
874    
875    I finally took the plunge and added my new FFI code to the main
876    repository.  For x86-linux it is now ready for prime-time.
877    
878    There are two new subdirectories of "src":
879    
880      - ml-nlffi-lib:
881           The utility library for programs using the FFI interface.
882           Here is the implementation of $/c.cm and its associated low-level
883           partners $/c-int.cm and $/memory.cm.
884      - ml-nlffigen:
885           A stand-alone program for generating ML glue code from C source
886           code.
887    
888    Building ml-nlffigen requires $/ckit-lib.cm.
889    
890    The config/install.sh script has been updates to do the Right Thing
891    (hopefully).
892    
893    Notice that the source tree for the C-Kit will not be put under "src"
894    but directly under the installation root directory.  (This is the
895    structure that currently exists on the CVS server when you check out
896    module "sml".)  Fortunately, config/install.sh knows about this oddity.
897    
898    Bugs: No documentation yet.
899    
900    ----------------------------------------------------------------------
901    Name: Matthias Blume
902    Date: 2001/05/09 16:35:00 EDT
903    Tag: blume-20010509-cpscontract
904    Description:
905    
906    Fixed a bug in the accounting code in cpsopt/contract.sml.  (The
907    wrapper/unwrapper elimination did not decrement usage counts and some
908    dead variables got overlooked by the dead-up logic.)
909    
910    ----------------------------------------------------------------------
911    Name: Lal George
912    Date: 2001/05/08  17:26:09 EDT
913    Tag: george-20010508-omit-frameptr
914    Description:
915    
916    Changes to implement the omit-frame-pointer optimization to support
917    raw C calls. For now, there is only support on the Intel x86, but
918    other architectures will follow as more experience is gained with this.
919    
920    
921    ----------------------------------------------------------------------
922    Name: Matthias Blume
923    Date: 2001/05/07 14:40:00 EDT
924    Tag: blume-20010507-proxies
925    Description:
926    
927    I made into "proxy libraries" all libraries that qualify for such a
928    change.  (A qualifying library is a library that has another library or
929    groups as its sole member and repeats that member's export list
930    verbatim.  A proxy library avoids this repetition by omitting its export
931    list, effectively inheriting the list that its (only) member exports.
932    See the CM manual for more explanation.)
933    The main effect is that explicit export lists for these libraries
934    do not have to be kepts in sync, making maintenance a bit easier.
935    
936    I also added copyright notices to many .cm-files.
937    
938    Last but not least, I made a new set of bootfiles.
939    
940    ----------------------------------------------------------------------
941    Name: Matthias Blume
942    Date: 2001/05/04 17:00:00 EDT
943    Tag: blume-20010504-cm-lsplit
944    Description:
945    
946    0. John merged pending changes to $/smlnj-lib.cm
947    
948    1. Allen's previous change accidentally backed out of one of Lal's
949       earlier changes.  I undid this mistake (re-introducing Lal's change).
950    
951    2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
952       within the compiler where applicable.  There is some code simplification
953       because of that.
954    
955    3. The "split" phase (in FLINT) is now part of the default list of phases.
956       Compiler.Control.LambdaSplitting.* can be used to globally control the
957       lambda-splitting (cross-module-inlining) engine.  In addition to that,
958       it can now also be controlled on a per-source basis: CM has been taught
959       a new tool parameter applicable to ML source files.
960    
961       - To turn lambda-splitting off completely:
962            local open Compiler.Control.LambdaSplitting in
963                val _ = set Off
964            end
965       - To make "no lambda-splitting" the global default (but allow per-source
966         overriding); this is the initial setting:
967            local open Compiler.Control.LambdaSplitting in
968                val _ = set (Default NONE)
969            end
970       - To make "lambda-splitting with aggressiveness a" the global default
971         (and allow per-source overriding):
972            local open Compiler.Control.LambdaSplitting in
973                val _ = set (Default (SOME a))
974            end
975    
976       - To turn lambda-splitting off for a given ML souce file (say: a.sml)
977         write (in the respective .cm-file):
978            a.sml (lambdasplitting:off)
979       - To turn lambda-splitting for a.sml on with minimal aggressiveness:
980            a.sml (lambdasplitting:on)
981       - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
982         <a> is a decimal non-negative integer):
983            a.sml (lambdasplitting:<a>)
984       - To turn lambda-splitting for a.sml on with maximal aggressiveness:
985            a.sml (lambdasplitting:infinity)
986       - To use the global default for a.sml:
987            a.sml (lambdasplitting:default)
988         or simply
989            a.sml
990    
991    ----------------------------------------------------------------------
992    Name: Allen Leung
993    Date: 2001/05/04 01:57:00 EDT
994    Tag: leunga-20010504-sync
995    Description:
996    
997      MLRISC features.
998    
999      1. Fix to CMPXCHG instructions.
1000      2. Changed RA interface to allow annotations in callbacks.
1001      3. Added a new method to the stream interface to allow annotations updates.
1002    
1003    ----------------------------------------------------------------------
1004    Name: Matthias Blume
1005    Date: 2001/05/01 11:45:00 EDT
1006    Tag: blume-20010501-pcedittmp
1007    Description:
1008    
1009    Changed install.sh to use the current working directory instead of
1010    /usr/tmp for a temporary file (pcedittmp).  The previous choice
1011    of /usr/tmp caused trouble with MacOS X because of file premission
1012    problems.
1013    
1014    ----------------------------------------------------------------------
1015    Name: Matthias Blume
1016    Date: 2001/04/20 11:10:00 EDT
1017    Tag: blume-20010420-inMLflag
1018    Description:
1019    
1020     - added vp_limitPtrMask to vproc-state.h
1021       (for use by the raw-C-calls mechanism to implement proper interrupt
1022        handling)
1023     - made the ML compiler aware of various data-structure offsets so it
1024       can generate code for accessing the vp_inML flag and vp_limitPtrMask
1025     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
1026       raw C-calls
1027    
1028    ----------------------------------------------------------------------
1029    Name: Lal George
1030    Date: 2001/04/20 09:15:28 EDT
1031    Tag: george-20010420-macosX
1032    Description:
1033    
1034     - Changes to port to Mac OS X; Darwin.
1035    
1036     - In the process I found that sqrt was broken on the PPC, because the
1037       fsqrt instruction is not implemented.
1038    
1039    ----------------------------------------------------------------------
1040    Name: Matthias Blume
1041    Date: 2001/04/18 12:45:00 EDT
1042    Tag: blume-20010418-ccalls
1043    Description:
1044    
1045     - fixed two off-by-4 errors in the x86-specific c-calls implementation
1046       (this bug prevented structure arguments containing pointers from being
1047        passed correctly)
1048     - changed the raw-C-call code in mlriscGen.sml in such a way that
1049       structure arguments are represented as a pointer to the beginning
1050       of the structure (instead of having a series of synthesized arguments,
1051       one for each structure member)
1052    
1053     - made makeml script's verbosity level configurable via environment
1054       variable (MAKEML_VERBOSITY)
1055    
1056     - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
1057       in rawmem-x86.sml; we are now using the real thing
1058    
1059    ----------------------------------------------------------------------
1060    Name: Matthias Blume
1061    Date: 2001/03/22 16:25:00 EST
1062    Tag: blume-20010322-bootfiles
1063    Description:
1064    
1065    Created a new set of bootfiles (for your automatic installation convenience).
1066    
1067    ----------------------------------------------------------------------
1068    Name: Matthias Blume
1069    Date: 2001/03/22 15:10:00 EST
1070    Tag: blume-20010322-rawmem-parcm
1071    Description:
1072    
1073    1. All "raw memory access" primitives for the new FFI are implemented now
1074       (at least on the x86).
1075    2. Some further cleanup of CM's parallel make mechanism.
1076    
1077    ----------------------------------------------------------------------
1078    Name: Matthias Blume
1079    Date: 2001/03/19 17:53:00 EST
1080    Tag: blume-20010319-parallel
1081    Description:
1082    
1083    Parallel make (using compile servers) now works again.
1084    
1085    To this end, CM.stabilize and CMB.make have been modified to work in
1086    two passes when compile servers are attached:
1087       1. Compile everything, do not perform stabilization; this pass
1088          uses compile servers
1089       2. Stabilize everything; this pass does not use compile servers
1090    If there are no compile servers, the two passes are combined into one
1091    (as before).  Splitting the passes increases the inherent parallelism
1092    in the dependency graph because the entire graph including all
1093    libraries is available at the same time.  This, in turn, improves
1094    server utilization.  The downside is that the master process will
1095    have to do some extra work after compilation is done (because for
1096    technical reasons it must re-read all the binfiles during stabilization).
1097    
1098    ----------------------------------------------------------------------
1099    Name: Matthias Blume
1100    Date: 2001/03/16 12:22:00 EST
1101    Tag: blume-20010316-bootfiles
1102    Description:
1103    
1104    Created a new set of bootfiles (for your automatic installation convenience).
1105    
1106    ----------------------------------------------------------------------
1107    Name: Matthias Blume
1108    Date: 2001/03/16 11:00:00 EST
1109    Tag: blume-20010316-MLTREE-fixup
1110    Description:
1111    
1112    This is a minor fixup for an (untagged) earlier commit by Allen.
1113    (A file was missing).
1114    
1115    ----------------------------------------------------------------------
1116    Name: Allen Leung
1117    Date: Mon Mar  5 18:54:57 EST 2001
1118    Tag: leunga-20010305-cut-support
1119    
1120    1. New support for alternative control-flow in MLTREE.
1121       Currently we support
1122    
1123          FLOW_TO(CALL ...., [k1,...,kn])
1124    
1125       This is needed for 'cuts to' in C-- and try/handle-like constructs
1126       in Moby
1127    
1128       New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
1129    
1130    2. Register Allocator
1131    
1132       Changes in interface [from Fermin, John]
1133    
1134    3. Alpha 8-bit SLL support [Fermin]
1135    
1136    4. All architectures
1137    
1138       A new module (ClusterExpandCopies) for expanding parallel copies.
1139    
1140    ----------------------------------------------------------------------
1141    Name: Allen Leung
1142    Date: 2001/02/27 23:07:00 EST
1143    Tag: leunga-20010227-minor-stuff
1144    
1145    1. Alpha bug fix for CMOVNE
1146    2. Handle mltree COND(..,FCMP ...,...)
1147    3. Bug fix in simplifier
1148    
1149    ----------------------------------------------------------------------
1150    Name: Matthias Blume
1151    Date: 2001/01/30 17:50:00 EST
1152    Tag: blume-20010130-sync
1153    Description:
1154    
1155    This is just a minor update to sync my devel branch with the main brach.
1156    The only visible change is the addition of some README files.
1157    
1158    ----------------------------------------------------------------------
1159    Name: Matthias Blume
1160    Date: 2001/01/12 23:30:00 JST
1161    Tag: blume-20010112-bootfiles
1162    Description:
1163    
1164    Made a new set of bootfiles that goes with the current state of the
1165    repository.
1166    
1167    ----------------------------------------------------------------------
1168    Name: Matthias Blume
1169    Date: 2001/01/12 21:20:00 JST
1170    Tag: blume-20010112-sync
1171    Description:
1172    
1173    I am just flushing out some minor changes that had accumulated in
1174    my private branch in order to sync with the main tree.  (This is
1175    mainly because I had CVS trouble when trying to merge _into_ my
1176    private branch.)
1177    
1178    Most people should be completely unaffected by this.
1179    
1180    ----------------------------------------------------------------------
1181    Name: Allen Leung
1182    Date: Thu Jan 11 21:03:00 EST 2001
1183    Tag: leunga-20010111-labexp=mltree
1184    Description:
1185    
1186    1.  Removed the type LabelExp and replace it by MLTree.
1187    2.  Rewritten mltree-simplify with the pattern matcher tool.
1188    3.  There were some bugs in alpha code generator which would break
1189        64-bit code generation.
1190    4.  Redo the tools to generate code with the
1191    5.  The CM files in MLRISC (and in src/system/smlnj/MLRISC)
1192        are now generated by perl scripts.
1193    
1194    ----------------------------------------------------------------------
1195    Name: Matthias Blume
1196    Date: 2001/01/10 21:55:00 JST
1197    Tag: blume-20010110-rcc
1198    Description:
1199    
1200    The RCC stuff now seems to work (but only on the x86).
1201    This required hacking of the c-calls interface (and -implementation) in
1202    MLRISC.
1203    
1204    Normal compiler users should be unaffected.
1205    
1206    ----------------------------------------------------------------------
1207    Name: Matthias Blume
1208    Date: 2001/01/09 01:20:00 JST
1209    Tag: blume-20010109-rcc
1210    Description:
1211    
1212    This is a fairly big patch, flushing out a large number of pending
1213    changes that I made to my development copy over the last couple of days.
1214    
1215    Of practical relevance at this moment is a workaround for a pickling
1216    bug that Allen ran into the other day.  The cause of the bug itself is
1217    still unknown and it might be hard to fix it properly, but the
1218    workaround has some merits of its own (namely somewhat reducing pickling
1219    overhead for certain libraries).  Therefore, I think this solution should
1220    be satisfactory at this time.
1221    
1222    The rest of the changes (i.e., the vast majority) has to do with my
1223    ongoing efforts of providing direct support for C function calls from
1224    ML.  At the moment there is a new primop "RAW_CCALL", typing magic
1225    in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
1226    case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
1227    translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
1228    handle RCC.
1229    
1230    The last part (the changes to mlriscGen.sml) are still known to be
1231    wrong on the x86 and not implemented on all other architectures.  But
1232    the infrastructure is in place. I had to change a few functor
1233    signatures in the backend to be able to route the CCalls interface
1234    from MLRISC there, and I had to specialize the mltree type (on the
1235    x86) to include the necessary extensions. (The extensions themselves
1236    were already there and redy to go in MLRISC/x86).
1237    
1238    Everything should be very happy as soon as someone helps me with
1239    mlriscGen.sml...
1240    
1241    In any case, nothing of this should matter to anyone as long as the
1242    new primop is not being used (which is going to be the case unless you
1243    find it where I hid it :). The rest of the compiler is completely
1244    unaffected.
1245    
1246    ----------------------------------------------------------------------
1247    Name: Matthias Blume
1248    Date: 2001/01/05 00:30:00 JST
1249    Tag: blume-20010105-primops
1250    Description:
1251    
1252    Added some experimental support for work that I am doing right now.
1253    These changes mostly concern added primops, but there is also a new
1254    experimental C library in the runtime system (but currently not enabled
1255    anywhere except on Linux/X86).
1256    
1257    In the course of adding primops (and playing with them), I discovered that
1258    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
1259    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
1260    To recover, I made type information in INL_PRIM mandatory and changed
1261    prim.sml as well as built-in.sml accordingly.  The InLine structure now
1262    has complete, correct type information (i.e., no bottom types).
1263    
1264    Since all these changes mean that we need new binfiles, I also bumped the
1265    version number to 110.32.1.
1266    
1267    ----------------------------------------------------------------------
1268    Name: Matthias Blume
1269    Date: 2000/12/30 22:10:00 JST
1270    Tag: blume-20001230-various
1271    Description:
1272    
1273    Added proxy libraries for MLRISC and let MLRISC libraries refer
1274    to each other using path anchors.  (See CM manual for explanation.)
1275    
1276    Updated CM documentation.
1277    
1278    Fixed some bugs in CM.
1279    
1280    Implemented "proxy" libraries (= syntactic sugar for CM).
1281    
1282    Added "-quiet" option to makeml and changed runtime system accordingly.
1283    
1284    Added cleanup handler for exportML to reset timers and compiler stats.
1285    
1286    ----------------------------------------------------------------------
1287    Name: Lal George
1288    Date: 2000/12/22 22:22:58 EST 2000
1289    Tag: Release_110_32
1290    Description:
1291    
1292            Infinite precision used throughout MLRISC.
1293            see MLRISC/mltree/machine-int.sig
1294    
1295    ----------------------------------------------------------------------
1296    Name: Matthias Blume
1297    Date: 2000/12/22 23:16:00 JST
1298    Tag: blume-20001222-warn
1299    Description:
1300    
1301    Corrected wording and formatting of some CM warning message which I
1302    broke in my previous patch.
1303    
1304    ----------------------------------------------------------------------
1305    Name: Matthias Blume
1306    Date: 2000/12/22 21:20:00 JST
1307    Tag: blume-20001222-anchorenv
1308    Description:
1309    
1310    Fixed CM's handling of anchor environments in connection with CMB.make.
1311    
1312    ----------------------------------------------------------------------
1313    Name: Matthias Blume
1314    Date: 2000/12/22 13:15:00 JST
1315    Tag: blume-20001222-cleanup
1316    Description:
1317    
1318    Removed src/cm/ffi which does not (and did not) belong here.
1319    
1320    ----------------------------------------------------------------------
1321    Name: Matthias Blume
1322    Date: 2000/12/21 23:55:00 JST
1323    Tag: blume-20001221-exn
1324    Description:
1325    
1326    Probably most important: CM no longer silently swallows all exceptions
1327    in the compiler.
1328    Plus: some other minor CM changes.  For example, CM now reports some
1329    sizes for generated binfiles (code, data, envpickle, lambdapickle).
1330    
1331    ----------------------------------------------------------------------
1332    Name: Matthias Blume
1333    Date: 2000/12/15 00:01:05 JST
1334    Tag: blume-20001215-dirtool
1335    Description:
1336    
1337    - "dir" tool added.
1338    - improvements and cleanup to Tools structure
1339    - documentation updates
1340    
1341    ----------------------------------------------------------------------
1342    Name: Allen Leung
1343    Date: Thu Dec 14 03:45:24 EST 2000
1344    Description:
1345    Tag:  leunga-20001214-int-inf
1346    Description:
1347    
1348       In IntInf, added these standard functions, which are missing from our
1349    implementation:
1350    
1351        andb : int * int -> int
1352        xorb : int * int -> int
1353        orb  : int * int -> int
1354        notb : int -> int
1355         <<   : int * word -> int
1356        ~>>  : int * word -> int
1357    
1358       Not tested, I hope they are correct.
1359    
1360    ----------------------------------------------------------------------
1361    Name: Allen Leung
1362    Date: Fri Dec  8 19:23:26 EST 2000
1363    Description:
1364    Tag:  leunga-20001208-nowhere
1365    Description:
1366    
1367      Slight improvements to the 'nowhere' tool to handle OR-patterns,
1368    to generate better error messages etc.  Plus a brief manual.
1369    
1370    ----------------------------------------------------------------------
1371    Name: Lal George
1372    Date: 2000/12/08 09:54:02 EST 2000
1373    Tag: Release_110_31
1374    Description:
1375    
1376    - Version 110.31
1377    ----------------------------------------------------------------------
1378    Name: Allen Leung
1379    Date: Thu Dec  7 22:01:04 EST 2000
1380    Tag:  leunga-20001207-cell-monster-hack
1381    Description:
1382    
1383    Major MLRISC internal changes.  Affect all clients.
1384    Summary:
1385    
1386    1.  Type CELLS.cell = int is now replaced by a datatype.
1387        As a result, the old regmap is now gone.  Almost all interfaces
1388        in MLRISC change as a consequence.
1389    
1390    2.  A new brand version of machine description tool (v3.0) that generates
1391        modules expecting the new interface.  The old version is removed.
1392    
1393    3.  The RA interface has been further abstracted into two new functors.
1394        RISC_RA and X86RA.  These functors have much simpler interfaces.
1395        [See also directory MLRISC/demo.]
1396    
1397    4.  Some other new source->source code generation tools are available:
1398    
1399        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
1400        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
1401           I use this tool to generate the peephole optimizers---with the new
1402           cell type changes, peephole rules are becoming difficult to write
1403           without conditional pattern matching.
1404    
1405    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
1406        cover the entire MLRISC source tree so many things broke.
1407    
1408    6.  CM files have been moved to the subdirectory MLRISC/cm.
1409        They are moved because there are a lot of them and they clutter up the
1410        root dir.
1411    
1412    7.  More detailed documentation to come...
1413    
1414        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
1415        a makeml -rebuild first.  This is because of other other
1416        changes that Matthias has made (see below).
1417    
1418    
1419    ----------------------------------------------------------------------
1420    Name: Matthias Blume
1421    Date: 2000/11/30 23:12:00 JST
1422    Tag: blume-20001130-filereorg
1423    Description:
1424    
1425    Some manual updates and some file reorganizations in CM.
1426    
1427    ----------------------------------------------------------------------
1428    Name: Matthias Blume
1429    Date: 2000/11/24 17:45:00 JST
1430    Tag: blume-20001124-link
1431    Description:
1432    
1433    Drastically improved link traversal code for the case that the dynamic
1434    value was already loaded at bootstrap time.  As a result, CM and CMB
1435    now both load blazingly fast -- even on a very slow machine.  Also,
1436    memory consumption has been further reduced by this.
1437    
1438    Warning: The format of the PIDMAP file has changed.  THerefore, to
1439    bootstrap you have to do this:
1440    
1441    1. Run CMB.make
1442    2. Make a symbolic link for the boot directory:
1443         ln -s sml.boot.ARCH-OS xxx
1444    3. "Rebuild" the boot directory:
1445         ./makeml -boot xxx -rebuild sml ; rm xxx
1446    4. Boot normally:
1447          ./makeml
1448    
1449    ----------------------------------------------------------------------
1450    Name: Matthias Blume
1451    Date: 2000/11/21 21:20:00 JST
1452    Tag: blume-20001121-tools
1453    Description:
1454    
1455    Continued hacking on autoloading problem -- with success this time.
1456    Also changed tool-plugin mechanism.  See new CM manual.
1457    
1458    ----------------------------------------------------------------------
1459    Name: Matthias Blume
1460    Date: 2000/11/19 14:30:00 JST
1461    Tag:  blume-20001119-autoload
1462    Description:
1463    
1464    Some hacking to make autoloading faster.  Success for CMB, no success
1465    so far for CM.  There is a reduced structure CM' that autoloads faster.
1466    (This is a temporary, non-documented hack to be eliminated again when
1467    the general problem is solved.)
1468    
1469    ----------------------------------------------------------------------
1470    Name: Matthias Blume
1471    Date: 2000/11/17 14:10:00 JST
1472    Tag: blume-20001117-pickle-lib
1473    Description:
1474    
1475    1. Eliminated comp-lib.cm
1476    2. Made pickle-lib.cm
1477    3. Eliminated all uses of intset.sml (from comp-lib.cm)
1478    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
1479       equivalent constructs from smlnj-lib.cm (INtHashTable).
1480    5. Point 4. also goes for those uses of intmap.* in MLRISC.
1481       Duplicated intmap modules thrown out.
1482    6. Hunted down all duplicated SCC code and replaced it with
1483       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
1484    7. Rewrote Feedback module.
1485    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
1486       should be thrown out and equivalent modules from smlnj-lib.cm
1487       should be used (IntRedBlackSet, IntListSet, ...).
1488    
1489    Confirmed that compiler compiles to fixpoint.
1490    
1491    ----------------------------------------------------------------------
1492    Name: Allen Leung
1493    Date: 2000/11/10 18:00:00
1494    Tag: leunga-20001110-new-x86-fp
1495    
1496    A new x86 floating point code generator has been added.
1497    By default this is turned off.  To turn this on, do:
1498    
1499        CM.autoload "$smlnj/compiler.cm";
1500        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
1501    
1502    Changes:
1503    
1504    1.  Changed FTAN to FPTAN so that the assembly output is correct.
1505    2.  Changed the extension callback for FTANGENT to generate:
1506    
1507              fptan
1508              fstp  %st(0)
1509        instead of
1510              fptan
1511              fstpl ftempmem
1512    
1513    3.  Numerous assembly fixes for x86.
1514    
1515    5.  Cleaned up the machine code output module x86/x86MC.sml and added
1516        support for a whole bunch of instructions and addressing modes:
1517    
1518          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
1519          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
1520          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
1521          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
1522          fxch %st(n)
1523          fld %st(n)
1524          fst %st(n)
1525          fst mem
1526          fstp %st(n)
1527          fucom %st(n)
1528          fucomp %st(n)
1529    
1530        All these are now generated when the fast fp mode is turned on.
1531    
1532    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
1533    
1534    ----------------------------------------------------------------------
1535    Name: Matthias Blume
1536    Date: 2000/11/09 11:20:00 JST
1537    Tag: blume-20001109-scc
1538    Description:
1539    
1540    Eliminated some code duplication:
1541    
1542    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
1543       (Otherwise the functor is useless.)
1544    2. Used GraphSCCFn where SCCUtilFun was used previously.
1545    3. Got rid of SCCUtilFun (in comp-lib.cm).
1546    
1547    ----------------------------------------------------------------------
1548    Name: Lal George
1549    Date: 2000/11/06 09:02:21 EST 2000
1550    Tag: Release_110_30
1551    Description:
1552    
1553    - Version 110.30
1554    ----------------------------------------------------------------------
1555    Name: Matthias Blume
1556    Date: 2000/11/04 14:45:00
1557    Tag: blume-20001104-mlbuild
1558    Description:
1559    
1560    - Made ml-build faster on startup.
1561    - Documentation fixes.
1562    
1563    ----------------------------------------------------------------------
1564    Name: Matthias Blume
1565    Date: 2000/11/02 17:00:00 JST
1566    Tag: blume-20001102-condcomp
1567    Description:
1568    
1569    - Small tweaks to pickler -- new BOOTFILES!
1570    - Version bumped to 110.29.2.
1571    - Added conditional compilation facility to init.cmi (see comment there).
1572    ----------------------------------------------------------------------
1573    Name: Allen Leung
1574    Date: 2000/10/23 19:31:00
1575    Tag: leunga-20001023-demo-ra
1576    
1577    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
1578    2. Test programs for the graph library updated
1579    3. Some new MLRISC demo programs added
1580    
1581    ----------------------------------------------------------------------
1582    Name: Matthias Blume
1583    Date: 2000/08/31 22:15:00 JST
1584    Tag: blume-20001017-errmsg
1585    Description:
1586    
1587    More error message grief: Where there used to be no messages, there
1588    now were some that had bogus error regions.  Fixed.
1589    
1590    ----------------------------------------------------------------------
1591    Name: Matthias Blume
1592    Date: 2000/08/31 17:30:00 JST
1593    Tag: blume-20001017-v110p29p1
1594    Description:
1595    
1596    I made a version 110.29.1 with new bootfiles.
1597    
1598    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
1599              CM documentation changes and a small bugfix in CM's error reporting.
1600    
1601    ----------------------------------------------------------------------
1602    Name: Lal George
1603    Date: 2000/09/27 14:42:35 EDT
1604    Tag: george-20000927-nodestatus
1605    Description:
1606    
1607    Changed the type of the nodestatus, so that:
1608    
1609            SPILLED(~1)             is now SPILLED
1610            SPILLED(m) where m>=0   is now MEMREG(m)
1611            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
1612    
1613    ----------------------------------------------------------------------
1614    Name: Matthias Blume
1615    Date: 2000/09/07 14:45:00 JST
1616    Tag: blume-20000907-cmerrmsg
1617    Description:
1618    
1619    Small tweak to CM to avoid getting ML syntax error messages twice.
1620    
1621    ----------------------------------------------------------------------
1622    Name: Matthias Blume
1623    Date: 2000/08/31 18:00:00 JST
1624    Tag: blume-20000831-cvsbootfiles
1625    Description:
1626    
1627    New URL for boot files (because the 110.29 files on the BL server do
1628    now work correctly with my updated install scripts for yacc and lex).
1629    
1630    ----------------------------------------------------------------------
1631    Name: Matthias Blume
1632    Date: 2000/08/08 12:33:00 JST
1633    Tag: blume-20000808-manual
1634    Description:
1635    
1636    Tiny update to CM manual.
1637    
1638    ----------------------------------------------------------------------
1639    Name: Allen Leung
1640    Date: 2000/08/7 19:31:00
1641    Tag: leunga-20000807-a-whole-bunch-of-stuff
1642    
1643      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
1644    and Mobdy.
1645    
1646    1.  x86
1647    
1648       a.  Fixes to peephole module by John and Dan.
1649       b.  Assembly fix to SETcc by Allen.
1650       c.  Fix to c-call by John.
1651       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
1652       e.  Instruction selection optimization to SETcc as suggested by John.
1653    
1654           For example,
1655    
1656            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
1657    
1658           should generate:
1659    
1660            MOVL a, x
1661            SUBL b, x
1662            SHRL 31, x
1663    
1664    2.  IR stuff
1665    
1666         A bunch of new DJ-graph related algorithms added.  These
1667         speed up SSA construction.
1668    
1669    3.  SSA + Scheduling
1670    
1671         Added code for SSA and scheduling to the repository
1672    
1673    ----------------------------------------------------------------------
1674    Name: Lal George
1675    Date: 2000/07/27 11:53:14 EDT
1676    
1677    Tag: lal-20000727-linux-ppc
1678    Description:
1679    
1680     Made changes to support Linux PPC.
1681     p.s. I have confirmation that the 110.29 boot files work fine.
1682    
1683    ----------------------------------------------------------------------
1684    Name: Matthias Blume
1685    Date: 2000/07/27 17:40:00 JST
1686    Tag: blume-20000727-scripts
1687    Description:
1688    
1689    !!!! WARNING !!!!
1690    You must recompile the runtime system!
1691    !!!! WARNING !!!!
1692    
1693    This is basically another round of script-enhancements:
1694    
1695    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
1696       and undefine CM preprocessor symbols.
1697    
1698    2. ml-build avoids generating a new heap image if it finds that the
1699       existing one is still ok.  (The condition is that no ML file had to
1700       be recompiled and all ML files are found to be older that the heap
1701       file.)
1702    
1703       To make this work smoothly, I also hacked the runtime system as
1704       well as SMLofNJ.SysInfo to get access to the heap image suffix
1705       (.sparc-solaris, ...) that is currently being used.
1706    
1707       Moreover, the signature of CM.mk_standalone has changed.  See the
1708       CM manual.
1709    
1710    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
1711       CM manual for details.)
1712    
1713    4. More CM manual updates:
1714        - all of the above has been documented.
1715        - there is now a section describing the (CM-related) command line
1716          arguments that are accepted by the "sml" command
1717    
1718    ----------------------------------------------------------------------
1719    Name: Matthias Blume
1720    Date: 2000/07/25 16:20:00 JST
1721    Tag: blume-20000725-makedepend
1722    Description:
1723    
1724    Added a script called ml-makedepend.  This can be used in makefiles
1725    for Unix' make in a way very similar to the "makedepend" command for
1726    C.
1727    
1728    The script internally uses function CM.sources.
1729    
1730    Synopsis:
1731    
1732        ml-makedepend [-f makefile] cmfile targetname
1733    
1734    The default for the makefile is "makefile" (or "Makefile" should
1735    "makefile" not exist).
1736    
1737    ml-makedepend adds a cmfile/targetname-specific section to this
1738    makefile (after removing the previous version of this section).  The
1739    section contains a single dependency specification with targetname on
1740    the LHS (targetname is an arbitrary name), and a list of files derived
1741    from the cmfile on the RHS.  Some of the files on the RHS are
1742    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
1743    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
1744    path names.  The makefile writer is responsible for making sure that
1745    these variables have correct at the time "make" is invoked.
1746    
1747    ----------------------------------------------------------------------
1748    Name: Matthias Blume
1749    Date: 2000/07/22 23:30:00 JST
1750    Tag: blume-20000722-urlupdate
1751    Description:
1752    
1753    Changed BOOT and config/srcarchiveurl to point to BL server:
1754    
1755        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
1756    
1757    ----------------------------------------------------------------------
1758    Name: Matthias Blume
1759    Date: 2000/07/18 18:00:00 JST
1760    Tag: blume-20000718-Version_110_29
1761    Description:
1762    
1763    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
1764    
1765    2. Updated config/version to 110.29
1766    
1767    3. Updated config/srcarchiveurl
1768    
1769    3. New boot files!
1770       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
1771    
1772    ----------------------------------------------------------------------
1773    Name: Matthias Blume
1774    Date: 2000/07/11 13:58:00 JST
1775    Tag: blume-20000711-doctypo
1776    Description:
1777    
1778    Fixed a few typos in CM manual.
1779    
1780    ----------------------------------------------------------------------
1781    Name: Allen Leung
1782    Date: 2000/06/15 00:38:00
1783    Tag: leunga-20000704-sparc-x86
1784    
1785    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
1786    2. fix to x86 RET bug [found by Dan Grossman]
1787    3. sparc assembly bug fix for ticc instructions [found by Fermin]
1788    
1789       Affects c-- and moby only
1790    
1791    ----------------------------------------------------------------------
1792    Name: Matthias Blume
1793    Date: 2000/07/04 15:26:00
1794    Tag: blume-20000704-trigger
1795    Description:
1796    
1797    1. Improvements to CM manual.
1798    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
1799       of getting a back-trace.  The function, when called, raises an
1800       internal exception which explicitly carries the full back-trace history,
1801       so it is unaffected by any intervening handle-raise pairs ("trivial"
1802       or not).  The interactive loop will print that history once it arrives
1803       at top level.
1804       Short of having all exceptions implicitly carry the full history, the
1805       recommended way of using this facility is:
1806         - compile your program with instrumentation "on"
1807         - run it, when it raises an exception, look at the history
1808         - if the history is "cut off" because of some handler, go and modify
1809           your program so that it explicitly calls BTrace.trigger
1810         - recompile (still instrumented), and rerun; look at the full history
1811    
1812    ----------------------------------------------------------------------
1813    Name: Matthias Blume
1814    Date: 2000/07/03 15:36:00 JST
1815    Tag: blume-20000702-manual
1816    Description:
1817    
1818    Small corrections and updates to CM manual.
1819    
1820    ----------------------------------------------------------------------
1821    Name: Matthias Blume
1822    Date: 2000/06/29 16:04:00 JST
1823    Tag: blume-20000629-yacctool
1824    Description:
1825    
1826    Changes:
1827    
1828    1. Class "mlyacc" now takes separate arguments to pass options to
1829       generated .sml- and .sig-files independently.
1830    2. Corresponding CM manual updates.
1831    3. BTrace module now also reports call sites.  (However, for loop clusters
1832       it only shows from where the cluster was entered.)  There are associated
1833       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
1834    
1835    ----------------------------------------------------------------------
1836    Name: Matthias Blume
1837    Date: 2000/06/27 16:51:00 JST
1838    Tag: blume-20000627-noweb
1839    Description:
1840    
1841    Changes:
1842    
1843     1. Implemented "subdir" and "witness" options for noweb tool.
1844        This caused some slight internal changes in CM's tool implementation.
1845     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
1846        some remaining issues from earlier path anchor changes.
1847     3. Updated CM manual accordingly.
1848    
1849     4. Changed implementation of back-tracing so that I now consider it
1850        ready for prime-time.
1851    
1852        In particular, you don't have to explicitly trigger the back-trace
1853        anymore.  Instead, if you are running BTrace-instrumented code and
1854        there is an uncaught exception (regardless of whether or not it was
1855        raised in instrumented code), the top-level evalloop will print
1856        the back-trace.
1857    
1858        Features:
1859    
1860          - Instrumented and uninstrumented code work together seemlessly.
1861            (Of course, uninstrumented code is never mentioned in actual
1862             back-traces.)
1863    
1864          - Asymptotic time- and space-complexity of instrumented code is
1865            equal to that of uninstrumented code.  (This means that
1866            tail-recursion is preserved by the instrumentation phase.)
1867    
1868          - Modules whose code has been instrumented in different sessions
1869            work together without problem.
1870    
1871          - There is no penalty whatsoever on uninstrumented code.
1872    
1873          - There is no penalty on "raise" expressions, even in
1874            instrumented code.
1875    
1876        A potential bug (or perhaps it is a feature, too):
1877    
1878          A back-trace reaches no further than the outermost instrumented
1879          non-trivial "raise".  Here, a "trivial" raise is one that is the
1880          sole RHS of a "handle" rule.  Thus, back-traces reach trough
1881    
1882               <exp> handle e => raise e
1883    
1884          and even
1885    
1886               <exp> handle Foo => raise Bar
1887    
1888          and, of course, through
1889    
1890               <exp> handle Foo => ...
1891    
1892         if the exception was not Foo.
1893    
1894         Back-traces always reach right through any un-instrumented code
1895         including any of its "handle" expressions, trivial or not.
1896    
1897       To try this out, do the following:
1898    
1899         - Erase all existing binfiles for your program.
1900           (You may keep binfiles for those modules where you think you
1901            definitely don't need back-tracing.)
1902         - Turn on back-trace instrumentation:
1903              SMLofNJ.Internals.BTrace.mode (SOME true);
1904         - Recompile your program.  (I.e., run "CM.make" or "use".)
1905         - You may now turn instrumentation off again (if you want):
1906              SMLofNJ.Internals.BTrace.mode (SOME false);
1907         - Run your program as usual.  If it raises an exception that
1908           reaches the interactive toplevel, then a back-trace will
1909           automatically be printed.  After that, the toplevel loop
1910           will print the exception history as usual.
1911    
1912    ----------------------------------------------------------------------
1913    Name: Matthias Blume
1914    Date: 2000/06/26 09:56:46 JST
1915    Tag: blume-20000626-setup
1916    Description:
1917    
1918    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
1919          ML code before and after compiling a file (e.g., to set compiler
1920          flags)
1921    
1922    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
1923              - associated changes to btrace.sml (BTrace instrumentation pass)
1924              - cleaner implementation of btimp.sml (BTrace tracing and report
1925                module)
1926    
1927    CM manual: * new path encoding documented
1928               * description of setup-parameter to "sml" added
1929    
1930    The biggest user-visible change to back-tracing is that it is no
1931    longer necessary to compile all traced modules within the same
1932    session.  (This was a real limitation.)
1933    
1934    ----------------------------------------------------------------------
1935    Name: Matthias Blume
1936    Date: 2000/06/24 12:40:00 JST
1937    Tag: blume-20000624-startup
1938    Description:
1939    
1940    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
1941    bit too often -- to put it mildly. :)
1942    
1943    ----------------------------------------------------------------------
1944    Name: Matthias Blume
1945    Date: 2000/06/23 18:20:00 JST
1946    Tag: blume-20000623-btrace
1947    Description:
1948    
1949    This updates adds a backtrace facility to aid programmers in debugging
1950    their programs.  This involves the following changes:
1951    
1952    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
1953       keeping track of the current call stack.  When programs are compiled
1954       in a special mode, the compiler will insert calls to these hooks
1955       into the user program.
1956       "Hook" means that it is possible for different implementations of
1957       back-tracing to register themselves (at different times).
1958    
1959    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
1960       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
1961       It can be turned on using this call:
1962         SMLofNJ.Internals.BTrace.mode (SOME true);
1963       Turning it off again:
1964         SMLofNJ.Internals.BTrace.mode (SOME false);
1965       Querying the current status:
1966         SMLofNJ.Internals.BTrace.mode NONE;
1967       Annotated programs are about twice as big as normal ones, and they
1968       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
1969       where all hooks do nothing).  The slowdown with a plugin that is
1970       actually useful (such as the one supplied by default) is even greater,
1971       but in the case of the default plugin it is still only an constant
1972       factor (amortized).
1973    
1974    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
1975       with a sub-structure BTrace for controlling back-tracing.  In particular,
1976       the above-mentioned function "mode" controls whether the annotation
1977       phase is invoked by the compiler.  Another important function is
1978       "trigger": when called it aborts the current execution and causes
1979       the top-level loop to print a full back-trace.
1980    
1981    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
1982       for back-tracing.  It keeps track of the dynamic call stack and in
1983       addition to that it keeps a partial history at each "level" of that
1984       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
1985       d and b (at separate times, dynamically), then the report will show:
1986    
1987       GOTO   d
1988             /c
1989       GOTO  \b
1990       CALL   a
1991    
1992       This shows that there was an initial non-tail call of a, then a
1993       tail-call to b or c, looping behavior in a cluster of functions that
1994       consist of b and c, and then a goto from that cluster (i.e., either from
1995       b or from c) to d.
1996    
1997       Note that (depending on the user program) the amount of information
1998       that the back-trace module has to keep track of at each level is bounded
1999       by a constant.  Thus, the whole implementation has the same asymptotical
2000       complexity as the original program (both in space and in time).
2001    
2002    5. compiler/TopLevel/interact/evalloop.sml has been modified to
2003       handle the special exception SMLofNJ.Internals.BTrace.BTrace
2004       which is raised by the "trigger" function mentioned above.
2005    
2006    Notes on usage:
2007    
2008    - Annotated code works well together with unannotated code:
2009    Unannotated calls simply do not show up at all in the backtrace.
2010    
2011    - It is not a good idea to let modules that were annotated during
2012    different sessions run at the same time.  This is because the compiler
2013    chooses small integers to identify individual functions, and there
2014    will be clashes if different modules were compiled in separate sessions.
2015    (Nothing will crash, and you will even be told about the clashes, but
2016    back-trace information will in general not be useful.)
2017    
2018    - Back-tracing can be confused by callcc and capture.
2019    
2020    - The only way of getting a back-trace right now is to explicitly
2021    invoke the "trigger" function from your user program.  Eventually, we
2022    should make every exception carry back-trace information (if
2023    available).  But since this creates more overhead at "raise"-time
2024    (similar to the current exnHistory overhead), I have not yet
2025    implemented this.  (The implementation will be rather easy.)  With
2026    exceptions carrying back-trace information, this facility will be even
2027    more useful because users don't need to modify their programs...
2028    
2029    - While it is possible to compile the compiler with back-trace
2030    annotations turned on (I did it to get some confidence in
2031    correctness), you must make absolutely sure that core.sml and
2032    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
2033    be compiled with annotation because there is no core access yet, but
2034    if you compile btimp.sml with annotation, then the system will go into
2035    an infinite recursion and crash.)
2036    Since CM currently does not know about BTrace, the only way to turn
2037    annotations on and off for different modules of the compiler is to
2038    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
2039    this is awkward and clumsy.
2040    
2041    Sample sessions:
2042    
2043    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2044    - SMLofNJ.Internals.BTrace.mode (SOME true);
2045    [autoloading]
2046    [autoloading done]
2047    val it = false : bool
2048    - structure X = struct
2049    -     fun main n = let
2050    -         fun a (x, 0) = d x
2051    -           | a (x, n) = b (x, n - 1)
2052    -         and b (x, n) = c (x, n)
2053    -         and c (x, n) = a (x, n)
2054    -         and d x = e (x, 3)
2055    -         and e (x, 0) = f x
2056    -           | e (x, n) = e (x, n - 1)
2057    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
2058    -           | f n = n * g (n - 1)
2059    -         and g n = a (n, 3)
2060    -     in
2061    -         f n
2062    -     end
2063    - end;
2064    structure X : sig val main : int -> int end
2065    - X.main 3;
2066    *** BACK-TRACE ***
2067    GOTO   stdIn:4.2-13.20: X.main[2].f
2068    GOTO-( stdIn:4.2-13.20: X.main[2].e
2069    GOTO   stdIn:4.2-13.20: X.main[2].d
2070         / stdIn:4.2-13.20: X.main[2].a
2071         | stdIn:4.2-13.20: X.main[2].b
2072    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2073    CALL   stdIn:4.2-13.20: X.main[2].g
2074    GOTO   stdIn:4.2-13.20: X.main[2].f
2075    GOTO-( stdIn:4.2-13.20: X.main[2].e
2076    GOTO   stdIn:4.2-13.20: X.main[2].d
2077         / stdIn:4.2-13.20: X.main[2].a
2078         | stdIn:4.2-13.20: X.main[2].b
2079    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2080    CALL   stdIn:4.2-13.20: X.main[2].g
2081    GOTO   stdIn:4.2-13.20: X.main[2].f
2082    GOTO-( stdIn:4.2-13.20: X.main[2].e
2083    GOTO   stdIn:4.2-13.20: X.main[2].d
2084         / stdIn:4.2-13.20: X.main[2].a
2085         | stdIn:4.2-13.20: X.main[2].b
2086    GOTO-\ stdIn:4.2-13.20: X.main[2].c
2087    CALL   stdIn:4.2-13.20: X.main[2].g
2088    GOTO   stdIn:4.2-13.20: X.main[2].f
2089    CALL   stdIn:2.15-17.4: X.main[2]
2090    -
2091    
2092    (Note that because of a FLINt bug the above code currently does not
2093    compile without BTrace turned on.)
2094    
2095    Here is another example, using my modified Tiger compiler:
2096    
2097    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
2098    - SMLofNJ.Internals.BTrace.mode (SOME true);
2099    [autoloading]
2100    [autoloading done]
2101    val it = false : bool
2102    - CM.make "sources.cm";
2103    [autoloading]
2104    ...
2105    [autoloading done]
2106    [scanning sources.cm]
2107    [parsing (sources.cm):parse.sml]
2108    [creating directory CM/SKEL ...]
2109    [parsing (sources.cm):tiger.lex.sml]
2110    ...
2111    [wrote CM/sparc-unix/semant.sml]
2112    [compiling (sources.cm):main.sml]
2113    [wrote CM/sparc-unix/main.sml]
2114    [New bindings added.]
2115    val it = true : bool
2116    - Main.compile ("../testcases/merge.tig", "foo.out");
2117    *** BACK-TRACE ***
2118    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
2119    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2120    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2121    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
2122    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2123    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2124    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
2125         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
2126    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
2127    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
2128    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
2129    CALL   main.sml:1.18-118.4: Main.compile[2]
2130    -
2131    
2132    ----------------------------------------------------------------------
2133    Name: Matthias Blumen
2134    Date: 2000/06/21 18:00:00 JST
2135    Tag: blume-20000621-manual
2136    Description:
2137    
2138    CM manual update: Path environments documented.
2139    
2140    ----------------------------------------------------------------------
2141    Name: Matthias Blume
2142    Date: 2000/06/19 13:40:00
2143    Tag: blume-20000619-manual
2144    Description:
2145    
2146    CM manual and system/README update.  This only covers the fact that
2147    there are no more implicit anchors.  (Path environments and the "bind"
2148    option to "cm" have yet to be documented.)
2149    
2150    ----------------------------------------------------------------------
2151    Name: Matthias Blume
2152    Date: 2000/06/19 11:05:00 JST
2153    Tag: blume-20000619-chdir-bugfix
2154    Description:
2155    
2156    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
2157    
2158    ----------------------------------------------------------------------
2159    Name: Matthias Blume
2160    Date: 2000/06/18 22:00:10 JST
2161    Tag: blume-20000618-implicit-anchors-really-gone
2162    Description:
2163    
2164    I updates the previous HISTORY entry where I forgot to mention that
2165    implicit anchors are no longer with us.
2166    
2167    The current update also gets rid of the (now useless) controller
2168    CM.Control.implicit_anchors.
2169    
2170    ----------------------------------------------------------------------
2171    Name: Matthias Blume
2172    Date: 2000/06/16 17:30:00 JST
2173    Tag: blume-20000616-anchorenv
2174    Description:
2175    
2176    This patch implements the long anticipated (just kidding :) "anchor
2177    environment" mechanism.  In the course of doing this, I also
2178    re-implemented CM's internal "SrcPath" module from scratch.  The new
2179    one should be more robust in certain boundary cases.  In any case, it
2180    is a lot cleaner than its predecessor (IMHO).
2181    
2182    This time, although there is yet another boot file format change, I
2183    kept the unpickler backward-compatible.  As a result, no new bootfiles
2184    are necessary and bootstrapping is straightforward.  (You cannot read
2185    new bootfiles into an old system, but the other way around is no
2186    problem.)
2187    
2188    Visible changes:
2189    
2190    ** 0. Implicit path anchors (without the leading $-symbol) are no
2191    longer recognized at all. This means that such path names are not
2192    illegal either.  For example, the name basis.cm simply refers to a
2193    local file called "basis.cm" (i.e, the name is an ordinary path
2194    relative to .cm-files directory).  Or, to put it differently, only
2195    names that start with $ are anchored paths.
2196    
2197    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
2198    vanished.
2199    
2200    John (Reppy) had critizised this as soon as I originally proposed and
2201    implemented it, but at that time I did not really deeply believe
2202    him. :) Now I came full-circle because I need the $<singlearc> syntax
2203    in another place where it cannot be seen as an abbreviation for
2204    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
2205    seems to mean (i.e., it "expands" into the corresponding anchor
2206    value).
2207    
2208    However, when paths are used as members in CM description files, it
2209    continues to be true that there must be at least another arc after the
2210    anchor.  This is now enforced separately during semantic analysis
2211    (i.e., from a lexical/syntactical point of view, the notation is ok.)
2212    
2213    ** 2. The "cm" class now accepts an option "bind".  The option's value
2214    is a sub-option list of precisely two items -- one labeled "anchor"
2215    and the other one labeled "value".  As you might expect, "anchor" is
2216    used to specify an anchor name to be bound, and "value" specifies what
2217    the anchor is being bound to.
2218    
2219    The value must be a directory name and can be given in either standard
2220    syntax (including the possibility that it is itself an anchored path)
2221    or native syntax.
2222    
2223    Examples:
2224    
2225       foo.cm (bind:(anchor:bar value:$mystuff/bar))
2226       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
2227    
2228    and so on.
2229    
2230    The meaning of this is that the .cm-file will be processed with an
2231    augmented anchor environment where the given anchor(s) is/are bound to
2232    the given values(s).
2233    
2234    The rationale for having this feature is this: Suppose you are trying
2235    to use two different (already stable) libraries a.cm and b.cm (that
2236    you perhaps didn't write yourself).  Further, suppose each of these
2237    two libraries internally uses its own auxiliary library $aux/lib.cm.
2238    Normally you would now have a problem because the anchor "lib" can not
2239    be bound to more than one value globally.  Therefore, the project that
2240    uses both a.cm and b.cm must locally redirect the anchor to some other
2241    place:
2242    
2243       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
2244       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
2245    
2246    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
2247    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
2248    
2249    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
2250    you when you do so at the time of CM.stabilize).  Therefore, you can
2251    also use an anchored path as the value:
2252    
2253      a.cm (bind:(anchor:lib value:$a-lib))
2254      b.cm (bind:(anchor:lib value:$b-lib))
2255    
2256    Now you can globally configure (using the usual CM.Anchor.anchor or
2257    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
2258    itself is always locally bound, setting it globally is no longer
2259    meaningful or necessary (but it does not hurt either).  In fact, "lib"
2260    can still be used as a global anchor for separate purposes.  As a
2261    matter of fact, one can locally define "lib" in terms of a global
2262    "lib":
2263    
2264      a.cm (bind:(anchor:lib value:$lib/a))
2265      b.cm (bind:(anchor:lib value:$lib/b))
2266    
2267    ** 3: The encoding of path names has changed.  This affects the way
2268    path names are shown in CM's progress report and also the internal
2269    protocol encoding used for parallel make.
2270    
2271    The encoding now uses one or more ':'-separated segments.  Each
2272    segments corresponds to a file that has been specified relative to the
2273    file given by its preceding segment.  The first segment is either
2274    relative to the CWD, absolute, or anchored.  Each segment itself is
2275    basically a Unix pathname; all segments but the first are relative.
2276    
2277    Example:
2278    
2279       $foo/bar/baz.cm:a/b/c.sml
2280    
2281    This path denotes the file bar/a/b/c.sml relative to the directory
2282    denoted by anchor "foo".  Notice that the encoding also includes
2283    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
2284    paths are resolved relative to the .cm-files directory, so baz.cm must
2285    be ignored to get the "real" pathname.
2286    
2287    To make this fact more obvious, CM puts the names of such "virtual
2288    arcs" into parentheses when they appear in progress reports. (No
2289    parentheses will appear in the internal protocol encoding.)  Thus,
2290    what you really see is:
2291    
2292      $foo/bar/(baz.cm):a/b/c.sml
2293    
2294    I find this notation to be much more informative than before.
2295    
2296    Another new feature of the encoding is that special characters
2297    including parentheses, colons, (back)slashes, and white space are
2298    written as \ddd (where ddd is the decimal encoding of the character).
2299    
2300    *** The CM manual still needs to be updated.
2301    
2302    ----------------------------------------------------------------------
2303    Name: Allen Leung
2304    Date: 2000/06/15 00:38:00
2305    Tag: leunga-20000615-x86-peephole
2306    
2307    x86 Peephole fix by Fermin.  Affects c-- and moby only.
2308    
2309    ----------------------------------------------------------------------
2310    Name: Matthias Blume
2311    Date: 2000/06/12 11:40:00
2312    Tag: blume-20000612-parmakefix
2313    Description:
2314    
2315    More cleanup after changing the file naming scheme: This time I
2316    repaired the parallel make mechanism for CMB.make which I broke earlier.
2317    
2318    ----------------------------------------------------------------------
2319    Name: Allen Leung
2320    Date: 2000/06/09 01:25:00
2321    Tag: leunga-20000609-various
2322    
2323    None of these things should affect normal SML/NJ operations
2324    
2325    1. Peephole improvements provided by Fermin (c--)
2326    2. New annotation DEFUSE for adding extra dependence (moby)
2327    3. New X86 LOCK instructions (moby)
2328    4. New machine description language for reservation tables (scheduling)
2329    5. Fixes to various optimization/analysis modules (branch chaining, dominator
2330       trees etc.)
2331    6. I've changed the CM files so that they can work with versions
2332       110.0.6, 110.25 and 110.28
2333    
2334    ----------------------------------------------------------------------
2335    Name: Matthias Blume
2336    Date: 2000/06/09 12:40:00
2337    Tag: blume-20000609-log
2338    Description:
2339    
2340    - Removed all(?) remaining RCS Log entries from sources.
2341    
2342    - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
2343      anchored paths).
2344    
2345    ----------------------------------------------------------------------
2346    Name: Matthias Blume
2347    Date: 2000/06/07 17:00:00 JST
2348    Tag: blume-20000607-no-implicit-anchors
2349    Description:
2350    
2351    1. This update changes the default setting for
2352    CM.Control.implicit_anchors from true to false.  This means that
2353    implicit anchors are no longer permitted by default.  I also tried to
2354    make sure that nothing else still relies on implicit anchors.
2355    (This is the next step on the schedule towards a CM that does not even
2356    have the notion of implicit anchors anymore.)
2357    
2358    2. More CM manual updates.
2359    
2360    3. I managed to track down and fix the pickling bug I mentioned last
2361    time.  Because of the previously existing workaround, this entails no
2362    immediate practical changes.
2363    
2364    ----------------------------------------------------------------------
2365    Name: Matthias Blume
2366    Date: 2000/06/06 11:15:00 JST
2367    Tag: blume-20000606-lazierpickle
2368    Description:
2369    
2370    !!!! NEW BOOT FILES !!!!
2371    
2372    * The main purpose of this update is to make library pickles lazier in
2373    order to reduce the initial space penalty for autoloading a library.
2374    As a result, it is now possible to have $smlnj/compiler.cm
2375    pre-registered.  This should take care of the many complaints or
2376    inquiries about missing structure Compiler.  This required changes to
2377    CM's internal data structures and small tweaks to some algorithms.
2378    
2379    As a neat additional effect, it is no longer necessary (for the sake
2380    of lean heap image files) to distinguish between a "minimal" CM and a
2381    "full" CM.  Now, there is only one CM (i.e., the "full" version:
2382    $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
2383    interactive top level. ($smlnj/cm/minimal.cm is gone.)
2384    
2385    To make the life of compiler-hackers easier, "makeml" now also
2386    pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm).  In other
2387    words, after you bootstrap a new sml for the first time, you will not
2388    have to autoload $smlnj/cmb.cm again afterwards.  (The first time
2389    around you will still have to do it, though.)
2390    
2391    * A second change consists of major updates to the CM manual.  There
2392    are now several appendices with summary information and also a full
2393    specification of the CM description file syntax.
2394    
2395    * In directory src/system I added the script "allcross".  This script
2396    invokes sml and cross-compiles the compiler for all supported
2397    architectures.  (Useful when providing a new set of boot files.)
2398    
2399    * There seems to be a latent bug in my "lazy pickles" mechanism.  I
2400    added a small tweak to pickle-util.sml to work around this problem,
2401    but it is not a proper fix yet.  I will investigate further.  (The
2402    effect of the bug was an inflation of library pickle size.)
2403    
2404    * Version number increased to 110.28.1 (to avoid compatibility problems).
2405    
2406    ----------------------------------------------------------------------
2407    Name: Allen Leung
2408    Date: 2000/05/25 17:28 EDT
2409    Tag: leunga-20000525-ra
2410    Description:
2411    
2412      Fixed a bug in freezing phase of the register allocator.
2413    
2414    ----------------------------------------------------------------------
2415    Name: Allen Leung
2416    Date: 2000/05/15 22:53 EDT
2417    Tag: leunga-20000515-alpha-x86-ra
2418    Description:
2419    
2420      1. Alpha
2421    
2422          Slight cleanup.  Removed the instruction SGNXL
2423    
2424      2. X86
2425    
2426          Added the following instructions to the instruction set:
2427    
2428            ROLx, RORx,
2429            BTx, BTSx, BTLx, BTRx,
2430            XCHGx, and variants with the LOCK prefix
2431    
2432      3. Register Allocation
2433    
2434          The module ra-rewrite-with-renaming has been improved.
2435    
2436      These have no effect on SML/NJ.
2437    
2438    ----------------------------------------------------------------------
2439    Name: Matthias Blume
2440    Date: 2000/05/15 16:20:00 JST
2441    Tag: blume-20000515-lightrebuild
2442    Description:
2443    
2444    1. I added an alternative to "-rebuild" to "makeml".  The difference is
2445       that prior to calling CMB.make' the CM-variable "LIGHT" will be
2446       defined.  In effect, the command will not build any cross-compiler
2447       backends and therefore finish more quickly.
2448    
2449       The "fixpt" script also takes a "-light" switch to be able to use
2450       this new facility while compiling for a fixpoint.
2451    
2452    2. I replaced all mentions of anchored paths in group owner specifications
2453       with simple relative paths (usually starting with "..").
2454       The rationale is that a library's internal workings should not be
2455       compromised by the lack of some anchor.  (An anchor is necessary
2456       for someone who wants to refer to the library by an anchored path,
2457       but it should not be necessary to build the same library in the first
2458       place.)
2459    
2460    3. I changed the way CM's tool mechanism determines the shell command
2461       string used for things like ml-yacc etc. so that it does not break
2462       when CM.Control.implicit_anchors is turned off.
2463    
2464    ----------------------------------------------------------------------
2465    Name: Matthias Blume
2466    Date: 2000/05/12 18:20:00 JST
2467    Tag: blume-20000512-ml-build
2468    Description:
2469    
2470    Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
2471    getting installed properly (by config/install.sh).
2472    
2473    ----------------------------------------------------------------------
2474    Name: Matthias Blume
2475    Date: 2000/05/12 17:30:00 JST
2476    Tag: blume-20000512-anchors
2477    Description:
2478    
2479    !!! NEW BOOT FILES !!!
2480    
2481    This change is in preparation of fading out support for "implicitly
2482    anchored path names".  I went through all sources and used the
2483    explicit (and relatively new) $-notation.  See system/README and the
2484    CM manual for more info on this.
2485    
2486    I also modified the anchoring scheme for some things such as "smlnj",
2487    "MLRISC", "cm", etc. to take advantage of the fact that explicit
2488    anchors are more expressive: anchor name and first arc do not have to
2489    coincide.  This entails the following user-visible change:
2490    
2491    You have to write $smlnj/foo/bar instead of smlnj/foo/bar.  In
2492    particular, when you fire up sml with a command-line argument, say,
2493    e.g.:
2494    
2495       sml '$smlnj/cmb.cm'
2496    
2497    At the ML toplevel prompt:
2498    
2499       CM.autoload "$smlnj/cmb.cm";
2500    
2501    There is also a new controller in CM.Control that can be used to turn
2502    off all remaining support for implicit anchors by saying:
2503    
2504        CM.autoload "$smlnj/
2505        #set CM.Control.implicit_anchors false;
2506    
2507    This causes CM to reject implicitly anchored paths.  This is (for the
2508    time being) less permissive than the "final" version where there will
2509    be no more such implicit anchors and relative paths will be just that:
2510    relative.
2511    
2512    The next step (version after next version?) will be to make the
2513    default for CM.Control.implicit_anchors false.  After the dust has
2514    settled, I can then produce the "final" version of this...
2515    
2516    Note: Since bootstrapping is a bit tricky, I provided new boot files.
2517    
2518    ----------------------------------------------------------------------
2519    Name: Matthias Blume
2520    Date: 2000/05/11 16:30:00 JST
2521    Tag: blume-20000511-sources
2522    Description:
2523    
2524    The main change is that I added function CM.sources as a generalized
2525    version of the earlier CM.makedepend.  This entails the following
2526    additional changes:
2527    
2528      - CM.makedepend has been dropped.
2529    
2530      - CM manual has been updated.
2531    
2532      - TOOLS signature and API have been changed.
2533    
2534    ----------------------------------------------------------------------
2535    Name: Allen Leung
2536    Date: 2000/05/10 21:17 EDT
2537    Tag: leunga-20000510-moby-c--ssa
2538    Description:
2539    
2540      Various bug fixes and new features for C--, Moby and MLRISC optimizations.
2541    None of these affect SML/NJ.
2542    
2543    1. Register Allocation
2544    
2545        a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
2546           This module tries to remove local (i.e. basic block level) redundancies
2547           during spilling.
2548    
2549        b. A new framework for performing region based register allocation.
2550           Not yet entirely functional.
2551    
2552    2. X86
2553    
2554       a. DefUse for POP was missing the stack pointer [found by Lal]
2555       b. Reload for CALL was incorrect in X86Spill [found by John]
2556       c. Various fixes in X86Spill so that it can be used correctly for
2557          the new spilling module.
2558    
2559    3. SSA/IR
2560    
2561       a. New module ir/dj-dataflow.sml implements elimination based
2562          data flow analysis.
2563    
2564    4. MLRiscGen
2565    
2566       a. Fix for gc type annotation
2567    
2568    5. MDGen
2569    
2570       Various fixes for machine description -> ml code translation.  For ssa
2571       only.
2572    
2573    ----------------------------------------------------------------------
2574    Name: Allen Leung
2575    Date: 2000/05/08 22:17 EDT
2576    Tag: leunga-20000508-labexp
2577    Description:
2578    
2579      Fermin has found a few assembly problems with constant expressions
2580      generated in LabelExp.  Mostly, the problems involve extra parentheses,
2581      which choke on dumb assemblers.  This is his fix.
2582    
2583    ----------------------------------------------------------------------
2584    Name: Dave MacQueen
2585    Date: 2000/04/09 14:00 EDT
2586    Tag: dbm-20000502-Version_110_28
2587    Description:
2588    
2589    1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
2590    
2591    2. Updated config/version to 110.28
2592    
2593    3. Updated config/srcarchiveurl
2594    
2595    3. New boot files!
2596       ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
2597    
2598    ----------------------------------------------------------------------
2599    Name: Matthias Blume
2600    Date: 2000/05/01 19:05:00 JST
2601    Tag: blume-20000501-noweb
2602    Description:
2603    
2604    A new noweb tool has been added.  The existing system is entirely
2605    unaffected by this, but some CM users have asked for renewed noweb
2606    support.  Everything is documented in the CM manual.
2607    
2608    New (plugin) libraries:
2609    
2610       noweb-tool.cm
2611       nw-ext.cm
2612    
2613    ----------------------------------------------------------------------
2614    Name: Dave MacQueen
2615    Date: 2000/04/30 12:40PM EDT
2616    Tag: dbm-20000430-bug_fixes
2617    Description:
2618    
2619    1. Fix for bug 1498
2620       smlnj/src/system/Basis/Implementation/Unsafe/object.sig
2621       smlnj/src/system/Basis/Implementation/Unsafe/object.sml
2622         added toRealArray function
2623       smlnj/src/compiler/MiscUtil/print/ppobj.sml
2624         added check for tag Obj.RealArray to array printing case in ppObj
2625    
2626    2. Fix for bug 1510
2627       smlnj/src/compiler/Semant/types/typesutil.sml
2628         fixed definition of dummyargs (used by equalTycon) so that
2629         dummy args are distinct types
2630    
2631    ----------------------------------------------------------------------
2632    Name: Matthias Blume
2633    Date: 2000/04/30 01:00:00 JST
2634    Tag: blume-20000430-versions
2635    Description:
2636    
2637    1. CM version numbering added.  This is an implementation of Lal's
2638       proposal for adding version numbers and version checking to .cm
2639       files.  Lal said that his proposal was just that -- a proposal.
2640       For the time being I went ahead and implemented it so that people
2641       can comment on it.  Everything is completely backward-compatible
2642       (except for the stable library format, i.e., new bootfiles!).
2643    
2644       As usual, see the CM manual for details.
2645    
2646    2. An alternative syntax for anchored paths has been implemented.
2647       Dave has recently voiced the same concerns that I had when I did
2648       this, so there should be some support.  My take is that eventually
2649       I will let support for the current syntax (where anchors are
2650       "implicit") fade out in favor of the new, explicit syntax.
2651       In order to be backward-compatible, both old and new syntax are
2652       currently supported.
2653    
2654       Again, see the CM manual for details.
2655    
2656    3. Parallel make is trying to be slightly smarter:  When the master
2657       process finds a "bottleneck", i.e., when there is only one
2658       compilation unit that can be compiled and everybody else is
2659       waiting on it, then it will simply compile it directly instead
2660       of clumsily telling one of the slaves to do it.
2661    
2662    4. Support for "unsharing" added.  This is necessary in order to be
2663       able to have two different versions of the same library running
2664       at the same time (e.g., for trying out a new MLRISC while still
2665       having the old MLRISC linked into the current compiler, etc.)
2666       See the CM manual.
2667    
2668    5. Simple "makedepend" functionality added for generating Makefile
2669       dependency information.  (This is rather crude at the moment.
2670       Expect some changes here in the future.)
2671    
2672    6. ".fun" added as a recognized suffix for ML files. Also documented
2673       explicitly in the manual that the fallback behavior (unknown suffix
2674       -> ML file) is not an official feature!
2675    
2676    7. Small changes to the pickler for stable libraries.
2677    
2678    8. Several internal changes to CM (for cleanup/improvement).
2679    
2680    
2681    !!!! NEW BINFILES !!!!
2682    
2683    ----------------------------------------------------------------------
2684    Name: Matthias Blume
2685    Date: 2000/04/28 17:30:00 JST
2686    Tag: blume-20000428-pathconfig
2687    Description:
2688    
2689    1. I changed config/install.sh to remove duplicate entries from the
2690       lib/pathconfig file at the end.  Moreover, the final version of
2691       lib/pathconfig is sorted alphabetically.  The same (sorting) is done
2692       in src/system/installml.
2693    
2694    2. The config/install.sh script now consistently uses relative
2695       pathnames in lib/pathconfig whenever the anchor is in the lib
2696       directory.  (So far this was true for the libraries that come
2697       pre-compiled and bundled as part of the bootfiles but not for
2698       libraries that are compiled by the script itself.)
2699    
2700    ----------------------------------------------------------------------
2701    Name: Matthias Blume
2702    Date: 2000/04/26 13:10:00 JST
2703    Tag: blume-20000426-fun_suffix
2704    Description:
2705    
2706    Added ".fun" as a recognized file name suffix (for ML code).
2707    
2708    ----------------------------------------------------------------------
2709    Name: Allen Leung
2710    Date: 2000/04/25 17:00:00 EST
2711    Tag: leunga-20000425-alpha-ra
2712    Description:
2713    
2714    1. Alpha
2715    
2716        PSEUDOARITH was missing in AlphaRewrite.  This causes an endless loop
2717    in C--.
2718    
2719    2. RA
2720    
2721       Added a flag "ra-dump-size" to print out the size of the flowgraph
2722       and the interference graph.
2723    
2724    ----------------------------------------------------------------------
2725    Name: Dave MacQueen
2726    Date: 2000/04/25/
2727    Tag: dbm-20000425-mlyacc_doc_examples
2728    Description:
2729      Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
2730      Updated all three examples in src/ml-yacc/examples to run
2731      under 110.* using CM.make.
2732    
2733    ----------------------------------------------------------------------
2734    Name: Allen Leung
2735    Date: 2000/04/20 23:04:00 EST
2736    Tag: leunga-20000420-ssa-c---stuff
2737    Description:
2738    
2739      This update synchronizes my repository with Yale's.  Most of these
2740    changes, however, do not affect SML/NJ at all (the RA is an exception).
2741    
2742    1. Register Allocator
2743    
2744       a. An improvement in the interference graph construction:
2745          Given a copy
2746    
2747                s <- t
2748    
2749          no interference edge between s and t is added for this definition of s.
2750    
2751       b. I've added two new spill heuristic modules that Fermin and I developed
2752          (in the new library RA.cm). These are unused in SML/NJ but maybe
2753          useful for others (Moby?)
2754    
2755    2. X86
2756    
2757       a. Various fixes in the backend provided by Fermin [C--] and Lal.
2758    
2759    3. Alpha
2760    
2761       a. Added the BSR instruction and code generation that goes with it [C--]
2762       b. Other fixes too numerous to recount provided by Fermin [C--]
2763    
2764    4. Regmaps
2765    
2766       a. The regmaps are not initialized with the identity physical bindings
2767          at creation time.  This is unneeded.
2768    
2769    5. MLRISC Optimizations
2770    
2771       a. The DJ-Graph module can now compute the iterated dominance frontiers
2772          intersects with liveness incrementally in linear time! Woohoo!
2773          This is now used in my new SSA construction algorithm.
2774    
2775       b. THe branch reorganization module is now smarter about linear chains of
2776          basic blocks.
2777    
2778    
2779    ----------------------------------------------------------------------
2780    Name: Matthias Blume
2781    Date: 2000/04/12 13:52:00 JST
2782    Tag: blume_main_v110p27_1
2783    Description:
2784    
2785    Changed install.sh script to handle archive files without version number
2786    and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
2787    name of the boot file archive.
2788    
2789    ----------------------------------------------------------------------
2790    Name: Dave MacQueen
2791    Date: 2000/04/09 14:00 EDT
2792    Tag: dbm-20000410-Version_110_27
2793    Description:
2794    
2795    1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
2796    
2797    2. Updated src/config/version to 110.27
2798    
2799    3. New boot files!
2800    
2801    ----------------------------------------------------------------------
2802    Name: Allen Leung
2803    Date: 2000/04/09 19:09:00 EST
2804    Tag: leunga-20000409-misc
2805    Description:
2806    
2807    1.  Yet another fix for x86 assembly for idivl, imull, mull and friends.
2808    
2809    2.  Miscellaneous improvements to MLRISC (unused in sml/nj)
2810    
2811    ----------------------------------------------------------------------
2812    Name: Stefan
2813    Date: 2000/04/07 10:00:00 EDT
2814    Tag: monnier-20000406-branch-handling
2815    Description:
2816    
2817    Improved handling of branches (mostly those generated from
2818    polymorphic equality), removed switchoff and changed the
2819    default optimization settings (more cpsopt and less flintopt).
2820    
2821    ----------------------------------------------------------------------
2822    Name: Allen Leung
2823    Date: 2000/04/06 01:30:00 EST
2824    Tag: leunga-20000406-peephole-x86-SSA-2
2825    Description:
2826    
2827       Forgot a few files.
2828    
2829    ----------------------------------------------------------------------
2830    Name: Allen Leung
2831    Date: 2000/04/06 00:36:00 EST
2832    Tag: leunga-20000406-peephole-x86-SSA
2833    Description:
2834    
2835    1.  New Peephole code
2836    
2837    2.  Minor improvement to X86 instruction selection
2838    
2839    3.  Various fixes to SSA and machine description -> code translator
2840    
2841    ----------------------------------------------------------------------
2842    Name: Matthias Blume
2843    Date: 2000/04/05 12:30:00 JST
2844    Tag: blume_main_v110p26p2_3
2845    Description:
2846    
2847    This update just merges three minor cosmetic updates to CM's sources
2848    to get ready for the 110.27 code freeze on Friday.  No functionality
2849    has changed.
2850    
2851    ----------------------------------------------------------------------
2852    Name: Allen Leung
2853    Date: 2000/04/04 19:39:00 EST
2854    Tag: leunga-20000404-x86-asm
2855    Description:
2856    
2857    1.  Fixed a problem in X86 assembly.
2858    
2859        Things like
2860    
2861           jmp %eax
2862           jmp (%eax)
2863    
2864        should be output as
2865    
2866           jmp *%eax
2867           jmp *(%eax)
2868    
2869    2.  Assembly output
2870    
2871          Added a new flag
2872    
2873              "asm-indent-copies" (default to false)
2874    
2875          When this flag is on, parallel copies will be indented an extra level.
2876    
2877    ----------------------------------------------------------------------
2878    Name: Allen Leung
2879    Date: 2000/04/04 03:18:00 EST
2880    Tag: leunga-20000404-C--Moby
2881    Description:
2882    
2883        All of these fixes are related to C--, Moby, and my own optimization
2884        stuff; so they shouldn't affect SML/NJ.
2885    
2886    1.  X86
2887    
2888        Various fixes related floating point, and extensions.
2889    
2890    2.  Alpha
2891    
2892        Some extra patterns related to loads with signed/zero extension
2893        provided by Fermin.
2894    
2895    3.  Assembly
2896    
2897        When generating assembly, resolve the value of client defined constants,
2898        instead of generating symbolic values.  This is controlled by the
2899        new flag "asm-resolve-constants", which is default to true.
2900    
2901    4.  Machine Descriptions
2902    
2903        a. The precedence parser was slightly broken when parsing infixr symbols.
2904        b. The type generalizing code had the bound variables reversed, resulting
2905           in a problem during arity raising.
2906        c. Various fixes in machine descriptions.
2907    
2908    ----------------------------------------------------------------------
2909    Name: Matthias Blume
2910    Date: 2000/04/03 16:05:00 JST
2911    Tag: blume_main_v110p26p2_2
2912    Description:
2913    
2914    I eliminated coreEnv from compInfo.  Access to the "Core" structure is
2915    now done via the ordinary static environment that is context to each
2916    compilation unit.
2917    
2918    To this end, I arranged that instead of "structure Core" as "structure
2919    _Core" is bound in the pervasive environment.  Core access is done via
2920    _Core (which can never be accidentally rebound because _Core is not a
2921    legal surface-syntax symbol).
2922    
2923    The current solution is much cleaner because the core environment is
2924    now simply part of the pervasive environment which is part of every
2925    compilation unit's context anyway.  In particular, this eliminates all
2926    special-case handling that was necessary until now in order to deal
2927    with dynamic and symbolic parts of the core environment.
2928    
2929    Remaining hackery (to bind the "magic" symbol _Core) is localized in the
2930    compilation manager's bootstrap compiler (actually: in the "init group"
2931    handling).  See the comments in src/system/smlnj/init/init.cmi for
2932    more details.
2933    
2934    I also tried to track down all mentions of "Core" (as string argument
2935    to Symbol.strSymbol) in the compiler and replaced them with a
2936    reference to the new CoreSym.coreSym.  Seems cleaner since the actual
2937    name appears in one place only.
2938    
2939    Binfile and bootfile format have not changed, but the switchover from
2940    the old "init.cmi" to the new one is a bit tricky, so I supplied new
2941    bootfiles anyway.
2942    
2943    ----------------------------------------------------------------------
2944    Name: Allen Leung
2945    Date: 2000/04/02 21:17:00 EST
2946    Tag: leunga-20000402-mltree
2947    Description:
2948    
2949       1. Renamed the constructor CALL in MLTREE by popular demand.
2950       2. Added a bunch of files from my repository.  These are currently
2951          used by other non-SMLNJ backends.
2952    
2953    ----------------------------------------------------------------------
2954    Name: Allen Leung
2955    Date: 2000/03/31 21:15:00 EST
2956    Tag: leunga-20000331-aliasing
2957    Description:
2958    
2959    This update contains a rewritten (and hopefully more correct) module
2960    for extracting aliasing information from CPS.
2961    
2962       To turn on this feature:
2963    
2964            Compiler.Control.CG.memDisambiguate := true
2965    
2966       To pretty print the region information with assembly
2967    
2968           Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
2969    
2970       To control how many levels of aliasing information are printed, use:
2971    
2972           Compiler.Control.MLRISC.getInt "points-to-show-level" := n
2973    
2974       The default of n is 3.
2975    
2976    ----------------------------------------------------------------------
2977    Name: David MacQueen
2978    Date: 2000/03/31 11:15:00 EST
2979    Tag: dbm-20000331-runtime_fix
2980    Description:
2981    
2982    This update contains:
2983    
2984    1. runtime/c-lib/c-libraries.c
2985       includes added in revision 1.2 caused compilation errors on hppa-hpux
2986    
2987    2. fix for bug 1556
2988       system/Basis/Implementation/NJ/internal-signals.sml
2989    
2990    ----------------------------------------------------------------------
2991    Name: Matthias Blume
2992    Date: 2000/03/31 18:00:00 JST
2993    Tag: blume_main_v110p26p2_1
2994    Description:
2995    
2996    This update contains:
2997    
2998    1. A small change to CM's handling of stable libraries:
2999       CM now maintains one "global" modmap that is used for all stable
3000       libraries.  The use of such a global modmap maximizes sharing and
3001       minimizes the need for re-traversing parts of environments during
3002       modmap construction.  (However, this has minor impact since modmap
3003       construction seems to account for just one percent or less of total
3004       compile time.)
3005    
3006    2. I added a "genmap" phase to the statistics.  This is where I got the
3007       "one percent" number (see above).
3008    
3009    3. CM's new tool parameter mechanism just became _even_ better. :)
3010       - The parser understands named parameters and recursive options.
3011       - The "make" and "shell" tools use these new features.
3012         (This makes it a lot easier to cascade these tools.)
3013       - There is a small syntax change: named parameters use a
3014    
3015           <name> : ( <option> ... )            or
3016           <name> : <string>
3017    
3018         syntax.  Previously, named parameters were implemented in an
3019         ad-hoc fashion by each tool individually (by parsing strings)
3020         and had the form
3021    
3022           <name>=<string>
3023    
3024       See the CM manual for a full description of these issues.
3025    
3026    ----------------------------------------------------------------------
3027    Name: Matthias Blume
3028    Date: 2000/03/30 18:00:00 JST
3029    Tag: blume_main_v110p26p2_0
3030    Description:
3031    
3032    !!!!! WARNING !!!!!!
3033    !!  New binfiles  !!
3034    !!!!!!!!!!!!!!!!!!!!
3035    
3036    This update contains:
3037    
3038    1. Moderate changes to CM:
3039    
3040       - Changes to CM's tools mechanism.  In particular, it is now possible
3041       to have tools that accept additional "command line" parameters
3042       (specified in the .cm file at each instance where the tool's class is
3043       used).
3044    
3045       This was done to accommodate the new "make" and "shell" tools which
3046       facilitate fairly seamless hookup to portions of code managed using
3047       Makefiles or Shell scripts.
3048    
3049       There are no classes "shared" or "private" anymore.  Instead, the
3050       sharing annotation is now a parameter to the "sml" class.
3051    
3052       There is a bit of generic machinery for implementing one's own
3053       tools that accept command-line parameters.  However, I am not yet fully
3054       satisfied with that part, so expect changes here in the future.
3055    
3056       All existing tools are described in the CM manual.
3057    
3058       - Slightly better error handling.  (CM now suppresses many followup
3059       error messages that tended to be more annoying than helpful.)
3060    
3061    2. Major changes to the compiler's static environment data structures.
3062    
3063       - no CMStaticEnv anymore.
3064            - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
3065              but it is called Environment), no conversions between different
3066              kinds of static environments
3067    
3068       - There is still a notion of a "modmap", but such modmaps are generated
3069         on demand at the time when they are needed.  This sounds slow, but I
3070         sped up the code that generates modmaps enough for this not to lead to
3071         a slowdown of the compiler (at least I didn't detect any).
3072    
3073       - To facilitate rapid modmap generation, static environments now
3074         contain an (optional) "modtree" structure.  Modtree annotations are
3075         constructed by the unpickler during unpickling.  (This means that
3076         the elaborator does not have to worry about modtrees at all.)
3077         Modtrees have the advantage that they are compositional in the same
3078         way as the environment data structure itself is compositional.
3079         As a result, modtrees never hang on to parts of an environment that
3080         has already been rendered "stale" by filtering or rebinding.
3081    
3082       - I went through many, many trials and errors before arriving at the
3083         current solution.  (The initial idea of "linkpaths" did not work.)
3084         But the result of all this is that I have touched a lot of files that
3085         depend on the "modules" and "types" data structures (most of the
3086         elaborator). There were a lot of changes during my "linkpath" trials
3087         that could have been reverted to their original state but weren't.
3088         Please, don't be too harsh on me for messing with this code a bit more
3089         than what was strictly necessary...  (I _did_ resist the temptation
3090         of doing any "global reformatting" to avoid an untimely death at
3091         Dave's hands. :)
3092    
3093       - One positive aspect of the previous point:  At least I made sure that
3094         all files that I touched now compile without warnings (other than
3095         "polyEqual").
3096    
3097       - compiler now tends to run "leaner" (i.e., ties up less memory in
3098         redundant modmaps)
3099    
3100    ----------------------------------------------------------------------
3101    Name: Allen Leung
3102    Date: 2000/03/29 18:00:00
3103    Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
3104    Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
3105    Description:
3106    
3107       This update contains *MAJOR* changes to the way code is generated from CPS
3108    in the module mlriscGen, and in various backend modules.
3109    
3110    CHANGES
3111    =======
3112    
3113    1. MLRiscGen: forward propagation fix.
3114    
3115       There was a bug in forward propagation introduced at about the same time
3116       as the MLRISC x86 backend, which prohibits coalescing to be
3117       performed effectively in loops.
3118    
3119       Effect: speed up of loops in RISC architectures.
3120               By itself, this actually slowed down certain benchmarks on the x86.
3121    
3122    2. MLRiscGen:  forward propagating addresses from consing.
3123    
3124       I've changed the way consing code is generated.  Basically I separated
3125       out the initialization part:
3126    
3127            store tag,   offset(allocptr)
3128            store elem1, offset+4(allocptr)
3129            store elem2, offset+8(allocptr)
3130            ...
3131            store elemn, offset+4n(allocptr)
3132    
3133       and the address computation part:
3134    
3135            celladdr <- offset+4+alloctpr
3136    
3137       and move the address computation part
3138    
3139       Effect:  register pressure is generally lower as a result.  This
3140                makes compilation of certain expressions much faster, such as
3141                long lists with non-trivial elements.
3142    
3143                 [(0,0), (0,0), .... (0,0)]
3144    
3145    3. MLRiscGen: base pointer elimination.
3146    
3147        As part of the linkage mechanism, we generate the sequence:
3148    
3149         L:  ...  <- start of the code fragment
3150    
3151         L1:
3152             base pointer <- linkreg - L1 + L
3153    
3154         The base pointer was then used for computing relocatable addresses
3155       in the code fragment.  Frequently (such as in lots of continuations)
3156       this is not needed.  We now eliminate this sequence whenever possible.
3157    
3158         For compile time efficiency, I'm using a very stupid local heuristic.
3159       But in general, this should be done as a control flow analysis.
3160    
3161       Effect:  Smaller code size.  Speed up of most programs.
3162    
3163    4. Hppa back end
3164    
3165         Long jumps in span dependence resolution used to depend on the existence
3166      of the base pointer.
3167    
3168         A jump to a long label L was expanded into the following sequence:
3169    
3170          LDIL %hi(L-8192), %r29
3171          LDO  %lo(L-8192)(%r29), %r29
3172          ADD  %r29, baseptr, %r29
3173          BV,n %r0(%r29)
3174    
3175         In the presence of change (3) above, this will not work.  I've changed
3176       it so that the following sequence of instructions are generated, which
3177       doesn't mention the base pointer at all:
3178    
3179             BL,n  L', %r29           /* branch and link, L' + 4 -> %r29 */
3180        L':  ADDIL L-(L'+4), %r29     /* Compute address of L */
3181             BV,n  %r0(%r29)          /* Jump */
3182    
3183    5. Alpha back end
3184    
3185          New alpha instructions LDB/LDW have been added, as per Fermin's
3186       suggestions.   This is unrelated to all other changes.
3187    
3188    6. X86 back end
3189    
3190         I've changed andl to testl in the floating point test sequence
3191         whenever appropriate.  The Intel optimization guide states that
3192         testl is preferable to andl.
3193    
3194    7. RA (x86 only)
3195    
3196         I've improved the spill propagation algorithm, using an approximation
3197       of maximal weighted independent sets.   This seems to be necessary to
3198       alleviate the negative effect in light of the slow down in (1).
3199    
3200         I'll write down the algorithm one of these days.
3201    
3202    8. MLRiscGen: frequencies
3203    
3204         I've added an annotation that states that all call gc blocks have zero
3205       execution frequencies.  This improves register allocation on the x86.
3206    
3207    BENCHMARKS
3208    ==========
3209    
3210       I've only perform the comparison on 110.25.
3211    
3212       The platforms are:
3213    
3214        HPPA  A four processor HP machine (E9000) with 5G of memory.
3215        X86   A 300Hhz Pentium II with 128M of memory, and
3216        SPARC An Ultra sparc 2 with 512M of memory.
3217    
3218       I used the following parameters for the SML benchmarks:
3219    
3220                 @SMLalloc
3221         HPPA    256k
3222         SPARC   512k
3223         X86     256k
3224    
3225    COMPILATION TIME
3226    ----------------
3227       Here are the numbers comparing the compilation times of the compilers.
3228       I've only compared 110.25 compiling the new sources versus
3229       a fixpoint version of the new compiler compiling the same.
3230    
3231                     110.25                                  New
3232               Total  Time in RA  Spill+Reload   Total  Time In RA Spill+Reload
3233         HPPA   627s    116s        2684+3584     599s    95s       1003+1879
3234         SPARC  892s    173s        2891+3870     708s    116s      1004+1880
3235         X86    999s    315s       94006+130691   987s    296s    108877+141957
3236    
3237                   110.25         New
3238                Code Size      Code Size
3239         HPPA   8596736         8561421
3240         SPARC  8974299         8785143
3241         X86    9029180         8716783
3242    
3243       So in summary, things are at least as good as before.   Dramatic
3244       reduction in compilation is obtained on the Sparc; I can't explain it,
3245       but it is reproducible.  Perhaps someone should try to reproduce this
3246       on their own machines.
3247    
3248    SML BENCHMARKS
3249    --------------
3250    
3251        On the average, all benchmarks perform at least as well as before.
3252    
3253          HPPA         Compilation Time     Spill+Reload      Run Time
3254                     110.25  New            110.25    New   110.25  New
3255    
3256          barnesHut  3.158  3.015  4.75%    1+1       0+0   2.980  2.922   2.00%
3257              boyer  6.152  5.708  7.77%    0+0       0+0   0.218  0.213   2.34%
3258       count-graphs  1.168  1.120  4.32%    0+0       0+0  22.705 23.073  -1.60%
3259                fft  0.877  0.792 10.74%    1+3       1+3   0.602  0.587   2.56%
3260        knuthBendix  3.180  2.857 11.32%    0+0       0+0   0.675  0.662   2.02%
3261             lexgen  6.190  5.290 17.01%    0+0       0+0   0.913  0.788  15.86%
3262               life  0.803  0.703 14.22%   25+25      0+0   0.153  0.140   9.52%
3263              logic  2.048  2.007  2.08%    6+6       1+1   4.133  4.008   3.12%
3264         mandelbrot  0.077  0.080 -4.17%    0+0       0+0   0.765  0.712   7.49%
3265             mlyacc 22.932 20.937  9.53%  154+181    32+57  0.468  0.430   8.91%
3266            nucleic  5.183  5.060  2.44%    2+2       0+0   0.125  0.120   4.17%
3267      ratio-regions  3.357  3.142  6.84%    0+0       0+0  116.225 113.173 2.70%
3268                ray  1.283  1.290 -0.52%    0+0       0+0   2.887  2.855   1.11%
3269             simple  6.307  6.032  4.56%   28+30      5+7   3.705  3.658   1.28%
3270                tsp  0.888  0.862  3.09%    0+0       0+0   7.040  6.893   2.13%
3271               vliw 24.378 23.455  3.94%  106+127    25+45  2.758  2.707   1.91%
3272      --------------------------------------------------------------------------
3273       Average                     6.12%                                   4.09%
3274    
3275          SPARC        Compilation Time     Spill+Reload      Run Time
3276                     110.25  New            110.25    New   110.25  New
3277    
3278          barnesHut  3.778  3.592  5.20%    2+2       0+0   3.648  3.453    5.65%
3279              boyer  6.632  6.110  8.54%    0+0       0+0   0.258  0.242    6.90%
3280       count-graphs  1.435  1.325  8.30%    0+0       0+0  33.672 34.737   -3.07%
3281                fft  0.980  0.940  4.26%    3+9       2+6   0.838  0.827    1.41%
3282        knuthBendix  3.590  3.138 14.39%    0+0       0+0   0.962  0.967   -0.52%
3283             lexgen  6.593  6.072  8.59%    1+1       0+0   1.077  1.078   -0.15%
3284               life  0.972  0.868 11.90%   26+26      0+0   0.143  0.140    2.38%
3285              logic  2.525  2.387  5.80%    7+7       1+1   5.625  5.158    9.05%
3286         mandelbrot  0.090  0.093 -3.57%    0+0       0+0   0.855  0.728   17.39%
3287             mlyacc 26.732 23.827 12.19%  162+189    32+57  0.550  0.560   -1.79%
3288            nucleic  6.233  6.197  0.59%    3+3       0+0   0.163  0.173   -5.77%
3289      ratio-regions  3.780  3.507  7.79%    0+0       0+0 133.993 131.035   2.26%
3290                ray  1.595  1.550  2.90%    1+1       0+0   3.440  3.418    0.63%
3291             simple  6.972  6.487  7.48%   29+32      5+7   3.523  3.525   -0.05%
3292                tsp  1.115  1.063  4.86%    0+0       0+0   7.393  7.265    1.77%
3293               vliw 27.765 24.818 11.87%  110+135    25+45  2.265  2.135    6.09%
3294      ----------------------------------------------------------------------------
3295       Average                     6.94%                                    2.64%
3296    
3297          X86          Compilation Time     Spill+Reload      Run Time
3298                     110.25  New            110.25    New   110.25  New
3299    
3300          barnesHut  5.530  5.420  2.03%  593+893   597+915   3.532  3.440   2.66%
3301              boyer  8.768  7.747 13.19%  493+199   301+289   0.327  0.297  10.11%
3302       count-graphs  2.040  2.010  1.49%  298+394   315+457  26.578 28.660  -7.26%
3303                fft  1.327  1.302  1.92%  112+209   115+210   1.055  0.962   9.71%
3304        knuthBendix  5.218  5.475 -4.69%  451+598   510+650   0.928  0.932  -0.36%
3305             lexgen  9.970  9.623  3.60% 1014+841  1157+885   0.947  0.928   1.97%
3306               life  1.183  1.183  0.00%  162+182   145+148   0.127  0.103  22.58%
3307              logic  3.285  3.512 -6.45%  514+684   591+836   5.682  5.577   1.88%
3308         mandelbrot  0.147  0.143  2.33%   38+41     33+54    0.703  0.690   1.93%
3309             mlyacc 35.457 32.763  8.22% 3496+4564 3611+4860  0.552  0.550   0.30%
3310            nucleic  7.100  6.888  3.07%  239+168   201+158   0.175  0.173   0.96%
3311      ratio-regions  6.388  6.843 -6.65% 1182+257   981+300  120.142 120.345 -0.17%
3312                ray  2.332  2.338 -0.29%  346+398   402+494   3.593  3.540   1.51%
3313             simple  9.912  9.903  0.08% 1475+941  1579+1168  3.057  3.178  -3.83%
3314                tsp  1.623  1.532  5.98%  266+200   250+211   8.045  7.878   2.12%
3315               vliw 33.947 35.470 -4.29% 2629+2774 2877+3171  2.072  1.890   9.61%
3316      ----------------------------------------------------------------------------
3317       Average                     1.22%                                     3.36%
3318    
3319    ----------------------------------------------------------------------
3320    Name: Allen Leung
3321    Date: 2000/03/23 16:25:00
3322    Tag: leunga-20000323-fix_x86_alpha
3323    Description:
3324    
3325    1. X86 fixes/changes
3326    
3327       a.  The old code generated for SETcc was completely wrong.
3328           The Intel optimization guide is VERY misleading.
3329    
3330    2. ALPHA fixes/changes
3331    
3332       a.  Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
3333       b.  Added a new mode byteWordLoadStores to the functor parameter to Alpha()
3334       c.  Added reassociation code for address computation.
3335    
3336    ----------------------------------------------------------------------
3337    Name: Allen Leung
3338    Date: 2000/03/22 01:23:00
3339    Tag: leunga-20000322-fix_x86_hppa_ra
3340    Description:
3341    
3342    1. X86 fixes/changes
3343    
3344       a.  x86Rewrite bug with MUL3 (found by Lal)
3345       b.  Added the instructions FSTS, FSTL
3346    
3347    2. PA-RISC fixes/changes
3348    
3349       a.  B label should not be a delay slot candidate!  Why did this work?
3350       b.  ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
3351           as it should be.
3352       c.  The assembly syntax for fstds and fstdd was wrong.
3353       d.  Added the composite instruction COMICLR/LDO, which is the immediate
3354           operand variant of COMCLR/LDO.
3355    
3356    3. Generic MLRISC
3357    
3358       a.  shuffle.sml rewritten to be slightly more efficient
3359       b.  DIV bug in mltree-simplify fixed (found by Fermin)
3360    
3361    4. Register Allocator
3362    
3363       a.  I now release the interference graph earlier during spilling.
3364           May improve memory usage.
3365    
3366    ----------------------------------------------------------------------
3367    Name: Matthias Blume
3368    Date: 2000/03/14 14:15:32
3369    Tag: blume_main_v110p26p1_2
3370    Description:
3371    
3372    1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
3373    additional argument called "template" which is an optional string that
3374    specifies the layout of the tool command line.  See the CM manual for
3375    explanation.
3376    
3377    2. A special-purpose tool can be "registered" by simply dropping the
3378    corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
3379    directory where the .cm file lives that uses this tool.  (The
3380    behavior/misfeature until now was to look for the tool description
3381    files in the current working directory.)  As before, tool description
3382    files could also be anchored -- in which case they can live anywhere
3383    they like.  Following the recent e-mail discussion, this change should
3384    make it easier to have special-purpose tools that are shipped together
3385    with the sources of the program that uses them.
3386    
3387    ----------------------------------------------------------------------
3388    Name: Matthias Blume
3389    Date: 2000/03/10 07:48:34
3390    Tag: blume_main_v110p26p1_1
3391    Description:
3392    
3393    I added a re-written version of Dave's fixpt script to src/system.
3394    Changes relative to the original version:
3395      - sh-ified (not everybody has ksh)
3396      - automatically figures out which architecture it runs on
3397      - uses ./makeml a bit more cleverly
3398      - never invokes ./installml (and, thus, does not clobber your
3399        good and working installation of sml in case something goes wrong)
3400      - accepts max iteration count using option "-iter <n>"
3401      - accepts a "base" name using option "-base <base>"
3402    
3403    It does not build any extraneous heap images but directly rebuilds
3404    bin- and boot-hierarchies using makeml's "-rebuild" switch. Finally,
3405    it can incorporate existing bin- and boot- hierarchies.  For example,
3406    suppose the base is set to "sml" (which is the default).  Then it
3407    successively builds
3408    
3409            sml.bin.<arch>-unix and sml.boot.<arch>-unix
3410    then    sml1.bin.<arch>-unix and sml1.boot.<arch>-unix
3411    then    sml2.bin.<arch>-unix and sml2.boot.<arch>-unix
3412    ...
3413    then    sml<n>.bin.<arch>-unix and sml<n>.boot.<arch>-unix
3414    
3415    and so on.  If any of these already exist, it will just use what's
3416    there.  In particular, many people will have the initial set of bin
3417    and boot files around, so this saves time for at least one full
3418    rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
3419    <k>=1,2,... is normally not a good idea when invoking fixpt.  However,
3420    they might be the result of an earlier partial run of fixpt (which
3421    perhaps got accidentally killed).  In this case, fixpt will quickly
3422    move through what exists before continuing where it left off earlier,
3423    and, thus, saves a lot of time.
3424    
3425    ----------------------------------------------------------------------
3426    Name: Allen Leung
3427    Date: 00/03/10 02:20:00
3428    Tag: leunga-20000310-fix_x86_asm_ra
3429    Description:
3430    
3431    More assembly output problems involving the indexed addressing mode
3432    on the x86 have been found and corrected. Thanks to Fermin Reig for the
3433    fix.
3434    
3435    The interface and implementation of the register allocator have been changed
3436    slightly to accommodate the possibility to skip the register allocation
3437    phases completely and go directly to memory allocation.  This is needed
3438    for C-- use.
3439    
3440    ----------------------------------------------------------------------
3441    Name: Matthias Blume
3442    Date: 00/03/09 10:23:53
3443    Tag: blume_main_v110p26p1_0
3444    Description:
3445    
3446    * Complete re-organization of library names.  Many libraries have been
3447    consolidated so that they share the same path anchor.  For example,
3448    all MLRISC-related libraries are anchored at MLRISC, most libraries that
3449    are SML/NJ-specific are under "smlnj".  Notice that names like
3450    host-cmb.cm or host-compiler.cm no longer exist.  See system/README
3451    for a complete description of the new naming scheme.  Quick reference:
3452    
3453       host-cmb.cm        -> smlnj/cmb.cm
3454       host-compiler.cm   -> smlnj/compiler.cm
3455       full-cm.cm         -> smlnj/cm.cm
3456       <arch>-<os>.cm     -> smlnj/cmb/<arch>-<os>.cm
3457       <arch>-compiler.cm -> smlnj/compiler/<arch>.cm
3458    
3459    * Bug fixes in CM.
3460        - exceptions in user code are being passed through (i.e., reach top level)
3461        - more bugs in paranoia mode fixed
3462        - bug related to checking group owners fixed
3463    
3464    * New install.sh script that automagically fetches archive files:
3465      The new file config/srcarchiveurl must contain the URL of the
3466      (remote) directory that contains bin files (or other source archives).
3467      If install.sh does not find the archive locally, it tries to get
3468      it from that remote directory.
3469      This should simplify installation further:  For machines that have
3470      access to the internet, just fetch <version>-config.tgz, unpack it,
3471      edit config/targets, and go (run config/install.sh).  The script will
3472      fetch everything else that it might need all by itself.
3473    
3474      For CVS users, this mechanism is not relevant for source archives, but
3475      it is convenient for getting new sets of binfiles.
3476    
3477      Archives should be tar files compressed with either gzip, compress, or
3478      bzip2.  The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2.
3479    
3480    ----------------------------------------------------------------------
3481  Name: Matthias Blume  Name: Matthias Blume
3482  Date: 2000/03/07 04:01:04  Date: 2000/03/07 04:01:04
3483  Tag: blume_main_v110_26_2  Tag: blume_main_v110_26_2

Legend:
Removed from v.572  
changed lines
  Added in v.972

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