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 578, Tue Mar 14 05:16:29 2000 UTC revision 788, Wed Feb 28 04:09:48 2001 UTC
# Line 11  Line 11 
11  Date:  Date:
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14    
15    ----------------------------------------------------------------------
16    Name: Allen Leung
17    Date: 2001/02/27 23:07:00 EST
18    Tag: leunga-20010227-minor-stuff
19    
20    1. Alpha bug fix for CMOVNE
21    2. Handle mltree COND(..,FCMP ...,...)
22    3. Bug fix in simplifier
23    
24    ----------------------------------------------------------------------
25    Name: Matthias Blume
26    Date: 2001/01/30 17:50:00 EST
27    Tag: blume-20010130-sync
28    Description:
29    
30    This is just a minor update to sync my devel branch with the main brach.
31    The only visible change is the addition of some README files.
32    
33    ----------------------------------------------------------------------
34    Name: Matthias Blume
35    Date: 2001/01/12 23:30:00 JST
36    Tag: blume-20010112-bootfiles
37    Description:
38    
39    Made a new set of bootfiles that goes with the current state of the
40    repository.
41    
42    ----------------------------------------------------------------------
43    Name: Matthias Blume
44    Date: 2001/01/12 21:20:00 JST
45    Tag: blume-20010112-sync
46    Description:
47    
48    I am just flushing out some minor changes that had accumulated in
49    my private branch in order to sync with the main tree.  (This is
50    mainly because I had CVS trouble when trying to merge _into_ my
51    private branch.)
52    
53    Most people should be completely unaffected by this.
54    
55    ----------------------------------------------------------------------
56    Name: Allen Leung
57    Date: Thu Jan 11 21:03:00 EST 2001
58    Tag: leunga-20010111-labexp=mltree
59    Description:
60    
61    1.  Removed the type LabelExp and replace it by MLTree.
62    2.  Rewritten mltree-simplify with the pattern matcher tool.
63    3.  There were some bugs in alpha code generator which would break
64        64-bit code generation.
65    4.  Redo the tools to generate code with the
66    5.  The CM files in MLRISC (and in src/system/smlnj/MLRISC)
67        are now generated by perl scripts.
68    
69    ----------------------------------------------------------------------
70    Name: Matthias Blume
71    Date: 2001/01/10 21:55:00 JST
72    Tag: blume-20010110-rcc
73    Description:
74    
75    The RCC stuff now seems to work (but only on the x86).
76    This required hacking of the c-calls interface (and -implementation) in
77    MLRISC.
78    
79    Normal compiler users should be unaffected.
80    
81    ----------------------------------------------------------------------
82    Name: Matthias Blume
83    Date: 2001/01/09 01:20:00 JST
84    Tag: blume-20010109-rcc
85    Description:
86    
87    This is a fairly big patch, flushing out a large number of pending
88    changes that I made to my development copy over the last couple of days.
89    
90    Of practical relevance at this moment is a workaround for a pickling
91    bug that Allen ran into the other day.  The cause of the bug itself is
92    still unknown and it might be hard to fix it properly, but the
93    workaround has some merits of its own (namely somewhat reducing pickling
94    overhead for certain libraries).  Therefore, I think this solution should
95    be satisfactory at this time.
96    
97    The rest of the changes (i.e., the vast majority) has to do with my
98    ongoing efforts of providing direct support for C function calls from
99    ML.  At the moment there is a new primop "RAW_CCALL", typing magic
100    in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
101    case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
102    translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
103    handle RCC.
104    
105    The last part (the changes to mlriscGen.sml) are still known to be
106    wrong on the x86 and not implemented on all other architectures.  But
107    the infrastructure is in place. I had to change a few functor
108    signatures in the backend to be able to route the CCalls interface
109    from MLRISC there, and I had to specialize the mltree type (on the
110    x86) to include the necessary extensions. (The extensions themselves
111    were already there and redy to go in MLRISC/x86).
112    
113    Everything should be very happy as soon as someone helps me with
114    mlriscGen.sml...
115    
116    In any case, nothing of this should matter to anyone as long as the
117    new primop is not being used (which is going to be the case unless you
118    find it where I hid it :). The rest of the compiler is completely
119    unaffected.
120    
121    ----------------------------------------------------------------------
122    Name: Matthias Blume
123    Date: 2001/01/05 00:30:00 JST
124    Tag: blume-20010105-primops
125    Description:
126    
127    Added some experimental support for work that I am doing right now.
128    These changes mostly concern added primops, but there is also a new
129    experimental C library in the runtime system (but currently not enabled
130    anywhere except on Linux/X86).
131    
132    In the course of adding primops (and playing with them), I discovered that
133    Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
134    broken.  (Zhong was very right he labeled this stuff as "major gross hack".)
135    To recover, I made type information in INL_PRIM mandatory and changed
136    prim.sml as well as built-in.sml accordingly.  The InLine structure now
137    has complete, correct type information (i.e., no bottom types).
138    
139    Since all these changes mean that we need new binfiles, I also bumped the
140    version number to 110.32.1.
141    
142    ----------------------------------------------------------------------
143    Name: Matthias Blume
144    Date: 2000/12/30 22:10:00 JST
145    Tag: blume-20001230-various
146    Description:
147    
148    Added proxy libraries for MLRISC and let MLRISC libraries refer
149    to each other using path anchors.  (See CM manual for explanation.)
150    
151    Updated CM documentation.
152    
153    Fixed some bugs in CM.
154    
155    Implemented "proxy" libraries (= syntactic sugar for CM).
156    
157    Added "-quiet" option to makeml and changed runtime system accordingly.
158    
159    Added cleanup handler for exportML to reset timers and compiler stats.
160    
161    ----------------------------------------------------------------------
162    Name: Lal George
163    Date: 2000/12/22 22:22:58 EST 2000
164    Tag: Release_110_32
165    Description:
166    
167            Infinite precision used throughout MLRISC.
168            see MLRISC/mltree/machine-int.sig
169    
170    ----------------------------------------------------------------------
171    Name: Matthias Blume
172    Date: 2000/12/22 23:16:00 JST
173    Tag: blume-20001222-warn
174    Description:
175    
176    Corrected wording and formatting of some CM warning message which I
177    broke in my previous patch.
178    
179    ----------------------------------------------------------------------
180    Name: Matthias Blume
181    Date: 2000/12/22 21:20:00 JST
182    Tag: blume-20001222-anchorenv
183    Description:
184    
185    Fixed CM's handling of anchor environments in connection with CMB.make.
186    
187    ----------------------------------------------------------------------
188    Name: Matthias Blume
189    Date: 2000/12/22 13:15:00 JST
190    Tag: blume-20001222-cleanup
191    Description:
192    
193    Removed src/cm/ffi which does not (and did not) belong here.
194    
195    ----------------------------------------------------------------------
196    Name: Matthias Blume
197    Date: 2000/12/21 23:55:00 JST
198    Tag: blume-20001221-exn
199    Description:
200    
201    Probably most important: CM no longer silently swallows all exceptions
202    in the compiler.
203    Plus: some other minor CM changes.  For example, CM now reports some
204    sizes for generated binfiles (code, data, envpickle, lambdapickle).
205    
206    ----------------------------------------------------------------------
207    Name: Matthias Blume
208    Date: 2000/12/15 00:01:05 JST
209    Tag: blume-20001215-dirtool
210    Description:
211    
212    - "dir" tool added.
213    - improvements and cleanup to Tools structure
214    - documentation updates
215    
216    ----------------------------------------------------------------------
217    Name: Allen Leung
218    Date: Thu Dec 14 03:45:24 EST 2000
219    Description:
220    Tag:  leunga-20001214-int-inf
221    Description:
222    
223       In IntInf, added these standard functions, which are missing from our
224    implementation:
225    
226        andb : int * int -> int
227        xorb : int * int -> int
228        orb  : int * int -> int
229        notb : int -> int
230         <<   : int * word -> int
231        ~>>  : int * word -> int
232    
233       Not tested, I hope they are correct.
234    
235    ----------------------------------------------------------------------
236    Name: Allen Leung
237    Date: Fri Dec  8 19:23:26 EST 2000
238    Description:
239    Tag:  leunga-20001208-nowhere
240    Description:
241    
242      Slight improvements to the 'nowhere' tool to handle OR-patterns,
243    to generate better error messages etc.  Plus a brief manual.
244    
245    ----------------------------------------------------------------------
246    Name: Lal George
247    Date: 2000/12/08 09:54:02 EST 2000
248    Tag: Release_110_31
249    Description:
250    
251    - Version 110.31
252    ----------------------------------------------------------------------
253    Name: Allen Leung
254    Date: Thu Dec  7 22:01:04 EST 2000
255    Tag:  leunga-20001207-cell-monster-hack
256    Description:
257    
258    Major MLRISC internal changes.  Affect all clients.
259    Summary:
260    
261    1.  Type CELLS.cell = int is now replaced by a datatype.
262        As a result, the old regmap is now gone.  Almost all interfaces
263        in MLRISC change as a consequence.
264    
265    2.  A new brand version of machine description tool (v3.0) that generates
266        modules expecting the new interface.  The old version is removed.
267    
268    3.  The RA interface has been further abstracted into two new functors.
269        RISC_RA and X86RA.  These functors have much simpler interfaces.
270        [See also directory MLRISC/demo.]
271    
272    4.  Some other new source->source code generation tools are available:
273    
274        a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
275        b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
276           I use this tool to generate the peephole optimizers---with the new
277           cell type changes, peephole rules are becoming difficult to write
278           without conditional pattern matching.
279    
280    5.  More Intmap -> IntHashTable change.  Previous changes by Matthias didn't
281        cover the entire MLRISC source tree so many things broke.
282    
283    6.  CM files have been moved to the subdirectory MLRISC/cm.
284        They are moved because there are a lot of them and they clutter up the
285        root dir.
286    
287    7.  More detailed documentation to come...
288    
289        NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
290        a makeml -rebuild first.  This is because of other other
291        changes that Matthias has made (see below).
292    
293    
294    ----------------------------------------------------------------------
295    Name: Matthias Blume
296    Date: 2000/11/30 23:12:00 JST
297    Tag: blume-20001130-filereorg
298    Description:
299    
300    Some manual updates and some file reorganizations in CM.
301    
302    ----------------------------------------------------------------------
303    Name: Matthias Blume
304    Date: 2000/11/24 17:45:00 JST
305    Tag: blume-20001124-link
306    Description:
307    
308    Drastically improved link traversal code for the case that the dynamic
309    value was already loaded at bootstrap time.  As a result, CM and CMB
310    now both load blazingly fast -- even on a very slow machine.  Also,
311    memory consumption has been further reduced by this.
312    
313    Warning: The format of the PIDMAP file has changed.  THerefore, to
314    bootstrap you have to do this:
315    
316    1. Run CMB.make
317    2. Make a symbolic link for the boot directory:
318         ln -s sml.boot.ARCH-OS xxx
319    3. "Rebuild" the boot directory:
320         ./makeml -boot xxx -rebuild sml ; rm xxx
321    4. Boot normally:
322          ./makeml
323    
324    ----------------------------------------------------------------------
325    Name: Matthias Blume
326    Date: 2000/11/21 21:20:00 JST
327    Tag: blume-20001121-tools
328    Description:
329    
330    Continued hacking on autoloading problem -- with success this time.
331    Also changed tool-plugin mechanism.  See new CM manual.
332    
333    ----------------------------------------------------------------------
334    Name: Matthias Blume
335    Date: 2000/11/19 14:30:00 JST
336    Tag:  blume-20001119-autoload
337    Description:
338    
339    Some hacking to make autoloading faster.  Success for CMB, no success
340    so far for CM.  There is a reduced structure CM' that autoloads faster.
341    (This is a temporary, non-documented hack to be eliminated again when
342    the general problem is solved.)
343    
344    ----------------------------------------------------------------------
345    Name: Matthias Blume
346    Date: 2000/11/17 14:10:00 JST
347    Tag: blume-20001117-pickle-lib
348    Description:
349    
350    1. Eliminated comp-lib.cm
351    2. Made pickle-lib.cm
352    3. Eliminated all uses of intset.sml (from comp-lib.cm)
353    4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
354       equivalent constructs from smlnj-lib.cm (INtHashTable).
355    5. Point 4. also goes for those uses of intmap.* in MLRISC.
356       Duplicated intmap modules thrown out.
357    6. Hunted down all duplicated SCC code and replaced it with
358       equivalent stuff (GraphSCCFn from smlnj-lib.cm).
359    7. Rewrote Feedback module.
360    8. Moved sortedlist.sml into viscomp-lib.cm.  Eventually it
361       should be thrown out and equivalent modules from smlnj-lib.cm
362       should be used (IntRedBlackSet, IntListSet, ...).
363    
364    Confirmed that compiler compiles to fixpoint.
365    
366    ----------------------------------------------------------------------
367    Name: Allen Leung
368    Date: 2000/11/10 18:00:00
369    Tag: leunga-20001110-new-x86-fp
370    
371    A new x86 floating point code generator has been added.
372    By default this is turned off.  To turn this on, do:
373    
374        CM.autoload "$smlnj/compiler.cm";
375        Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
376    
377    Changes:
378    
379    1.  Changed FTAN to FPTAN so that the assembly output is correct.
380    2.  Changed the extension callback for FTANGENT to generate:
381    
382              fptan
383              fstp  %st(0)
384        instead of
385              fptan
386              fstpl ftempmem
387    
388    3.  Numerous assembly fixes for x86.
389    
390    5.  Cleaned up the machine code output module x86/x86MC.sml and added
391        support for a whole bunch of instructions and addressing modes:
392    
393          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st, %st(n)
394          faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp  %st, %st(n)
395          fadd/fsub/fsubr/fmul/fdiv/fdivr  %st(n), %st
396          fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
397          fxch %st(n)
398          fld %st(n)
399          fst %st(n)
400          fst mem
401          fstp %st(n)
402          fucom %st(n)
403          fucomp %st(n)
404    
405        All these are now generated when the fast fp mode is turned on.
406    
407    6.  Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
408    
409    ----------------------------------------------------------------------
410    Name: Matthias Blume
411    Date: 2000/11/09 11:20:00 JST
412    Tag: blume-20001109-scc
413    Description:
414    
415    Eliminated some code duplication:
416    
417    1. Added "where" clause to GraphSCCFn in SML/NJ Library.
418       (Otherwise the functor is useless.)
419    2. Used GraphSCCFn where SCCUtilFun was used previously.
420    3. Got rid of SCCUtilFun (in comp-lib.cm).
421    
422    ----------------------------------------------------------------------
423    Name: Lal George
424    Date: 2000/11/06 09:02:21 EST 2000
425    Tag: Release_110_30
426    Description:
427    
428    - Version 110.30
429    ----------------------------------------------------------------------
430    Name: Matthias Blume
431    Date: 2000/11/04 14:45:00
432    Tag: blume-20001104-mlbuild
433    Description:
434    
435    - Made ml-build faster on startup.
436    - Documentation fixes.
437    
438    ----------------------------------------------------------------------
439    Name: Matthias Blume
440    Date: 2000/11/02 17:00:00 JST
441    Tag: blume-20001102-condcomp
442    Description:
443    
444    - Small tweaks to pickler -- new BOOTFILES!
445    - Version bumped to 110.29.2.
446    - Added conditional compilation facility to init.cmi (see comment there).
447    ----------------------------------------------------------------------
448    Name: Allen Leung
449    Date: 2000/10/23 19:31:00
450    Tag: leunga-20001023-demo-ra
451    
452    1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
453    2. Test programs for the graph library updated
454    3. Some new MLRISC demo programs added
455    
456    ----------------------------------------------------------------------
457    Name: Matthias Blume
458    Date: 2000/08/31 22:15:00 JST
459    Tag: blume-20001017-errmsg
460    Description:
461    
462    More error message grief: Where there used to be no messages, there
463    now were some that had bogus error regions.  Fixed.
464    
465    ----------------------------------------------------------------------
466    Name: Matthias Blume
467    Date: 2000/08/31 17:30:00 JST
468    Tag: blume-20001017-v110p29p1
469    Description:
470    
471    I made a version 110.29.1 with new bootfiles.
472    
473    Changes:  Modified pickler/unpickler for faster and leaner unpickling.
474              CM documentation changes and a small bugfix in CM's error reporting.
475    
476    ----------------------------------------------------------------------
477    Name: Lal George
478    Date: 2000/09/27 14:42:35 EDT
479    Tag: george-20000927-nodestatus
480    Description:
481    
482    Changed the type of the nodestatus, so that:
483    
484            SPILLED(~1)             is now SPILLED
485            SPILLED(m) where m>=0   is now MEMREG(m)
486            SPILLED(s) where s<~1   is now SPILL_LOC(~s)
487    
488    ----------------------------------------------------------------------
489    Name: Matthias Blume
490    Date: 2000/09/07 14:45:00 JST
491    Tag: blume-20000907-cmerrmsg
492    Description:
493    
494    Small tweak to CM to avoid getting ML syntax error messages twice.
495    
496    ----------------------------------------------------------------------
497    Name: Matthias Blume
498    Date: 2000/08/31 18:00:00 JST
499    Tag: blume-20000831-cvsbootfiles
500    Description:
501    
502    New URL for boot files (because the 110.29 files on the BL server do
503    now work correctly with my updated install scripts for yacc and lex).
504    
505    ----------------------------------------------------------------------
506    Name: Matthias Blume
507    Date: 2000/08/08 12:33:00 JST
508    Tag: blume-20000808-manual
509    Description:
510    
511    Tiny update to CM manual.
512    
513    ----------------------------------------------------------------------
514    Name: Allen Leung
515    Date: 2000/08/7 19:31:00
516    Tag: leunga-20000807-a-whole-bunch-of-stuff
517    
518      Moby, C--, SSA, x86, machine descriptions etc.  Should only affect C--
519    and Mobdy.
520    
521    1.  x86
522    
523       a.  Fixes to peephole module by John and Dan.
524       b.  Assembly fix to SETcc by Allen.
525       c.  Fix to c-call by John.
526       d.  Fix to spilling by John.  (This one deals with the missing FSTPT case)
527       e.  Instruction selection optimization to SETcc as suggested by John.
528    
529           For example,
530    
531            MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
532    
533           should generate:
534    
535            MOVL a, x
536            SUBL b, x
537            SHRL 31, x
538    
539    2.  IR stuff
540    
541         A bunch of new DJ-graph related algorithms added.  These
542         speed up SSA construction.
543    
544    3.  SSA + Scheduling
545    
546         Added code for SSA and scheduling to the repository
547    
548    ----------------------------------------------------------------------
549    Name: Lal George
550    Date: 2000/07/27 11:53:14 EDT
551    
552    Tag: lal-20000727-linux-ppc
553    Description:
554    
555     Made changes to support Linux PPC.
556     p.s. I have confirmation that the 110.29 boot files work fine.
557    
558    ----------------------------------------------------------------------
559    Name: Matthias Blume
560    Date: 2000/07/27 17:40:00 JST
561    Tag: blume-20000727-scripts
562    Description:
563    
564    !!!! WARNING !!!!
565    You must recompile the runtime system!
566    !!!! WARNING !!!!
567    
568    This is basically another round of script-enhancements:
569    
570    1. sml, ml-build, and ml-makedepend accept options -D and -U to define
571       and undefine CM preprocessor symbols.
572    
573    2. ml-build avoids generating a new heap image if it finds that the
574       existing one is still ok.  (The condition is that no ML file had to
575       be recompiled and all ML files are found to be older that the heap
576       file.)
577    
578       To make this work smoothly, I also hacked the runtime system as
579       well as SMLofNJ.SysInfo to get access to the heap image suffix
580       (.sparc-solaris, ...) that is currently being used.
581    
582       Moreover, the signature of CM.mk_standalone has changed.  See the
583       CM manual.
584    
585    3. ml-makedepend accepts additional options -n, -a, and -o.  (See the
586       CM manual for details.)
587    
588    4. More CM manual updates:
589        - all of the above has been documented.
590        - there is now a section describing the (CM-related) command line
591          arguments that are accepted by the "sml" command
592    
593    ----------------------------------------------------------------------
594    Name: Matthias Blume
595    Date: 2000/07/25 16:20:00 JST
596    Tag: blume-20000725-makedepend
597    Description:
598    
599    Added a script called ml-makedepend.  This can be used in makefiles
600    for Unix' make in a way very similar to the "makedepend" command for
601    C.
602    
603    The script internally uses function CM.sources.
604    
605    Synopsis:
606    
607        ml-makedepend [-f makefile] cmfile targetname
608    
609    The default for the makefile is "makefile" (or "Makefile" should
610    "makefile" not exist).
611    
612    ml-makedepend adds a cmfile/targetname-specific section to this
613    makefile (after removing the previous version of this section).  The
614    section contains a single dependency specification with targetname on
615    the LHS (targetname is an arbitrary name), and a list of files derived
616    from the cmfile on the RHS.  Some of the files on the RHS are
617    ARCH/OPSYS-specific.  Therefore, ml-makedepend inserts references to
618    "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
619    path names.  The makefile writer is responsible for making sure that
620    these variables have correct at the time "make" is invoked.
621    
622    ----------------------------------------------------------------------
623    Name: Matthias Blume
624    Date: 2000/07/22 23:30:00 JST
625    Tag: blume-20000722-urlupdate
626    Description:
627    
628    Changed BOOT and config/srcarchiveurl to point to BL server:
629    
630        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
631    
632    ----------------------------------------------------------------------
633    Name: Matthias Blume
634    Date: 2000/07/18 18:00:00 JST
635    Tag: blume-20000718-Version_110_29
636    Description:
637    
638    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
639    
640    2. Updated config/version to 110.29
641    
642    3. Updated config/srcarchiveurl
643    
644    3. New boot files!
645       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
646    
647    ----------------------------------------------------------------------
648    Name: Matthias Blume
649    Date: 2000/07/11 13:58:00 JST
650    Tag: blume-20000711-doctypo
651    Description:
652    
653    Fixed a few typos in CM manual.
654    
655    ----------------------------------------------------------------------
656    Name: Allen Leung
657    Date: 2000/06/15 00:38:00
658    Tag: leunga-20000704-sparc-x86
659    
660    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
661    2. fix to x86 RET bug [found by Dan Grossman]
662    3. sparc assembly bug fix for ticc instructions [found by Fermin]
663    
664       Affects c-- and moby only
665    
666    ----------------------------------------------------------------------
667    Name: Matthias Blume
668    Date: 2000/07/04 15:26:00
669    Tag: blume-20000704-trigger
670    Description:
671    
672    1. Improvements to CM manual.
673    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
674       of getting a back-trace.  The function, when called, raises an
675       internal exception which explicitly carries the full back-trace history,
676       so it is unaffected by any intervening handle-raise pairs ("trivial"
677       or not).  The interactive loop will print that history once it arrives
678       at top level.
679       Short of having all exceptions implicitly carry the full history, the
680       recommended way of using this facility is:
681         - compile your program with instrumentation "on"
682         - run it, when it raises an exception, look at the history
683         - if the history is "cut off" because of some handler, go and modify
684           your program so that it explicitly calls BTrace.trigger
685         - recompile (still instrumented), and rerun; look at the full history
686    
687    ----------------------------------------------------------------------
688    Name: Matthias Blume
689    Date: 2000/07/03 15:36:00 JST
690    Tag: blume-20000702-manual
691    Description:
692    
693    Small corrections and updates to CM manual.
694    
695    ----------------------------------------------------------------------
696    Name: Matthias Blume
697    Date: 2000/06/29 16:04:00 JST
698    Tag: blume-20000629-yacctool
699    Description:
700    
701    Changes:
702    
703    1. Class "mlyacc" now takes separate arguments to pass options to
704       generated .sml- and .sig-files independently.
705    2. Corresponding CM manual updates.
706    3. BTrace module now also reports call sites.  (However, for loop clusters
707       it only shows from where the cluster was entered.)  There are associated
708       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
709    
710    ----------------------------------------------------------------------
711    Name: Matthias Blume
712    Date: 2000/06/27 16:51:00 JST
713    Tag: blume-20000627-noweb
714    Description:
715    
716    Changes:
717    
718     1. Implemented "subdir" and "witness" options for noweb tool.
719        This caused some slight internal changes in CM's tool implementation.
720     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
721        some remaining issues from earlier path anchor changes.
722     3. Updated CM manual accordingly.
723    
724     4. Changed implementation of back-tracing so that I now consider it
725        ready for prime-time.
726    
727        In particular, you don't have to explicitly trigger the back-trace
728        anymore.  Instead, if you are running BTrace-instrumented code and
729        there is an uncaught exception (regardless of whether or not it was
730        raised in instrumented code), the top-level evalloop will print
731        the back-trace.
732    
733        Features:
734    
735          - Instrumented and uninstrumented code work together seemlessly.
736            (Of course, uninstrumented code is never mentioned in actual
737             back-traces.)
738    
739          - Asymptotic time- and space-complexity of instrumented code is
740            equal to that of uninstrumented code.  (This means that
741            tail-recursion is preserved by the instrumentation phase.)
742    
743          - Modules whose code has been instrumented in different sessions
744            work together without problem.
745    
746          - There is no penalty whatsoever on uninstrumented code.
747    
748          - There is no penalty on "raise" expressions, even in
749            instrumented code.
750    
751        A potential bug (or perhaps it is a feature, too):
752    
753          A back-trace reaches no further than the outermost instrumented
754          non-trivial "raise".  Here, a "trivial" raise is one that is the
755          sole RHS of a "handle" rule.  Thus, back-traces reach trough
756    
757               <exp> handle e => raise e
758    
759          and even
760    
761               <exp> handle Foo => raise Bar
762    
763          and, of course, through
764    
765               <exp> handle Foo => ...
766    
767         if the exception was not Foo.
768    
769         Back-traces always reach right through any un-instrumented code
770         including any of its "handle" expressions, trivial or not.
771    
772       To try this out, do the following:
773    
774         - Erase all existing binfiles for your program.
775           (You may keep binfiles for those modules where you think you
776            definitely don't need back-tracing.)
777         - Turn on back-trace instrumentation:
778              SMLofNJ.Internals.BTrace.mode (SOME true);
779         - Recompile your program.  (I.e., run "CM.make" or "use".)
780         - You may now turn instrumentation off again (if you want):
781              SMLofNJ.Internals.BTrace.mode (SOME false);
782         - Run your program as usual.  If it raises an exception that
783           reaches the interactive toplevel, then a back-trace will
784           automatically be printed.  After that, the toplevel loop
785           will print the exception history as usual.
786    
787    ----------------------------------------------------------------------
788    Name: Matthias Blume
789    Date: 2000/06/26 09:56:46 JST
790    Tag: blume-20000626-setup
791    Description:
792    
793    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
794          ML code before and after compiling a file (e.g., to set compiler
795          flags)
796    
797    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
798              - associated changes to btrace.sml (BTrace instrumentation pass)
799              - cleaner implementation of btimp.sml (BTrace tracing and report
800                module)
801    
802    CM manual: * new path encoding documented
803               * description of setup-parameter to "sml" added
804    
805    The biggest user-visible change to back-tracing is that it is no
806    longer necessary to compile all traced modules within the same
807    session.  (This was a real limitation.)
808    
809    ----------------------------------------------------------------------
810    Name: Matthias Blume
811    Date: 2000/06/24 12:40:00 JST
812    Tag: blume-20000624-startup
813    Description:
814    
815    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
816    bit too often -- to put it mildly. :)
817    
818    ----------------------------------------------------------------------
819    Name: Matthias Blume
820    Date: 2000/06/23 18:20:00 JST
821    Tag: blume-20000623-btrace
822    Description:
823    
824    This updates adds a backtrace facility to aid programmers in debugging
825    their programs.  This involves the following changes:
826    
827    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
828       keeping track of the current call stack.  When programs are compiled
829       in a special mode, the compiler will insert calls to these hooks
830       into the user program.
831       "Hook" means that it is possible for different implementations of
832       back-tracing to register themselves (at different times).
833    
834    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
835       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
836       It can be turned on using this call:
837         SMLofNJ.Internals.BTrace.mode (SOME true);
838       Turning it off again:
839         SMLofNJ.Internals.BTrace.mode (SOME false);
840       Querying the current status:
841         SMLofNJ.Internals.BTrace.mode NONE;
842       Annotated programs are about twice as big as normal ones, and they
843       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
844       where all hooks do nothing).  The slowdown with a plugin that is
845       actually useful (such as the one supplied by default) is even greater,
846       but in the case of the default plugin it is still only an constant
847       factor (amortized).
848    
849    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
850       with a sub-structure BTrace for controlling back-tracing.  In particular,
851       the above-mentioned function "mode" controls whether the annotation
852       phase is invoked by the compiler.  Another important function is
853       "trigger": when called it aborts the current execution and causes
854       the top-level loop to print a full back-trace.
855    
856    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
857       for back-tracing.  It keeps track of the dynamic call stack and in
858       addition to that it keeps a partial history at each "level" of that
859       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
860       d and b (at separate times, dynamically), then the report will show:
861    
862       GOTO   d
863             /c
864       GOTO  \b
865       CALL   a
866    
867       This shows that there was an initial non-tail call of a, then a
868       tail-call to b or c, looping behavior in a cluster of functions that
869       consist of b and c, and then a goto from that cluster (i.e., either from
870       b or from c) to d.
871    
872       Note that (depending on the user program) the amount of information
873       that the back-trace module has to keep track of at each level is bounded
874       by a constant.  Thus, the whole implementation has the same asymptotical
875       complexity as the original program (both in space and in time).
876    
877    5. compiler/TopLevel/interact/evalloop.sml has been modified to
878       handle the special exception SMLofNJ.Internals.BTrace.BTrace
879       which is raised by the "trigger" function mentioned above.
880    
881    Notes on usage:
882    
883    - Annotated code works well together with unannotated code:
884    Unannotated calls simply do not show up at all in the backtrace.
885    
886    - It is not a good idea to let modules that were annotated during
887    different sessions run at the same time.  This is because the compiler
888    chooses small integers to identify individual functions, and there
889    will be clashes if different modules were compiled in separate sessions.
890    (Nothing will crash, and you will even be told about the clashes, but
891    back-trace information will in general not be useful.)
892    
893    - Back-tracing can be confused by callcc and capture.
894    
895    - The only way of getting a back-trace right now is to explicitly
896    invoke the "trigger" function from your user program.  Eventually, we
897    should make every exception carry back-trace information (if
898    available).  But since this creates more overhead at "raise"-time
899    (similar to the current exnHistory overhead), I have not yet
900    implemented this.  (The implementation will be rather easy.)  With
901    exceptions carrying back-trace information, this facility will be even
902    more useful because users don't need to modify their programs...
903    
904    - While it is possible to compile the compiler with back-trace
905    annotations turned on (I did it to get some confidence in
906    correctness), you must make absolutely sure that core.sml and
907    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
908    be compiled with annotation because there is no core access yet, but
909    if you compile btimp.sml with annotation, then the system will go into
910    an infinite recursion and crash.)
911    Since CM currently does not know about BTrace, the only way to turn
912    annotations on and off for different modules of the compiler is to
913    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
914    this is awkward and clumsy.
915    
916    Sample sessions:
917    
918    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
919    - SMLofNJ.Internals.BTrace.mode (SOME true);
920    [autoloading]
921    [autoloading done]
922    val it = false : bool
923    - structure X = struct
924    -     fun main n = let
925    -         fun a (x, 0) = d x
926    -           | a (x, n) = b (x, n - 1)
927    -         and b (x, n) = c (x, n)
928    -         and c (x, n) = a (x, n)
929    -         and d x = e (x, 3)
930    -         and e (x, 0) = f x
931    -           | e (x, n) = e (x, n - 1)
932    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
933    -           | f n = n * g (n - 1)
934    -         and g n = a (n, 3)
935    -     in
936    -         f n
937    -     end
938    - end;
939    structure X : sig val main : int -> int end
940    - X.main 3;
941    *** BACK-TRACE ***
942    GOTO   stdIn:4.2-13.20: X.main[2].f
943    GOTO-( stdIn:4.2-13.20: X.main[2].e
944    GOTO   stdIn:4.2-13.20: X.main[2].d
945         / stdIn:4.2-13.20: X.main[2].a
946         | stdIn:4.2-13.20: X.main[2].b
947    GOTO-\ stdIn:4.2-13.20: X.main[2].c
948    CALL   stdIn:4.2-13.20: X.main[2].g
949    GOTO   stdIn:4.2-13.20: X.main[2].f
950    GOTO-( stdIn:4.2-13.20: X.main[2].e
951    GOTO   stdIn:4.2-13.20: X.main[2].d
952         / stdIn:4.2-13.20: X.main[2].a
953         | stdIn:4.2-13.20: X.main[2].b
954    GOTO-\ stdIn:4.2-13.20: X.main[2].c
955    CALL   stdIn:4.2-13.20: X.main[2].g
956    GOTO   stdIn:4.2-13.20: X.main[2].f
957    GOTO-( stdIn:4.2-13.20: X.main[2].e
958    GOTO   stdIn:4.2-13.20: X.main[2].d
959         / stdIn:4.2-13.20: X.main[2].a
960         | stdIn:4.2-13.20: X.main[2].b
961    GOTO-\ stdIn:4.2-13.20: X.main[2].c
962    CALL   stdIn:4.2-13.20: X.main[2].g
963    GOTO   stdIn:4.2-13.20: X.main[2].f
964    CALL   stdIn:2.15-17.4: X.main[2]
965    -
966    
967    (Note that because of a FLINt bug the above code currently does not
968    compile without BTrace turned on.)
969    
970    Here is another example, using my modified Tiger compiler:
971    
972    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
973    - SMLofNJ.Internals.BTrace.mode (SOME true);
974    [autoloading]
975    [autoloading done]
976    val it = false : bool
977    - CM.make "sources.cm";
978    [autoloading]
979    ...
980    [autoloading done]
981    [scanning sources.cm]
982    [parsing (sources.cm):parse.sml]
983    [creating directory CM/SKEL ...]
984    [parsing (sources.cm):tiger.lex.sml]
985    ...
986    [wrote CM/sparc-unix/semant.sml]
987    [compiling (sources.cm):main.sml]
988    [wrote CM/sparc-unix/main.sml]
989    [New bindings added.]
990    val it = true : bool
991    - Main.compile ("../testcases/merge.tig", "foo.out");
992    *** BACK-TRACE ***
993    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
994    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
995    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
996    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
997    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
998    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
999    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
1000         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
1001    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
1002    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1003    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
1004    CALL   main.sml:1.18-118.4: Main.compile[2]
1005    -
1006    
1007    ----------------------------------------------------------------------
1008    Name: Matthias Blumen
1009    Date: 2000/06/21 18:00:00 JST
1010    Tag: blume-20000621-manual
1011    Description:
1012    
1013    CM manual update: Path environments documented.
1014    
1015    ----------------------------------------------------------------------
1016    Name: Matthias Blume
1017    Date: 2000/06/19 13:40:00
1018    Tag: blume-20000619-manual
1019    Description:
1020    
1021    CM manual and system/README update.  This only covers the fact that
1022    there are no more implicit anchors.  (Path environments and the "bind"
1023    option to "cm" have yet to be documented.)
1024    
1025    ----------------------------------------------------------------------
1026    Name: Matthias Blume
1027    Date: 2000/06/19 11:05:00 JST
1028    Tag: blume-20000619-chdir-bugfix
1029    Description:
1030    
1031    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
1032    
1033    ----------------------------------------------------------------------
1034    Name: Matthias Blume
1035    Date: 2000/06/18 22:00:10 JST
1036    Tag: blume-20000618-implicit-anchors-really-gone
1037    Description:
1038    
1039    I updates the previous HISTORY entry where I forgot to mention that
1040    implicit anchors are no longer with us.
1041    
1042    The current update also gets rid of the (now useless) controller
1043    CM.Control.implicit_anchors.
1044    
1045    ----------------------------------------------------------------------
1046    Name: Matthias Blume
1047    Date: 2000/06/16 17:30:00 JST
1048    Tag: blume-20000616-anchorenv
1049    Description:
1050    
1051    This patch implements the long anticipated (just kidding :) "anchor
1052    environment" mechanism.  In the course of doing this, I also
1053    re-implemented CM's internal "SrcPath" module from scratch.  The new
1054    one should be more robust in certain boundary cases.  In any case, it
1055    is a lot cleaner than its predecessor (IMHO).
1056    
1057    This time, although there is yet another boot file format change, I
1058    kept the unpickler backward-compatible.  As a result, no new bootfiles
1059    are necessary and bootstrapping is straightforward.  (You cannot read
1060    new bootfiles into an old system, but the other way around is no
1061    problem.)
1062    
1063    Visible changes:
1064    
1065    ** 0. Implicit path anchors (without the leading $-symbol) are no
1066    longer recognized at all. This means that such path names are not
1067    illegal either.  For example, the name basis.cm simply refers to a
1068    local file called "basis.cm" (i.e, the name is an ordinary path
1069    relative to .cm-files directory).  Or, to put it differently, only
1070    names that start with $ are anchored paths.
1071    
1072    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
1073    vanished.
1074    
1075    John (Reppy) had critizised this as soon as I originally proposed and
1076    implemented it, but at that time I did not really deeply believe
1077    him. :) Now I came full-circle because I need the $<singlearc> syntax
1078    in another place where it cannot be seen as an abbreviation for
1079    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
1080    seems to mean (i.e., it "expands" into the corresponding anchor
1081    value).
1082    
1083    However, when paths are used as members in CM description files, it
1084    continues to be true that there must be at least another arc after the
1085    anchor.  This is now enforced separately during semantic analysis
1086    (i.e., from a lexical/syntactical point of view, the notation is ok.)
1087    
1088    ** 2. The "cm" class now accepts an option "bind".  The option's value
1089    is a sub-option list of precisely two items -- one labeled "anchor"
1090    and the other one labeled "value".  As you might expect, "anchor" is
1091    used to specify an anchor name to be bound, and "value" specifies what
1092    the anchor is being bound to.
1093    
1094    The value must be a directory name and can be given in either standard
1095    syntax (including the possibility that it is itself an anchored path)
1096    or native syntax.
1097    
1098    Examples:
1099    
1100       foo.cm (bind:(anchor:bar value:$mystuff/bar))
1101       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
1102    
1103    and so on.
1104    
1105    The meaning of this is that the .cm-file will be processed with an
1106    augmented anchor environment where the given anchor(s) is/are bound to
1107    the given values(s).
1108    
1109    The rationale for having this feature is this: Suppose you are trying
1110    to use two different (already stable) libraries a.cm and b.cm (that
1111    you perhaps didn't write yourself).  Further, suppose each of these
1112    two libraries internally uses its own auxiliary library $aux/lib.cm.
1113    Normally you would now have a problem because the anchor "lib" can not
1114    be bound to more than one value globally.  Therefore, the project that
1115    uses both a.cm and b.cm must locally redirect the anchor to some other
1116    place:
1117    
1118       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
1119       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
1120    
1121    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
1122    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
1123    
1124    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
1125    you when you do so at the time of CM.stabilize).  Therefore, you can
1126    also use an anchored path as the value:
1127    
1128      a.cm (bind:(anchor:lib value:$a-lib))
1129      b.cm (bind:(anchor:lib value:$b-lib))
1130    
1131    Now you can globally configure (using the usual CM.Anchor.anchor or
1132    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
1133    itself is always locally bound, setting it globally is no longer
1134    meaningful or necessary (but it does not hurt either).  In fact, "lib"
1135    can still be used as a global anchor for separate purposes.  As a
1136    matter of fact, one can locally define "lib" in terms of a global
1137    "lib":
1138    
1139      a.cm (bind:(anchor:lib value:$lib/a))
1140      b.cm (bind:(anchor:lib value:$lib/b))
1141    
1142    ** 3: The encoding of path names has changed.  This affects the way
1143    path names are shown in CM's progress report and also the internal
1144    protocol encoding used for parallel make.
1145    
1146    The encoding now uses one or more ':'-separated segments.  Each
1147    segments corresponds to a file that has been specified relative to the
1148    file given by its preceding segment.  The first segment is either
1149    relative to the CWD, absolute, or anchored.  Each segment itself is
1150    basically a Unix pathname; all segments but the first are relative.
1151    
1152    Example:
1153    
1154       $foo/bar/baz.cm:a/b/c.sml
1155    
1156    This path denotes the file bar/a/b/c.sml relative to the directory
1157    denoted by anchor "foo".  Notice that the encoding also includes
1158    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
1159    paths are resolved relative to the .cm-files directory, so baz.cm must
1160    be ignored to get the "real" pathname.
1161    
1162    To make this fact more obvious, CM puts the names of such "virtual
1163    arcs" into parentheses when they appear in progress reports. (No
1164    parentheses will appear in the internal protocol encoding.)  Thus,
1165    what you really see is:
1166    
1167      $foo/bar/(baz.cm):a/b/c.sml
1168    
1169    I find this notation to be much more informative than before.
1170    
1171    Another new feature of the encoding is that special characters
1172    including parentheses, colons, (back)slashes, and white space are
1173    written as \ddd (where ddd is the decimal encoding of the character).
1174    
1175    *** The CM manual still needs to be updated.
1176    
1177    ----------------------------------------------------------------------
1178    Name: Allen Leung
1179    Date: 2000/06/15 00:38:00
1180    Tag: leunga-20000615-x86-peephole
1181    
1182    x86 Peephole fix by Fermin.  Affects c-- and moby only.
1183    
1184    ----------------------------------------------------------------------
1185    Name: Matthias Blume
1186    Date: 2000/06/12 11:40:00
1187    Tag: blume-20000612-parmakefix
1188    Description:
1189    
1190    More cleanup after changing the file naming scheme: This time I
1191    repaired the parallel make mechanism for CMB.make which I broke earlier.
1192    
1193    ----------------------------------------------------------------------
1194    Name: Allen Leung
1195    Date: 2000/06/09 01:25:00
1196    Tag: leunga-20000609-various
1197    
1198    None of these things should affect normal SML/NJ operations
1199    
1200    1. Peephole improvements provided by Fermin (c--)
1201    2. New annotation DEFUSE for adding extra dependence (moby)
1202    3. New X86 LOCK instructions (moby)
1203    4. New machine description language for reservation tables (scheduling)
1204    5. Fixes to various optimization/analysis modules (branch chaining, dominator
1205       trees etc.)
1206    6. I've changed the CM files so that they can work with versions
1207       110.0.6, 110.25 and 110.28
1208    
1209    ----------------------------------------------------------------------
1210    Name: Matthias Blume
1211    Date: 2000/06/09 12:40:00
1212    Tag: blume-20000609-log
1213    Description:
1214    
1215    - Removed all(?) remaining RCS Log entries from sources.
1216    
1217    - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
1218      anchored paths).
1219    
1220    ----------------------------------------------------------------------
1221    Name: Matthias Blume
1222    Date: 2000/06/07 17:00:00 JST
1223    Tag: blume-20000607-no-implicit-anchors
1224    Description:
1225    
1226    1. This update changes the default setting for
1227    CM.Control.implicit_anchors from true to false.  This means that
1228    implicit anchors are no longer permitted by default.  I also tried to
1229    make sure that nothing else still relies on implicit anchors.
1230    (This is the next step on the schedule towards a CM that does not even
1231    have the notion of implicit anchors anymore.)
1232    
1233    2. More CM manual updates.
1234    
1235    3. I managed to track down and fix the pickling bug I mentioned last
1236    time.  Because of the previously existing workaround, this entails no
1237    immediate practical changes.
1238    
1239    ----------------------------------------------------------------------
1240    Name: Matthias Blume
1241    Date: 2000/06/06 11:15:00 JST
1242    Tag: blume-20000606-lazierpickle
1243    Description:
1244    
1245    !!!! NEW BOOT FILES !!!!
1246    
1247    * The main purpose of this update is to make library pickles lazier in
1248    order to reduce the initial space penalty for autoloading a library.
1249    As a result, it is now possible to have $smlnj/compiler.cm
1250    pre-registered.  This should take care of the many complaints or
1251    inquiries about missing structure Compiler.  This required changes to
1252    CM's internal data structures and small tweaks to some algorithms.
1253    
1254    As a neat additional effect, it is no longer necessary (for the sake
1255    of lean heap image files) to distinguish between a "minimal" CM and a
1256    "full" CM.  Now, there is only one CM (i.e., the "full" version:
1257    $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
1258    interactive top level. ($smlnj/cm/minimal.cm is gone.)
1259    
1260    To make the life of compiler-hackers easier, "makeml" now also
1261    pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm).  In other
1262    words, after you bootstrap a new sml for the first time, you will not
1263    have to autoload $smlnj/cmb.cm again afterwards.  (The first time
1264    around you will still have to do it, though.)
1265    
1266    * A second change consists of major updates to the CM manual.  There
1267    are now several appendices with summary information and also a full
1268    specification of the CM description file syntax.
1269    
1270    * In directory src/system I added the script "allcross".  This script
1271    invokes sml and cross-compiles the compiler for all supported
1272    architectures.  (Useful when providing a new set of boot files.)
1273    
1274    * There seems to be a latent bug in my "lazy pickles" mechanism.  I
1275    added a small tweak to pickle-util.sml to work around this problem,
1276    but it is not a proper fix yet.  I will investigate further.  (The
1277    effect of the bug was an inflation of library pickle size.)
1278    
1279    * Version number increased to 110.28.1 (to avoid compatibility problems).
1280    
1281    ----------------------------------------------------------------------
1282    Name: Allen Leung
1283    Date: 2000/05/25 17:28 EDT
1284    Tag: leunga-20000525-ra
1285    Description:
1286    
1287      Fixed a bug in freezing phase of the register allocator.
1288    
1289    ----------------------------------------------------------------------
1290    Name: Allen Leung
1291    Date: 2000/05/15 22:53 EDT
1292    Tag: leunga-20000515-alpha-x86-ra
1293    Description:
1294    
1295      1. Alpha
1296    
1297          Slight cleanup.  Removed the instruction SGNXL
1298    
1299      2. X86
1300    
1301          Added the following instructions to the instruction set:
1302    
1303            ROLx, RORx,
1304            BTx, BTSx, BTLx, BTRx,
1305            XCHGx, and variants with the LOCK prefix
1306    
1307      3. Register Allocation
1308    
1309          The module ra-rewrite-with-renaming has been improved.
1310    
1311      These have no effect on SML/NJ.
1312    
1313    ----------------------------------------------------------------------
1314    Name: Matthias Blume
1315    Date: 2000/05/15 16:20:00 JST
1316    Tag: blume-20000515-lightrebuild
1317    Description:
1318    
1319    1. I added an alternative to "-rebuild" to "makeml".  The difference is
1320       that prior to calling CMB.make' the CM-variable "LIGHT" will be
1321       defined.  In effect, the command will not build any cross-compiler
1322       backends and therefore finish more quickly.
1323    
1324       The "fixpt" script also takes a "-light" switch to be able to use
1325       this new facility while compiling for a fixpoint.
1326    
1327    2. I replaced all mentions of anchored paths in group owner specifications
1328       with simple relative paths (usually starting with "..").
1329       The rationale is that a library's internal workings should not be
1330       compromised by the lack of some anchor.  (An anchor is necessary
1331       for someone who wants to refer to the library by an anchored path,
1332       but it should not be necessary to build the same library in the first
1333       place.)
1334    
1335    3. I changed the way CM's tool mechanism determines the shell command
1336       string used for things like ml-yacc etc. so that it does not break
1337       when CM.Control.implicit_anchors is turned off.
1338    
1339    ----------------------------------------------------------------------
1340    Name: Matthias Blume
1341    Date: 2000/05/12 18:20:00 JST
1342    Tag: blume-20000512-ml-build
1343    Description:
1344    
1345    Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
1346    getting installed properly (by config/install.sh).
1347    
1348    ----------------------------------------------------------------------
1349    Name: Matthias Blume
1350    Date: 2000/05/12 17:30:00 JST
1351    Tag: blume-20000512-anchors
1352    Description:
1353    
1354    !!! NEW BOOT FILES !!!
1355    
1356    This change is in preparation of fading out support for "implicitly
1357    anchored path names".  I went through all sources and used the
1358    explicit (and relatively new) $-notation.  See system/README and the
1359    CM manual for more info on this.
1360    
1361    I also modified the anchoring scheme for some things such as "smlnj",
1362    "MLRISC", "cm", etc. to take advantage of the fact that explicit
1363    anchors are more expressive: anchor name and first arc do not have to
1364    coincide.  This entails the following user-visible change:
1365    
1366    You have to write $smlnj/foo/bar instead of smlnj/foo/bar.  In
1367    particular, when you fire up sml with a command-line argument, say,
1368    e.g.:
1369    
1370       sml '$smlnj/cmb.cm'
1371    
1372    At the ML toplevel prompt:
1373    
1374       CM.autoload "$smlnj/cmb.cm";
1375    
1376    There is also a new controller in CM.Control that can be used to turn
1377    off all remaining support for implicit anchors by saying:
1378    
1379        CM.autoload "$smlnj/
1380        #set CM.Control.implicit_anchors false;
1381    
1382    This causes CM to reject implicitly anchored paths.  This is (for the
1383    time being) less permissive than the "final" version where there will
1384    be no more such implicit anchors and relative paths will be just that:
1385    relative.
1386    
1387    The next step (version after next version?) will be to make the
1388    default for CM.Control.implicit_anchors false.  After the dust has
1389    settled, I can then produce the "final" version of this...
1390    
1391    Note: Since bootstrapping is a bit tricky, I provided new boot files.
1392    
1393    ----------------------------------------------------------------------
1394    Name: Matthias Blume
1395    Date: 2000/05/11 16:30:00 JST
1396    Tag: blume-20000511-sources
1397    Description:
1398    
1399    The main change is that I added function CM.sources as a generalized
1400    version of the earlier CM.makedepend.  This entails the following
1401    additional changes:
1402    
1403      - CM.makedepend has been dropped.
1404    
1405      - CM manual has been updated.
1406    
1407      - TOOLS signature and API have been changed.
1408    
1409    ----------------------------------------------------------------------
1410    Name: Allen Leung
1411    Date: 2000/05/10 21:17 EDT
1412    Tag: leunga-20000510-moby-c--ssa
1413    Description:
1414    
1415      Various bug fixes and new features for C--, Moby and MLRISC optimizations.
1416    None of these affect SML/NJ.
1417    
1418    1. Register Allocation
1419    
1420        a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
1421           This module tries to remove local (i.e. basic block level) redundancies
1422           during spilling.
1423    
1424        b. A new framework for performing region based register allocation.
1425           Not yet entirely functional.
1426    
1427    2. X86
1428    
1429       a. DefUse for POP was missing the stack pointer [found by Lal]
1430       b. Reload for CALL was incorrect in X86Spill [found by John]
1431       c. Various fixes in X86Spill so that it can be used correctly for
1432          the new spilling module.
1433    
1434    3. SSA/IR
1435    
1436       a. New module ir/dj-dataflow.sml implements elimination based
1437          data flow analysis.
1438    
1439    4. MLRiscGen
1440    
1441       a. Fix for gc type annotation
1442    
1443    5. MDGen
1444    
1445       Various fixes for machine description -> ml code translation.  For ssa
1446       only.
1447    
1448    ----------------------------------------------------------------------
1449    Name: Allen Leung
1450    Date: 2000/05/08 22:17 EDT
1451    Tag: leunga-20000508-labexp
1452    Description:
1453    
1454      Fermin has found a few assembly problems with constant expressions
1455      generated in LabelExp.  Mostly, the problems involve extra parentheses,
1456      which choke on dumb assemblers.  This is his fix.
1457    
1458    ----------------------------------------------------------------------
1459    Name: Dave MacQueen
1460    Date: 2000/04/09 14:00 EDT
1461    Tag: dbm-20000502-Version_110_28
1462    Description:
1463    
1464    1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
1465    
1466    2. Updated config/version to 110.28
1467    
1468    3. Updated config/srcarchiveurl
1469    
1470    3. New boot files!
1471       ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
1472    
1473    ----------------------------------------------------------------------
1474    Name: Matthias Blume
1475    Date: 2000/05/01 19:05:00 JST
1476    Tag: blume-20000501-noweb
1477    Description:
1478    
1479    A new noweb tool has been added.  The existing system is entirely
1480    unaffected by this, but some CM users have asked for renewed noweb
1481    support.  Everything is documented in the CM manual.
1482    
1483    New (plugin) libraries:
1484    
1485       noweb-tool.cm
1486       nw-ext.cm
1487    
1488    ----------------------------------------------------------------------
1489    Name: Dave MacQueen
1490    Date: 2000/04/30 12:40PM EDT
1491    Tag: dbm-20000430-bug_fixes
1492    Description:
1493    
1494    1. Fix for bug 1498
1495       smlnj/src/system/Basis/Implementation/Unsafe/object.sig
1496       smlnj/src/system/Basis/Implementation/Unsafe/object.sml
1497         added toRealArray function
1498       smlnj/src/compiler/MiscUtil/print/ppobj.sml
1499         added check for tag Obj.RealArray to array printing case in ppObj
1500    
1501    2. Fix for bug 1510
1502       smlnj/src/compiler/Semant/types/typesutil.sml
1503         fixed definition of dummyargs (used by equalTycon) so that
1504         dummy args are distinct types
1505    
1506    ----------------------------------------------------------------------
1507    Name: Matthias Blume
1508    Date: 2000/04/30 01:00:00 JST
1509    Tag: blume-20000430-versions
1510    Description:
1511    
1512    1. CM version numbering added.  This is an implementation of Lal's
1513       proposal for adding version numbers and version checking to .cm
1514       files.  Lal said that his proposal was just that -- a proposal.
1515       For the time being I went ahead and implemented it so that people
1516       can comment on it.  Everything is completely backward-compatible
1517       (except for the stable library format, i.e., new bootfiles!).
1518    
1519       As usual, see the CM manual for details.
1520    
1521    2. An alternative syntax for anchored paths has been implemented.
1522       Dave has recently voiced the same concerns that I had when I did
1523       this, so there should be some support.  My take is that eventually
1524       I will let support for the current syntax (where anchors are
1525       "implicit") fade out in favor of the new, explicit syntax.
1526       In order to be backward-compatible, both old and new syntax are
1527       currently supported.
1528    
1529       Again, see the CM manual for details.
1530    
1531    3. Parallel make is trying to be slightly smarter:  When the master
1532       process finds a "bottleneck", i.e., when there is only one
1533       compilation unit that can be compiled and everybody else is
1534       waiting on it, then it will simply compile it directly instead
1535       of clumsily telling one of the slaves to do it.
1536    
1537    4. Support for "unsharing" added.  This is necessary in order to be
1538       able to have two different versions of the same library running
1539       at the same time (e.g., for trying out a new MLRISC while still
1540       having the old MLRISC linked into the current compiler, etc.)
1541       See the CM manual.
1542    
1543    5. Simple "makedepend" functionality added for generating Makefile
1544       dependency information.  (This is rather crude at the moment.
1545       Expect some changes here in the future.)
1546    
1547    6. ".fun" added as a recognized suffix for ML files. Also documented
1548       explicitly in the manual that the fallback behavior (unknown suffix
1549       -> ML file) is not an official feature!
1550    
1551    7. Small changes to the pickler for stable libraries.
1552    
1553    8. Several internal changes to CM (for cleanup/improvement).
1554    
1555    
1556    !!!! NEW BINFILES !!!!
1557    
1558    ----------------------------------------------------------------------
1559    Name: Matthias Blume
1560    Date: 2000/04/28 17:30:00 JST
1561    Tag: blume-20000428-pathconfig
1562    Description:
1563    
1564    1. I changed config/install.sh to remove duplicate entries from the
1565       lib/pathconfig file at the end.  Moreover, the final version of
1566       lib/pathconfig is sorted alphabetically.  The same (sorting) is done
1567       in src/system/installml.
1568    
1569    2. The config/install.sh script now consistently uses relative
1570       pathnames in lib/pathconfig whenever the anchor is in the lib
1571       directory.  (So far this was true for the libraries that come
1572       pre-compiled and bundled as part of the bootfiles but not for
1573       libraries that are compiled by the script itself.)
1574    
1575    ----------------------------------------------------------------------
1576    Name: Matthias Blume
1577    Date: 2000/04/26 13:10:00 JST
1578    Tag: blume-20000426-fun_suffix
1579    Description:
1580    
1581    Added ".fun" as a recognized file name suffix (for ML code).
1582    
1583    ----------------------------------------------------------------------
1584    Name: Allen Leung
1585    Date: 2000/04/25 17:00:00 EST
1586    Tag: leunga-20000425-alpha-ra
1587    Description:
1588    
1589    1. Alpha
1590    
1591        PSEUDOARITH was missing in AlphaRewrite.  This causes an endless loop
1592    in C--.
1593    
1594    2. RA
1595    
1596       Added a flag "ra-dump-size" to print out the size of the flowgraph
1597       and the interference graph.
1598    
1599    ----------------------------------------------------------------------
1600    Name: Dave MacQueen
1601    Date: 2000/04/25/
1602    Tag: dbm-20000425-mlyacc_doc_examples
1603    Description:
1604      Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
1605      Updated all three examples in src/ml-yacc/examples to run
1606      under 110.* using CM.make.
1607    
1608    ----------------------------------------------------------------------
1609    Name: Allen Leung
1610    Date: 2000/04/20 23:04:00 EST
1611    Tag: leunga-20000420-ssa-c---stuff
1612    Description:
1613    
1614      This update synchronizes my repository with Yale's.  Most of these
1615    changes, however, do not affect SML/NJ at all (the RA is an exception).
1616    
1617    1. Register Allocator
1618    
1619       a. An improvement in the interference graph construction:
1620          Given a copy
1621    
1622                s <- t
1623    
1624          no interference edge between s and t is added for this definition of s.
1625    
1626       b. I've added two new spill heuristic modules that Fermin and I developed
1627          (in the new library RA.cm). These are unused in SML/NJ but maybe
1628          useful for others (Moby?)
1629    
1630    2. X86
1631    
1632       a. Various fixes in the backend provided by Fermin [C--] and Lal.
1633    
1634    3. Alpha
1635    
1636       a. Added the BSR instruction and code generation that goes with it [C--]
1637       b. Other fixes too numerous to recount provided by Fermin [C--]
1638    
1639    4. Regmaps
1640    
1641       a. The regmaps are not initialized with the identity physical bindings
1642          at creation time.  This is unneeded.
1643    
1644    5. MLRISC Optimizations
1645    
1646       a. The DJ-Graph module can now compute the iterated dominance frontiers
1647          intersects with liveness incrementally in linear time! Woohoo!
1648          This is now used in my new SSA construction algorithm.
1649    
1650       b. THe branch reorganization module is now smarter about linear chains of
1651          basic blocks.
1652    
1653    
1654    ----------------------------------------------------------------------
1655    Name: Matthias Blume
1656    Date: 2000/04/12 13:52:00 JST
1657    Tag: blume_main_v110p27_1
1658    Description:
1659    
1660    Changed install.sh script to handle archive files without version number
1661    and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
1662    name of the boot file archive.
1663    
1664    ----------------------------------------------------------------------
1665    Name: Dave MacQueen
1666    Date: 2000/04/09 14:00 EDT
1667    Tag: dbm-20000410-Version_110_27
1668    Description:
1669    
1670    1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
1671    
1672    2. Updated src/config/version to 110.27
1673    
1674    3. New boot files!
1675    
1676    ----------------------------------------------------------------------
1677    Name: Allen Leung
1678    Date: 2000/04/09 19:09:00 EST
1679    Tag: leunga-20000409-misc
1680    Description:
1681    
1682    1.  Yet another fix for x86 assembly for idivl, imull, mull and friends.
1683    
1684    2.  Miscellaneous improvements to MLRISC (unused in sml/nj)
1685    
1686    ----------------------------------------------------------------------
1687    Name: Stefan
1688    Date: 2000/04/07 10:00:00 EDT
1689    Tag: monnier-20000406-branch-handling
1690    Description:
1691    
1692    Improved handling of branches (mostly those generated from
1693    polymorphic equality), removed switchoff and changed the
1694    default optimization settings (more cpsopt and less flintopt).
1695    
1696    ----------------------------------------------------------------------
1697    Name: Allen Leung
1698    Date: 2000/04/06 01:30:00 EST
1699    Tag: leunga-20000406-peephole-x86-SSA-2
1700    Description:
1701    
1702       Forgot a few files.
1703    
1704    ----------------------------------------------------------------------
1705    Name: Allen Leung
1706    Date: 2000/04/06 00:36:00 EST
1707    Tag: leunga-20000406-peephole-x86-SSA
1708    Description:
1709    
1710    1.  New Peephole code
1711    
1712    2.  Minor improvement to X86 instruction selection
1713    
1714    3.  Various fixes to SSA and machine description -> code translator
1715    
1716    ----------------------------------------------------------------------
1717    Name: Matthias Blume
1718    Date: 2000/04/05 12:30:00 JST
1719    Tag: blume_main_v110p26p2_3
1720    Description:
1721    
1722    This update just merges three minor cosmetic updates to CM's sources
1723    to get ready for the 110.27 code freeze on Friday.  No functionality
1724    has changed.
1725    
1726    ----------------------------------------------------------------------
1727    Name: Allen Leung
1728    Date: 2000/04/04 19:39:00 EST
1729    Tag: leunga-20000404-x86-asm
1730    Description:
1731    
1732    1.  Fixed a problem in X86 assembly.
1733    
1734        Things like
1735    
1736           jmp %eax
1737           jmp (%eax)
1738    
1739        should be output as
1740    
1741           jmp *%eax
1742           jmp *(%eax)
1743    
1744    2.  Assembly output
1745    
1746          Added a new flag
1747    
1748              "asm-indent-copies" (default to false)
1749    
1750          When this flag is on, parallel copies will be indented an extra level.
1751    
1752    ----------------------------------------------------------------------
1753    Name: Allen Leung
1754    Date: 2000/04/04 03:18:00 EST
1755    Tag: leunga-20000404-C--Moby
1756    Description:
1757    
1758        All of these fixes are related to C--, Moby, and my own optimization
1759        stuff; so they shouldn't affect SML/NJ.
1760    
1761    1.  X86
1762    
1763        Various fixes related floating point, and extensions.
1764    
1765    2.  Alpha
1766    
1767        Some extra patterns related to loads with signed/zero extension
1768        provided by Fermin.
1769    
1770    3.  Assembly
1771    
1772        When generating assembly, resolve the value of client defined constants,
1773        instead of generating symbolic values.  This is controlled by the
1774        new flag "asm-resolve-constants", which is default to true.
1775    
1776    4.  Machine Descriptions
1777    
1778        a. The precedence parser was slightly broken when parsing infixr symbols.
1779        b. The type generalizing code had the bound variables reversed, resulting
1780           in a problem during arity raising.
1781        c. Various fixes in machine descriptions.
1782    
1783    ----------------------------------------------------------------------
1784    Name: Matthias Blume
1785    Date: 2000/04/03 16:05:00 JST
1786    Tag: blume_main_v110p26p2_2
1787    Description:
1788    
1789    I eliminated coreEnv from compInfo.  Access to the "Core" structure is
1790    now done via the ordinary static environment that is context to each
1791    compilation unit.
1792    
1793    To this end, I arranged that instead of "structure Core" as "structure
1794    _Core" is bound in the pervasive environment.  Core access is done via
1795    _Core (which can never be accidentally rebound because _Core is not a
1796    legal surface-syntax symbol).
1797    
1798    The current solution is much cleaner because the core environment is
1799    now simply part of the pervasive environment which is part of every
1800    compilation unit's context anyway.  In particular, this eliminates all
1801    special-case handling that was necessary until now in order to deal
1802    with dynamic and symbolic parts of the core environment.
1803    
1804    Remaining hackery (to bind the "magic" symbol _Core) is localized in the
1805    compilation manager's bootstrap compiler (actually: in the "init group"
1806    handling).  See the comments in src/system/smlnj/init/init.cmi for
1807    more details.
1808    
1809    I also tried to track down all mentions of "Core" (as string argument
1810    to Symbol.strSymbol) in the compiler and replaced them with a
1811    reference to the new CoreSym.coreSym.  Seems cleaner since the actual
1812    name appears in one place only.
1813    
1814    Binfile and bootfile format have not changed, but the switchover from
1815    the old "init.cmi" to the new one is a bit tricky, so I supplied new
1816    bootfiles anyway.
1817    
1818    ----------------------------------------------------------------------
1819    Name: Allen Leung
1820    Date: 2000/04/02 21:17:00 EST
1821    Tag: leunga-20000402-mltree
1822    Description:
1823    
1824       1. Renamed the constructor CALL in MLTREE by popular demand.
1825       2. Added a bunch of files from my repository.  These are currently
1826          used by other non-SMLNJ backends.
1827    
1828    ----------------------------------------------------------------------
1829    Name: Allen Leung
1830    Date: 2000/03/31 21:15:00 EST
1831    Tag: leunga-20000331-aliasing
1832    Description:
1833    
1834    This update contains a rewritten (and hopefully more correct) module
1835    for extracting aliasing information from CPS.
1836    
1837       To turn on this feature:
1838    
1839            Compiler.Control.CG.memDisambiguate := true
1840    
1841       To pretty print the region information with assembly
1842    
1843           Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
1844    
1845       To control how many levels of aliasing information are printed, use:
1846    
1847           Compiler.Control.MLRISC.getInt "points-to-show-level" := n
1848    
1849       The default of n is 3.
1850    
1851    ----------------------------------------------------------------------
1852    Name: David MacQueen
1853    Date: 2000/03/31 11:15:00 EST
1854    Tag: dbm-20000331-runtime_fix
1855    Description:
1856    
1857    This update contains:
1858    
1859    1. runtime/c-lib/c-libraries.c
1860       includes added in revision 1.2 caused compilation errors on hppa-hpux
1861    
1862    2. fix for bug 1556
1863       system/Basis/Implementation/NJ/internal-signals.sml
1864    
1865    ----------------------------------------------------------------------
1866    Name: Matthias Blume
1867    Date: 2000/03/31 18:00:00 JST
1868    Tag: blume_main_v110p26p2_1
1869    Description:
1870    
1871    This update contains:
1872    
1873    1. A small change to CM's handling of stable libraries:
1874       CM now maintains one "global" modmap that is used for all stable
1875       libraries.  The use of such a global modmap maximizes sharing and
1876       minimizes the need for re-traversing parts of environments during
1877       modmap construction.  (However, this has minor impact since modmap
1878       construction seems to account for just one percent or less of total
1879       compile time.)
1880    
1881    2. I added a "genmap" phase to the statistics.  This is where I got the
1882       "one percent" number (see above).
1883    
1884    3. CM's new tool parameter mechanism just became _even_ better. :)
1885       - The parser understands named parameters and recursive options.
1886       - The "make" and "shell" tools use these new features.
1887         (This makes it a lot easier to cascade these tools.)
1888       - There is a small syntax change: named parameters use a
1889    
1890           <name> : ( <option> ... )            or
1891           <name> : <string>
1892    
1893         syntax.  Previously, named parameters were implemented in an
1894         ad-hoc fashion by each tool individually (by parsing strings)
1895         and had the form
1896    
1897           <name>=<string>
1898    
1899       See the CM manual for a full description of these issues.
1900    
1901    ----------------------------------------------------------------------
1902    Name: Matthias Blume
1903    Date: 2000/03/30 18:00:00 JST
1904    Tag: blume_main_v110p26p2_0
1905    Description:
1906    
1907    !!!!! WARNING !!!!!!
1908    !!  New binfiles  !!
1909    !!!!!!!!!!!!!!!!!!!!
1910    
1911    This update contains:
1912    
1913    1. Moderate changes to CM:
1914    
1915       - Changes to CM's tools mechanism.  In particular, it is now possible
1916       to have tools that accept additional "command line" parameters
1917       (specified in the .cm file at each instance where the tool's class is
1918       used).
1919    
1920       This was done to accommodate the new "make" and "shell" tools which
1921       facilitate fairly seamless hookup to portions of code managed using
1922       Makefiles or Shell scripts.
1923    
1924       There are no classes "shared" or "private" anymore.  Instead, the
1925       sharing annotation is now a parameter to the "sml" class.
1926    
1927       There is a bit of generic machinery for implementing one's own
1928       tools that accept command-line parameters.  However, I am not yet fully
1929       satisfied with that part, so expect changes here in the future.
1930    
1931       All existing tools are described in the CM manual.
1932    
1933       - Slightly better error handling.  (CM now suppresses many followup
1934       error messages that tended to be more annoying than helpful.)
1935    
1936    2. Major changes to the compiler's static environment data structures.
1937    
1938       - no CMStaticEnv anymore.
1939            - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
1940              but it is called Environment), no conversions between different
1941              kinds of static environments
1942    
1943       - There is still a notion of a "modmap", but such modmaps are generated
1944         on demand at the time when they are needed.  This sounds slow, but I
1945         sped up the code that generates modmaps enough for this not to lead to
1946         a slowdown of the compiler (at least I didn't detect any).
1947    
1948       - To facilitate rapid modmap generation, static environments now
1949         contain an (optional) "modtree" structure.  Modtree annotations are
1950         constructed by the unpickler during unpickling.  (This means that
1951         the elaborator does not have to worry about modtrees at all.)
1952         Modtrees have the advantage that they are compositional in the same
1953         way as the environment data structure itself is compositional.
1954         As a result, modtrees never hang on to parts of an environment that
1955         has already been rendered "stale" by filtering or rebinding.
1956    
1957       - I went through many, many trials and errors before arriving at the
1958         current solution.  (The initial idea of "linkpaths" did not work.)
1959         But the result of all this is that I have touched a lot of files that
1960         depend on the "modules" and "types" data structures (most of the
1961         elaborator). There were a lot of changes during my "linkpath" trials
1962         that could have been reverted to their original state but weren't.
1963         Please, don't be too harsh on me for messing with this code a bit more
1964         than what was strictly necessary...  (I _did_ resist the tempation
1965         of doing any "global reformatting" to avoid an untimely death at
1966         Dave's hands. :)
1967    
1968       - One positive aspect of the previous point:  At least I made sure that
1969         all files that I touched now compile without warnings (other than
1970         "polyEqual").
1971    
1972       - compiler now tends to run "leaner" (i.e., ties up less memory in
1973         redundant modmaps)
1974    
1975    ----------------------------------------------------------------------
1976    Name: Allen Leung
1977    Date: 2000/03/29 18:00:00
1978    Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
1979    Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
1980    Description:
1981    
1982       This update contains *MAJOR* changes to the way code is generated from CPS
1983    in the module mlriscGen, and in various backend modules.
1984    
1985    CHANGES
1986    =======
1987    
1988    1. MLRiscGen: forward propagation fix.
1989    
1990       There was a bug in forward propagation introduced at about the same time
1991       as the MLRISC x86 backend, which prohibits coalescing to be
1992       performed effectively in loops.
1993    
1994       Effect: speed up of loops in RISC architectures.
1995               By itself, this actually slowed down certain benchmarks on the x86.
1996    
1997    2. MLRiscGen:  forward propagating addresses from consing.
1998    
1999       I've changed the way consing code is generated.  Basically I separated
2000       out the initialization part:
2001    
2002            store tag,   offset(allocptr)
2003            store elem1, offset+4(allocptr)
2004            store elem2, offset+8(allocptr)
2005            ...
2006            store elemn, offset+4n(allocptr)
2007    
2008       and the address computation part:
2009    
2010            celladdr <- offset+4+alloctpr
2011    
2012       and move the address computation part
2013    
2014       Effect:  register pressure is generally lower as a result.  This
2015                makes compilation of certain expressions much faster, such as
2016                long lists with non-trivial elements.
2017    
2018                 [(0,0), (0,0), .... (0,0)]
2019    
2020    3. MLRiscGen: base pointer elimination.
2021    
2022        As part of the linkage mechanism, we generate the sequence:
2023    
2024         L:  ...  <- start of the code fragment
2025    
2026         L1:
2027             base pointer <- linkreg - L1 + L
2028    
2029         The base pointer was then used for computing relocatable addresses
2030       in the code fragment.  Frequently (such as in lots of continuations)
2031       this is not needed.  We now eliminate this sequence whenever possible.
2032    
2033         For compile time efficiency, I'm using a very stupid local heuristic.
2034       But in general, this should be done as a control flow analysis.
2035    
2036       Effect:  Smaller code size.  Speed up of most programs.
2037    
2038    4. Hppa back end
2039    
2040         Long jumps in span dependence resolution used to depend on the existence
2041      of the base pointer.
2042    
2043         A jump to a long label L was expanded into the following sequence:
2044    
2045          LDIL %hi(L-8192), %r29
2046          LDO  %lo(L-8192)(%r29), %r29
2047          ADD  %r29, baseptr, %r29
2048          BV,n %r0(%r29)
2049    
2050         In the presence of change (3) above, this will not work.  I've changed
2051       it so that the following sequence of instructions are generated, which
2052       doesn't mention the base pointer at all:
2053    
2054             BL,n  L', %r29           /* branch and link, L' + 4 -> %r29 */
2055        L':  ADDIL L-(L'+4), %r29     /* Compute address of L */
2056             BV,n  %r0(%r29)          /* Jump */
2057    
2058    5. Alpha back end
2059    
2060          New alpha instructions LDB/LDW have been added, as per Fermin's
2061       suggestions.   This is unrelated to all other changes.
2062    
2063    6. X86 back end
2064    
2065         I've changed andl to testl in the floating point test sequence
2066         whenever appropriate.  The Intel optimization guide states that
2067         testl is preferable to andl.
2068    
2069    7. RA (x86 only)
2070    
2071         I've improved the spill propagation algorithm, using an approximation
2072       of maximal weighted independent sets.   This seems to be necessary to
2073       alleviate the negative effect in light of the slow down in (1).
2074    
2075         I'll write down the algorithm one of these days.
2076    
2077    8. MLRiscGen: frequencies
2078    
2079         I've added an annotation that states that all call gc blocks have zero
2080       execution frequencies.  This improves register allocation on the x86.
2081    
2082    BENCHMARKS
2083    ==========
2084    
2085       I've only perform the comparison on 110.25.
2086    
2087       The platforms are:
2088    
2089        HPPA  A four processor HP machine (E9000) with 5G of memory.
2090        X86   A 300Hhz Pentium II with 128M of memory, and
2091        SPARC An Ultra sparc 2 with 512M of memory.
2092    
2093       I used the following parameters for the SML benchmarks:
2094    
2095                 @SMLalloc
2096         HPPA    256k
2097         SPARC   512k
2098         X86     256k
2099    
2100    COMPILATION TIME
2101    ----------------
2102       Here are the numbers comparing the compilation times of the compilers.
2103       I've only compared 110.25 compiling the new sources versus
2104       a fixpoint version of the new compiler compiling the same.
2105    
2106                     110.25                                  New
2107               Total  Time in RA  Spill+Reload   Total  Time In RA Spill+Reload
2108         HPPA   627s    116s        2684+3584     599s    95s       1003+1879
2109         SPARC  892s    173s        2891+3870     708s    116s      1004+1880
2110         X86    999s    315s       94006+130691   987s    296s    108877+141957
2111    
2112                   110.25         New
2113                Code Size      Code Size
2114         HPPA   8596736         8561421
2115         SPARC  8974299         8785143
2116         X86    9029180         8716783
2117    
2118       So in summary, things are at least as good as before.   Dramatic
2119       reduction in compilation is obtained on the Sparc; I can't explain it,
2120       but it is reproducible.  Perhaps someone should try to reproduce this
2121       on their own machines.
2122    
2123    SML BENCHMARKS
2124    --------------
2125    
2126        On the average, all benchmarks perform at least as well as before.
2127    
2128          HPPA         Compilation Time     Spill+Reload      Run Time
2129                     110.25  New            110.25    New   110.25  New
2130    
2131          barnesHut  3.158  3.015  4.75%    1+1       0+0   2.980  2.922   2.00%
2132              boyer  6.152  5.708  7.77%    0+0       0+0   0.218  0.213   2.34%
2133       count-graphs  1.168  1.120  4.32%    0+0       0+0  22.705 23.073  -1.60%
2134                fft  0.877  0.792 10.74%    1+3       1+3   0.602  0.587   2.56%
2135        knuthBendix  3.180  2.857 11.32%    0+0       0+0   0.675  0.662   2.02%
2136             lexgen  6.190  5.290 17.01%    0+0       0+0   0.913  0.788  15.86%
2137               life  0.803  0.703 14.22%   25+25      0+0   0.153  0.140   9.52%
2138              logic  2.048  2.007  2.08%    6+6       1+1   4.133  4.008   3.12%
2139         mandelbrot  0.077  0.080 -4.17%    0+0       0+0   0.765  0.712   7.49%
2140             mlyacc 22.932 20.937  9.53%  154+181    32+57  0.468  0.430   8.91%
2141            nucleic  5.183  5.060  2.44%    2+2       0+0   0.125  0.120   4.17%
2142      ratio-regions  3.357  3.142  6.84%    0+0       0+0  116.225 113.173 2.70%
2143                ray  1.283  1.290 -0.52%    0+0       0+0   2.887  2.855   1.11%
2144             simple  6.307  6.032  4.56%   28+30      5+7   3.705  3.658   1.28%
2145                tsp  0.888  0.862  3.09%    0+0       0+0   7.040  6.893   2.13%
2146               vliw 24.378 23.455  3.94%  106+127    25+45  2.758  2.707   1.91%
2147      --------------------------------------------------------------------------
2148       Average                     6.12%                                   4.09%
2149    
2150          SPARC        Compilation Time     Spill+Reload      Run Time
2151                     110.25  New            110.25    New   110.25  New
2152    
2153          barnesHut  3.778  3.592  5.20%    2+2       0+0   3.648  3.453    5.65%
2154              boyer  6.632  6.110  8.54%    0+0       0+0   0.258  0.242    6.90%
2155       count-graphs  1.435  1.325  8.30%    0+0       0+0  33.672 34.737   -3.07%
2156                fft  0.980  0.940  4.26%    3+9       2+6   0.838  0.827    1.41%
2157        knuthBendix  3.590  3.138 14.39%    0+0       0+0   0.962  0.967   -0.52%
2158             lexgen  6.593  6.072  8.59%    1+1       0+0   1.077  1.078   -0.15%
2159               life  0.972  0.868 11.90%   26+26      0+0   0.143  0.140    2.38%
2160              logic  2.525  2.387  5.80%    7+7       1+1   5.625  5.158    9.05%
2161         mandelbrot  0.090  0.093 -3.57%    0+0       0+0   0.855  0.728   17.39%
2162             mlyacc 26.732 23.827 12.19%  162+189    32+57  0.550  0.560   -1.79%
2163            nucleic  6.233  6.197  0.59%    3+3       0+0   0.163  0.173   -5.77%
2164      ratio-regions  3.780  3.507  7.79%    0+0       0+0 133.993 131.035   2.26%
2165                ray  1.595  1.550  2.90%    1+1       0+0   3.440  3.418    0.63%
2166             simple  6.972  6.487  7.48%   29+32      5+7   3.523  3.525   -0.05%
2167                tsp  1.115  1.063  4.86%    0+0       0+0   7.393  7.265    1.77%
2168               vliw 27.765 24.818 11.87%  110+135    25+45  2.265  2.135    6.09%
2169      ----------------------------------------------------------------------------
2170       Average                     6.94%                                    2.64%
2171    
2172          X86          Compilation Time     Spill+Reload      Run Time
2173                     110.25  New            110.25    New   110.25  New
2174    
2175          barnesHut  5.530  5.420  2.03%  593+893   597+915   3.532  3.440   2.66%
2176              boyer  8.768  7.747 13.19%  493+199   301+289   0.327  0.297  10.11%
2177       count-graphs  2.040  2.010  1.49%  298+394   315+457  26.578 28.660  -7.26%
2178                fft  1.327  1.302  1.92%  112+209   115+210   1.055  0.962   9.71%
2179        knuthBendix  5.218  5.475 -4.69%  451+598   510+650   0.928  0.932  -0.36%
2180             lexgen  9.970  9.623  3.60% 1014+841  1157+885   0.947  0.928   1.97%
2181               life  1.183  1.183  0.00%  162+182   145+148   0.127  0.103  22.58%
2182              logic  3.285  3.512 -6.45%  514+684   591+836   5.682  5.577   1.88%
2183         mandelbrot  0.147  0.143  2.33%   38+41     33+54    0.703  0.690   1.93%
2184             mlyacc 35.457 32.763  8.22% 3496+4564 3611+4860  0.552  0.550   0.30%
2185            nucleic  7.100  6.888  3.07%  239+168   201+158   0.175  0.173   0.96%
2186      ratio-regions  6.388  6.843 -6.65% 1182+257   981+300  120.142 120.345 -0.17%
2187                ray  2.332  2.338 -0.29%  346+398   402+494   3.593  3.540   1.51%
2188             simple  9.912  9.903  0.08% 1475+941  1579+1168  3.057  3.178  -3.83%
2189                tsp  1.623  1.532  5.98%  266+200   250+211   8.045  7.878   2.12%
2190               vliw 33.947 35.470 -4.29% 2629+2774 2877+3171  2.072  1.890   9.61%
2191      ----------------------------------------------------------------------------
2192       Average                     1.22%                                     3.36%
2193    
2194    ----------------------------------------------------------------------
2195    Name: Allen Leung
2196    Date: 2000/03/23 16:25:00
2197    Tag: leunga-20000323-fix_x86_alpha
2198    Description:
2199    
2200    1. X86 fixes/changes
2201    
2202       a.  The old code generated for SETcc was completely wrong.
2203           The Intel optimization guide is VERY misleading.
2204    
2205    2. ALPHA fixes/changes
2206    
2207       a.  Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
2208       b.  Added a new mode byteWordLoadStores to the functor parameter to Alpha()
2209       c.  Added reassociation code for address computation.
2210    
2211    ----------------------------------------------------------------------
2212    Name: Allen Leung
2213    Date: 2000/03/22 01:23:00
2214    Tag: leunga-20000322-fix_x86_hppa_ra
2215    Description:
2216    
2217    1. X86 fixes/changes
2218    
2219       a.  x86Rewrite bug with MUL3 (found by Lal)
2220       b.  Added the instructions FSTS, FSTL
2221    
2222    2. PA-RISC fixes/changes
2223    
2224       a.  B label should not be a delay slot candidate!  Why did this work?
2225       b.  ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
2226           as it should be.
2227       c.  The assembly syntax for fstds and fstdd was wrong.
2228       d.  Added the composite instruction COMICLR/LDO, which is the immediate
2229           operand variant of COMCLR/LDO.
2230    
2231    3. Generic MLRISC
2232    
2233       a.  shuffle.sml rewritten to be slightly more efficient
2234       b.  DIV bug in mltree-simplify fixed (found by Fermin)
2235    
2236    4. Register Allocator
2237    
2238       a.  I now release the interference graph earlier during spilling.
2239           May improve memory usage.
2240    
2241  ----------------------------------------------------------------------  ----------------------------------------------------------------------
2242  Name: Matthias Blume  Name: Matthias Blume
2243  Date: 2000/03/14 14:15:32  Date: 2000/03/14 14:15:32
# Line 19  Line 2246 
2246    
2247  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an  1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
2248  additional argument called "template" which is an optional string that  additional argument called "template" which is an optional string that
2249  specifiel the layout of the tool command line.  See the CM manual for  specifies the layout of the tool command line.  See the CM manual for
2250  explanation.  explanation.
2251    
2252  2. A special-purpose tool can be "regisitered" by simply dropping the  2. A special-purpose tool can be "registered" by simply dropping the
2253  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same  corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
2254  directory where the .cm file lives that uses this tool.  (The  directory where the .cm file lives that uses this tool.  (The
2255  behavior/misfeature until now was to look for the tool description  behavior/misfeature until now was to look for the tool description
# Line 66  Line 2293 
2293  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for  rebuild.  Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
2294  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,  <k>=1,2,... is normally not a good idea when invoking fixpt.  However,
2295  they might be the result of an earlier partial run of fixpt (which  they might be the result of an earlier partial run of fixpt (which
2296  perhaps got accidentially killed).  In this case, fixpt will quickly  perhaps got accidentally killed).  In this case, fixpt will quickly
2297  move through what exists before continuing where it left off earlier,  move through what exists before continuing where it left off earlier,
2298  and, thus, saves a lot of time.  and, thus, saves a lot of time.
2299    
# Line 116  Line 2343 
2343    it from that remote directory.    it from that remote directory.
2344    This should simplify installation further:  For machines that have    This should simplify installation further:  For machines that have
2345    access to the internet, just fetch <version>-config.tgz, unpack it,    access to the internet, just fetch <version>-config.tgz, unpack it,
2346    edit config/targets, and go (run config/install.sh).  The scipt will    edit config/targets, and go (run config/install.sh).  The script will
2347    fetch everything else that it might need all by itself.    fetch everything else that it might need all by itself.
2348    
2349    For CVS users, this mechanism is not relevant for source archives, but    For CVS users, this mechanism is not relevant for source archives, but

Legend:
Removed from v.578  
changed lines
  Added in v.788

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