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 1037, Sat Jan 26 02:27:14 2002 UTC revision 1342, Mon Aug 11 20:46:00 2003 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume (blume@tti-c.org)
17    Date: 2003/08/11 15:45:00 CDT
18    Tag: blume-20030811-windows
19    Description:
20    
21    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
22    
23        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
24    
25    This patch restores SML/NJ's ability to run under win32.  There are a
26    number of changes, including fixes for several bugs that had gone
27    unnoticed until now:
28    
29      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
30        trying to run the win32 version from within cygwin.)
31    
32      - There are a number of simple .bat scripts that substitute for their
33        corresponding Unix shell-scripts.  (See below.)
34    
35      - The internals of ml-build have been modified slightly.  The main
36        difference is that instead of calling ".link-sml" (or link-sml.bat)
37        using OS.Process.system, the ML process delegates this task back
38        to the script.  Otherwise problems arise in mixed environments such
39        as Cygwin where scripts look and work like Unix scripts, but
40        where OS.Process.system cannot run them.
41    
42      - In CM, the srcpath pickler used native pathname syntax -- which
43        is incorrect in the case of cross-compilation.  The new pickle format
44        is independent of platform-specific naming conventions.
45    
46      - Path configuration files (such as lib/pathconfig) can now choose
47        between native and standard syntax.  Placing a line of the form
48    
49            standard!
50    
51        into the file causes all subsequent paths to be interpreted using
52        CM standard pathname syntax (= Unix conventions); a line
53    
54            native!
55    
56        switches back to native style.  This was needed so that
57        path config files can be written portably, see src/system/pathconfig.
58    
59      - Runtime system:
60    
61          - win32-filesys.c:  get_file_time and set_file_time now
62            access modification time, not creation time.
63    
64          - I/O code made aware of new array representation.
65    
66          - Bug fixes in X86.prim.masm.
67    
68       - src/system/makeml made aware of win32. (For use under cygwin
69            and other Unix-environments for windows.)
70    
71       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
72         which caused BinIO.inputAll to fail consistently.
73    
74    .bat scripts:
75    
76       Windows .bat scripts assume that SMLNJ_HOME is defined.
77    
78       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
79         applications (sml, ml-yacc, ml-lex).
80       - ml-build.bat: analogous to ml-build.
81       - config\install.bat:  Analogous to config/install.sh.  This requires
82         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
83         (nmake etc. must be on the path, and vcvars32 must have been run.)
84         Moreover, sources for ml-lex and ml-yacc need to exist under src,
85         and the bootfile hierarchy must have been unpacked under
86         sml.boot.x86-win32.
87         The script is very primitive and does a poor job at error checking.
88         It only installs the base system, ml-lex, and ml-yacc.  No other
89         libraries are being installed (i.e., you get only those that
90         are part of the compiler.)
91       - link-sml.bat:  analogous to .link-sml, but not currently used
92    
93    Unrelated bug fixes:
94    
95      - ml-nlffigen now exports structures ST_* corresponding to incomplete
96        types.
97      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
98        otherwise.)
99    
100    ----------------------------------------------------------------------
101    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
102    Date: 2003/06/17
103    Tag: macqueen-20030617-bug895
104    Description:
105    
106    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
107    Tag will be used for new development branch (mcz-branch) for
108    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
109    
110    ----------------------------------------------------------------------
111    Name: Matthias Blume (blume@tti-c.org)
112    Date: 2003/05/27 16:55:00 CDT
113    Tag: blume-20030527-polyeq
114    Description:
115    
116    Tried to eliminated most cases of polymorphic equality.
117    
118    ----------------------------------------------------------------------
119    Name: Matthias Blume (blume@tti-c.org)
120    Date: 2003/05/21 17:45:00 CDT
121    Tag: blume-20030517-complete
122    Description:
123    
124    Two changes:
125    
126      1. Added a flag for controlling whether non-exhaustive bindings will
127         be treated as errors (default is false).
128      2. Cleaned up the *entire* source tree so that CMB.make goes through
129         without a single non-exhaustive match- or bind warning.
130    
131    ----------------------------------------------------------------------
132    Name: Matthias Blume (blume@tti-c.org)
133    Date: 2003/05/17 10:20:00 CDT
134    Tag: blume-20030517-absyn
135    Description:
136    
137    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
138    
139       This mainly affects the quality of error messages.  However, some
140       of the code is now more straightforward than before. (Treatment of
141       the above four constructs in translate.sml is much simpler than
142       the "macro-expansion" that was going on before.  Plus, the mach-
143       compiler no longer gets invoked just to be able to compile an
144       if-expression.)
145    
146    2. The ErrorMsg.Error exception is now caught and absorbed by the
147       interactive loop.
148    
149    ----------------------------------------------------------------------
150    Name: Allen Leung
151    Date: 2003/05/16 13:05:00 CDT
152    Tag: leunga-20030516-cygwin-runtime
153    Description:
154    
155        Ported the runtime system to cygwin, which uses the unix
156    x86-unix bin files.  Missing/buggy features:
157    
158       o getnetbyname, getnetbyaddr: these functions seem to be missing in
159         the Cygwin library.
160       o Ctrl-C handling may be flaky.
161       o Windows system calls and Windows I/O are not supported.
162    
163       A new set of binfiles is located at:
164    
165         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
166    
167       This is only needed for bootstrapping the cygwin version of smlnj.
168       Other x86 versions can use the existing binfiles.
169    
170    ----------------------------------------------------------------------
171    Name: Matthias Blume
172    Date: 2003/04/08 15:42:00 CDT
173    Tag: blume-20030408-listpair
174    Description:
175    
176    1. Added a target 'mlrisc' to installer.
177    
178    2. Added missing elements to structure ListPair.
179    
180    ----------------------------------------------------------------------
181    Name: Allen Leung
182    Date: 2003/01/07 10:40:00 EST
183    Tag: leunga-20030107-int-rem
184    Description:
185    
186    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
187    The arguments to the SUBL instruction were swapped.
188    
189    ----------------------------------------------------------------------
190    Name: Matthias Blume
191    Date: 2002/12/12 16:25:00 EST
192    Tag: blume-20021212-risc-ra
193    Description:
194    
195    Fixed a serious bug in the rewrite code for FP spilling/reloading that
196    sent the RA into an infinite loop when floating point registers get
197    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
198    110.37 and 110.38.)
199    There was another set of potential problems related to the handling of
200    MLRISC annotations (but those did not yet cause real problems, apparently).
201    
202    ----------------------------------------------------------------------
203    Name: Matthias Blume
204    Date: 2002/12/06 22:40:00 EST
205    Tag: blume-20021206-cm-fileid
206    Description:
207    
208    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
209    This fixes the problem of CM getting confused by files that suddenly
210    change their identity (e.g., by getting unlinked and recreated by some
211    text editor such as vi).  There might be a better/cheaper/cleaner way
212    of doing this, but for now this will have to do.
213    
214    ----------------------------------------------------------------------
215    Name: Matthias Blume
216    Date: 2002/10/28 09:50:00 EST
217    Tag: blume-20021028-typecheck
218    Description:
219    
220    Exported structure Typecheck from $smlnj/viscomp/core.cm.
221    
222    ----------------------------------------------------------------------
223    Name: Matthias Blume
224    Date: 2002/10/17 09:10:00 EDT
225    Tag: Release_110_42
226    Description:
227    
228    In good old tradition, there has been a slight hiccup so that we have
229    to patch 110.42 after the fact.   The old release tag has been replaced
230    (see below).
231    
232    The change solves a problem with two competing approaches the
233    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
234    each other's way.
235    
236    This change only affects the runtime system code and the installer script.
237    (No new bootfiles.)
238    
239    ----------------------------------------------------------------------
240    Name: Matthias Blume
241    Date: 2002/10/16 12:00:00 EDT
242    Tag: Release_110_42_removed
243    Description:
244    
245    New working release.  New bootfiles.
246    
247    ----------------------------------------------------------------------
248    Name: Matthias Blume
249    Date: 2002/10/10 13:10:00 EDT
250    Tag: blume-20021010-ppc-divs
251    Description:
252    
253    The mltree operator DIVS must be implemented with an overflow check on
254    the PPC because the hardware indicates divide-by-zero using "overflow" as
255    well.
256    
257    ----------------------------------------------------------------------
258    Name: Matthias Blume
259    Date: 2002/07/23 11:45:00
260    Tag: blume-20020723-smlnj-home
261    Description:
262    
263    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
264    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
265    CM_PATHCONFIG is also set), the path configuration file is assumed
266    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
267    the entire tree to some other place and everything will "just work".
268    
269    (Companion commands such as ml-build and ml-makedepend also sense this
270    variable.)
271    
272    ----------------------------------------------------------------------
273    Name: Matthias Blume
274    Date: 2002/07/12 21:19:00 EDT
275    Tag: blume-20020712-liveness
276    Description:
277    
278    Exported two useful "step" functions from liveness module (MLRISC).
279    
280    ----------------------------------------------------------------------
281    Name: Matthias Blume
282    Date: 2002/07/05 16:00 EDT
283    Tag: Release_110_41
284    Description:
285    
286    New working release.  New bootfiles.
287    
288    ----------------------------------------------------------------------
289    Name: Matthias Blume
290    Date: 2002/07/05 10:25:00 EDT
291    Tag: blume-20020705-btimp
292    Description:
293    
294    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
295    other clients can set up backtracing support.
296    
297    ----------------------------------------------------------------------
298    Name: Matthias Blume
299    Date: 2002/06/25 17:23:00 EDT
300    Tag: blume-20020625-fpmax
301    Description:
302    
303    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
304    case.  (The sense of the isNaN test was reversed -- which made min and
305    max always return their first argument.)
306    
307    ----------------------------------------------------------------------
308    Name: Matthias Blume
309    Date: 2002/06/11
310    Tag: blume-20020611-unixpath
311    Description:
312    
313    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
314    
315    ----------------------------------------------------------------------
316    Name: Matthias Blume
317    Date: 2002/06/10 16:35:00 EDT
318    Tag: blume-20020610-ieeereal
319    Description:
320    
321    I back-ported my implementation of IEEEReal.fromString from the
322    idlbasis-devel branch so that we can test it.
323    
324    Another small change is that ppDec tries to give more information
325    than just "<sig>" in the case of functors.  However, this code is
326    broken in some mysterious way if the functor's body's signature
327    has not been declared by ascription but gets inferred from the
328    implementation.  This needs fixing...
329    
330    ----------------------------------------------------------------------
331    Name: Matthias Blume
332    Date: 2002/05/31
333    Tag: blume-20020531-btrace-mode
334    Description:
335    
336    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
337    the wayside when I switched over to using Controls everywhere.)
338    
339    ----------------------------------------------------------------------
340    Name: Lal George
341    Date: 2002/05/23 12:21:40 EDT
342    Tag: george-20020523-visual-labels
343    Description:
344    
345    Labels are now displayed in the graphical output to make
346    the fall-through and target blocks obvious.
347    
348    ----------------------------------------------------------------------
349    Name: Matthias Blume
350    Date: 2002/05/22 11:03:00 EDT
351    Tag: blume-20020522-shrink
352    Description:
353    
354    John tweaked yesterday's fix for 1131 to handle an out-of-memory
355    situation that comes up when allocating huge arrays.
356    
357    ----------------------------------------------------------------------
358    Name: Matthias Blume
359    Date: 2002/05/21 16:00:00 EDT
360    Tag: Release_110_40
361    Description:
362    
363    New working release (110.40).  New bootfiles.
364    
365    [Also: John Reppy fixed GC bug 1131.]
366    
367    ----------------------------------------------------------------------
368    Name: Matthias Blume
369    Date: 2002/05/21 12:35:00 EDT
370    Tag: blume-20020521-cmdoc
371    Description:
372    
373    CM documentation update.
374    
375    ----------------------------------------------------------------------
376    Name: Matthias Blume
377    Date: 2002/05/21 10:55:00 EDT
378    Tag: blume-20020521-misc
379    Description:
380    
381    - John tweaked runtime to be silent on heap export (except when
382      GC messages are on).
383    - I added a few more things (cross-compiling versions of CMB) to
384      config/preloads (as suggestions).
385    
386    ----------------------------------------------------------------------
387    Name: Matthias Blume
388    Date: 2002/05/20 22:25:00 EDT
389    Tag: blume-20020520-controls
390    Description:
391    
392    - Added ControlUtil structure to control-lib.cm.
393    - Use it throughout.
394    - Used Controls facility to define MLRISC controls (as opposed to
395      registering MLRISC control ref cells with Controls after the fact)
396    - Fixed messed-up controls priorities.
397    
398    * Removed again all the stuff from config/preloads that one wouldn't
399      be able to preload at the time the initial heap image is built.
400      (Many libraries, e.g., CML, do not exist yet at this time.  The
401       only libraries that can be preloaded via config/preloads are those
402       that come bundled with the bootfiles.)
403    
404    ----------------------------------------------------------------------
405    Name: Matthias Blume
406    Date: 2002/05/20 10:59:00 EDT
407    Tag: blume-20020520-preloads
408    Description:
409    
410    Added a lot of commented-out suggestions for things to be included
411    in config/preloads.
412    
413    ----------------------------------------------------------------------
414    Name: Allen Leung
415    Date: 2002/05/18 14:20:00 EDT
416    Tag: leunga-20020518-mdl
417    Description:
418    
419    o Made the mdl tool stuff compile and run again.
420    o I've disabled all the stuff that depends on RTL specifications; they
421      are all badly broken anyway.
422    
423    ----------------------------------------------------------------------
424    Name: Matthias Blume
425    Date: 2002/05/17 16:49:00 EDT
426    Tag: blume-20020517-controls
427    Description:
428    
429    0. John Reppy made several modifications to the SML/NJ library.
430       In particular, there is a shiny new controls-lib.cm.
431    
432    1. Pushed new controls interface through compiler so that everything
433       compiles again.
434    
435    2. Added FormatComb and FORMAT_COMB to the CML version of the
436       SML/NJ library (so that CML compiles again).
437    
438    3. Modified init scripts because XXX_DEFAULT environment variables
439       are no longer with us.  (Boot-time initialization is now done
440       using the same environment variables that are also used for
441       startup-time initialization of controls.)
442    
443    ----------------------------------------------------------------------
444    Name: Lal George
445    Date: 2002/05/15 09:20:10 EDT
446    Tag: george-20020515-pseudo-op-decls
447    Description:
448    
449            All pseudo-ops emitted before the first segment declaration
450    such as TEXT, DATA, and BSS directives are assumed to be global
451    declarations and are emitted first in the assembly file. This is
452    useful in a number of situations where one has pseudo-ops that are not
453    specific to any segment, and also works around the constraint that one
454    cannot have client pseudo-ops in the TEXT segment.
455    
456            Because no segment is associated with these declarations it is
457    an error to allocate any space or objects before the first segment
458    directive and an exception will be raised. However, we cannot make
459    this check for client pseudo-ops.
460    
461            These top level declarations are a field in the CFG graph_info.
462    In theory you can continue to add to this field after the CFG has been
463    built -- provided you know what you are doing;-)
464    
465    ----------------------------------------------------------------------
466    Name: Matthias Blume
467    Date: 2002/05/13 16:40:00 EDT
468    Tag: blume-20020513-pp-etc
469    Description:
470    
471    A few minor bugfixes:
472    
473      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
474        (Bogus printouts for redefined bindings still occur.  Compiler
475        bug should no longer occur now.  We need to redo the prettyprinter
476        from scratch.)
477    
478      - CM pathname printer now also adds escape sequences for ( and )
479    
480      - commend and docu fixes for ml-nlffi
481    
482    ----------------------------------------------------------------------
483    Name: Matthias Blume
484    Date: 2002/05/10 16:40:00 EDT
485    Tag: blume-20020510-erg-textio
486    Description:
487    
488    Applied the following bugfix provided by Emden Gansner:
489    
490        Output is corrupted when outputSubstr is used rather than output.
491    
492        The problem occurs when a substring
493    
494            ss = (s, dataStart, dataLen)
495    
496        where dataStart > 0, fills a stream buffer with avail bytes left.
497        avail bytes of s, starting at index dataStart, are copied into the
498        buffer, the buffer is flushed, and then the remaining dataLen-avail
499        bytes of ss are copied into the beginning of the buffer. Instead of
500        starting this copy at index dataStart+avail in s, the current code
501        starts the copy at index avail.
502    
503        Fix:
504        In text-io-fn.sml, change line 695 from
505             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
506        to
507             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
508    
509    ----------------------------------------------------------------------
510    Name: Matthias Blume
511    Date: 2002/04/12 13:55:00 EDT
512    Tag: blume-20020412-assyntax
513    Description:
514    
515    1. Grabbed newer assyntax.h from the XFree86 project.
516    2. Fiddled with how to compile X86.prim.asm without warnings.
517    3. (Very) Minor cleanup in CM.
518    
519    ----------------------------------------------------------------------
520    Name: Matthias Blume
521    Date: 2002/04/01 (no joke!) 17:07:00 EST
522    Tag: blume-20020401-x86div
523    Description:
524    
525    Added full support for div/mod/rem/quot on the x86, using the machine
526    instruction's two results (without clumsily recomputing the remainder)
527    directly where appropriate.
528    
529    Some more extensive power-of-two support was added to the x86 instruction
530    selector (avoiding expensive divs, mods, and muls where they can be
531    replaced with cheaper shifts and masks).  However, this sort of thing
532    ought to be done earlier, e.g., within the CPS optimizer so that
533    all architectures benefit from it.
534    
535    The compiler compiles to a fixed point, but changes might be somewhat
536    fragile nevertheless.  Please, report any strange things that you might
537    see wrt. div/mod/quot/rem...
538    
539    ----------------------------------------------------------------------
540    Name: Matthias Blume
541    Date: 2002/03/29 17:22:00
542    Tag: blume-20020329-div
543    Description:
544    
545    Fixed my broken div/mod logic.  Unfortunately, this means that the
546    inline code for div/mod now has one more comparison than before.
547    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
548    The problem was with quotient = 0, because that alone does not tell
549    us which way the rounding went.  One then has to look at whether
550    remainder and divisor have the same sign...  :(
551    
552    Anyway, I replaced the bootfiles with fresh ones...
553    
554    ----------------------------------------------------------------------
555    Name: Matthias Blume
556    Date: 2002/03/29 14:10:00 EST
557    Tag: blume-20020329-inlprims
558    Description:
559    
560    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
561    
562    Primops have changed. This means that the bin/boot-file formats have
563    changed as well.
564    
565    To make sure that there is no confusion, I made a new version.
566    
567    
568    CHANGES:
569    
570    * removed REMT from mltree (remainder should never overflow).
571    
572    * added primops to deal with divisions of all flavors to the frontend
573    
574    * handled these primops all the way through so they map to their respective
575      MLRISC support
576    
577    * used these primops in the implementation of Int, Int32, Word, Word32
578    
579    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
580    
581    * parameterized INLMIN, INLMAX, and INLABS by a numkind
582    
583    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
584      floating point
585    
586    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
587      and Real (but Real.abs maps to a separate floating-point-only primop)
588    
589    
590    TODO items:
591    
592    * Hacked Alpha32 instruction selection, disabling the selection of REMx
593      instructions because the machine instruction encoder cannot handle
594      them.  (Hppa, PPC, and Sparc instruction selection did not handle
595      REM in the first place, and REM is supported by the x86 machine coder.)
596    
597    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
598      selection phase.  (The two can be streamlined because the hardware
599      delivers both quotient and remainder at the same time anyway.)
600    
601    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
602      (Currently the behavior is inconsistent both across architectures and
603      wrt. the draft Basis spec.)
604    
605    * Word8 should eventually be handled natively, too.
606    
607    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
608      as if there currently is no execution path that could trigger it in
609      SML/NJ.  (The assumptions underlying functions arith and promotable do not
610      hold for things like multiplication and division.)
611    
612    ----------------------------------------------------------------------
613    Name: Matthias Blume
614    Date: 2002/03/27 16:27:00 EST
615    Tag: blume-20020327-mlrisc-divisions
616    Description:
617    
618    Added support for all four division operations (ML's div, mod, quot,
619    and rem) to MLRISC.  In the course of doing so, I also rationalized
620    the naming (no more annoying switch-around of DIV and QUOT), by
621    parameterizing the operation by div_rounding_mode (which can be either
622    DIV_TO_ZERO or DIV_TO_NEGINF).
623    
624    The generic MLTreeGen functor takes care of compiling all four
625    operations down to only round-to-zero div.
626    
627    Missing pieces:
628    
629      * Doing something smarter than relying on MLTreeGen on architectures
630        like, e.g., the x86 where hardware division delivers both quotient and
631        remainder at the same time.  With this, the implementation of the
632        round-to-neginf operations could be further streamlined.
633    
634      * Remove inlining support for div/mod/rem from the frontend and replace it
635        with primops that get carried through to the backend.  Do this for all
636        int and word types.
637    
638    ----------------------------------------------------------------------
639    Name: Matthias Blume
640    Date: 2002/03/25 17:25:00 EST
641    Tag: blume-20020325-divmod
642    Description:
643    
644    I improved (hopefully without breaking them) the implementation of Int.div,
645    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
646    advantage of the following observations:
647    
648      Let  q = x quot y      r = x rem y
649           d = x div  y      m = x mod y
650    
651    where "quot" is the round-to-zero version of integer division that
652    hardware usually provides.  Then we have:
653    
654         r = x - q * y        where neither the * nor the - will overflow
655         d = if q >= 0 orelse x = q * y then q else q - 1
656                              where neither the * nor the - will overflow
657         m = if q >= 0 orelse r = 0 then r else r + y
658                              where the + will not overflow
659    
660    This results in substantial simplification of the generated code.
661    The following table shows the number of CFG nodes and edges generated
662    for
663            fun f (x, y) = x OPER y
664            (* with OPER \in div, mod, quot, rem *)
665    
666    
667        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
668        --------------------------------------------------------
669         div |         24 |         39 |         12 |         16
670         mod |         41 |         71 |         12 |         16
671        quot |          8 |         10 |          8 |         10
672         rem |         10 |         14 |          8 |         10
673    
674    
675    ----------------------------------------------------------------------
676    Name: Matthias Blume
677    Date: 2002/03/25 22:06:00 EST
678    Tag: blume-20020325-cprotobug
679    Description:
680    
681    Fixed a bug in cproto (c prototype decoder).
682    
683    ----------------------------------------------------------------------
684    Name: Matthias Blume
685    Date: 2002/03/25 16:00:00 EST
686    Tag: blume-20020325-raw-primops
687    Description:
688    
689    I did some cleanup to Allen's new primop code and
690    replaced yesterday's bootfiles with new ones.
691    (But they are stored in the same place.)
692    
693    ----------------------------------------------------------------------
694    Name: Matthias Blume
695    Date: 2002/03/24 22:40:00 EST
696    Tag: blume-20020324-bootfiles
697    Description:
698    
699    Made the bootfiles that Allen asked for.
700    
701    ----------------------------------------------------------------------
702    Name: Allen Leung
703    Date: 2002/03/23 15:50:00 EST
704    Tag: leunga-20020323-flint-cps-rcc-primops
705    Description:
706    
707      1. Changes to FLINT primops:
708    
709        (* make a call to a C-function;
710         * The primop carries C function prototype information and specifies
711         * which of its (ML-) arguments are floating point. C prototype
712         * information is for use by the backend, ML information is for
713         * use by the CPS converter. *)
714      | RAW_CCALL of { c_proto: CTypes.c_proto,
715                       ml_args: ccall_type list,
716                       ml_res_opt: ccall_type option,
717                       reentrant : bool
718                     } option
719       (* Allocate uninitialized storage on the heap.
720        * The record is meant to hold short-lived C objects, i.e., they
721        * are not ML pointers.  With the tag, the representation is
722        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
723        *)
724      | RAW_RECORD of {tag:bool,sz:int}
725      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
726    
727      2.  These CPS primops are now overloaded:
728    
729           rawload of {kind:numkind}
730           rawstore of {kind:numkind}
731    
732          The one argument form is:
733    
734             rawload {kind} address
735    
736          The two argument form is:
737    
738             rawload {kind} [ml object, byte-offset]
739    
740      3. RAW_CCALL/RCC now takes two extra arguments:
741    
742         a. The first is whether the C call is reentrant, i.e., whether
743            ML state should be saved and restored.
744         b. The second argument is a string argument specifying the name of
745            library and the C function.
746    
747         These things are currently not handled in the code generator, yet.
748    
749      4. In CProto,
750    
751         An encoding type of "bool" means "ml object" and is mapped into
752         C prototype of PTR.  Note that "bool" is different than "string",
753         even though "string" is also mapped into PTR, because "bool"
754         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
755    
756      5. Pickler/unpicker
757    
758         Changed to handle RAW_RECORD and newest RAW_CCALL
759    
760      6. MLRiscGen,
761    
762         1. Changed to handle the new rawload/rawstore/rawrecord operators.
763         2. Code for handling C Calls has been moved to a new module CPSCCalls,
764            in the file CodeGen/cpscompile/cps-c-calls.sml
765    
766      7. Added the conditional move operator
767    
768             condmove of branch
769    
770         to cps.  Generation of this is still buggy so it is currently
771         disabled.
772    
773    ----------------------------------------------------------------------
774    Name: Lal George
775    Date: 2002/03/22 14:18:25 EST
776    Tag: george-20020322-cps-branch-prob
777    Description:
778    
779    Implemented the Ball-Larus branch prediction-heuristics, and
780    incorporated graphical viewers for control flow graphs.
781    
782    Ball-Larus Heuristics:
783    ---------------------
784    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
785    
786    By design it uses the Dempster-Shafer theory for combining
787    probabilities.  For example, in the function:
788    
789        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
790    
791    the ball-larus heuristics predicts that the n=0 is unlikely
792    (OH-heuristic), and the 'then' branch is unlikely because of the
793    RH-heuristic -- giving the 'then' branch an even lower combined
794    probability using the Dempster-Shafer theory.
795    
796    Finally, John Reppy's loop analysis in MLRISC, further lowers the
797    probability of the 'then' branch because of the loop in the else
798    branch.
799    
800    
801    Graphical Viewing:
802    ------------------
803    I merely plugged in Allen's graphical viewers into the compiler. The
804    additional code is not much. At the top level, saying:
805    
806            Control.MLRISC.getFlag "cfg-graphical-view" := true;
807    
808    will display the graphical view of the control flow graph just before
809    back-patching.  daVinci must be in your path for this to work. If
810    daVinci is not available, then the default viewer can be changed
811    using:
812    
813            Control.MLRISC.getString "viewer"
814    
815    which can be set to "dot" or "vcg" for the corresponding viewers. Of
816    course, these viewers must be in your path.
817    
818    The above will display the compilation unit at the level of clusters,
819    many of which are small, boring, and un-interesting. Also setting:
820    
821            Control.MLRISC.getInt "cfg-graphical-view_size"
822    
823    will display clusters that are larger than the value set by the above.
824    
825    
826    ----------------------------------------------------------------------
827    Name: Matthias Blume
828    Date: 2002/03/21 22:20:00 EST
829    Tag: blume-20020321-kmp-bugfix
830    Description:
831    
832    Changed the interface to the KMP routine in PreString and fixed
833    a minor bug in one place where it was used.
834    
835    ----------------------------------------------------------------------
836    Name: Allen Leung
837    Date: 2002/03/21 20:30:00 EST
838    Tag: leunga-20020321-cfg
839    Description:
840    
841      Fixed a potential problem in cfg edge splitting.
842    
843    ----------------------------------------------------------------------
844    Name: Allen Leung
845    Date: 2002/03/21 17:15:00 EST
846    Tag: leunga-20020321-x86-fp-cfg
847    Description:
848    
849      1. Recoded the buggy parts of x86-fp.
850    
851         a. All the block reordering code has been removed.
852            We now depend on the block placement phases to do this work.
853    
854         b. Critical edge splitting code has been simplified and moved into the
855            CFG modules, as where they belong.
856    
857         Both of these were quite buggy and complex.  The code is now much, much
858         simpler.
859    
860      2. X86 backend.
861    
862         a. Added instructions for 64-bit support.  Instruction selection for
863            64-bit has not been committed, however, since that
864            requires changes to MLTREE which haven't been approved by
865            Lal and John.
866    
867         b. Added support for FUCOMI and FUCOMIP when generating code for
868            PentiumPro and above.  We only generate these instructions in
869            the fast-fp mode.
870    
871         c. Added cases for JP and JNP in X86FreqProps.
872    
873      3. CFG
874    
875         CFG now has a bunch of methods for edge splitting and merging.
876    
877      4. Machine description.
878    
879         John's simplification of MLTREE_BASIS.fcond broke a few machine
880         description things:
881    
882         rtl-build.{sig,sml} and hppa.mdl fixed.
883    
884         NOTE: the machine description stuff in the repository is still broken.
885               Again, I can't put my fixes in because that involves
886               changes to MLTREE.
887    
888    ----------------------------------------------------------------------
889    Name: Matthias Blume
890    Date: 2002/03/20 15:55:00 EST
891    Tag: blume-20020320-kmp
892    Description:
893    
894    Implemented Knuth-Morris-Pratt string matching in PreString and used
895    it for String.isSubstring, Substring.isSubstring, and
896    Substring.position.
897    
898    (Might need some stress-testing.  Simple examples worked fine.)
899    
900    ----------------------------------------------------------------------
901    Name: Matthias Blume
902    Date: 2002/03/19 16:37:00 EST
903    Tag: blume-20020319-witnesses
904    Description:
905    
906    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
907    
908    This implements a generic mechanism for changing constness qualifiers
909    anywhere within big C types without resorting to outright "casts".
910    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
911    modify the constness at the outermost level.)
912    The implementation of "convert" is based on the idea of "witness"
913    values -- values that are not used by the operation but whose types
914    "testify" to their applicability.  On the implementation side, "convert"
915    is simply a projection (returning its second curried argument).  With
916    cross-module inlining, it should not result in any machine code being
917    generated.
918    
919    ----------------------------------------------------------------------
920    Name: Matthias Blume
921    Date: 2002/03/15 16:40:00 EST
922    Tag: blume-20020315-basis
923    Description:
924    
925    Provided (preliminary?) implementations for
926    
927      {String,Substring}.{concatWith,isSuffix,isSubstring}
928    
929    and
930    
931      Substring.full
932    
933    Those are in the Basis spec but they were missing in SML/NJ.
934    
935    ----------------------------------------------------------------------
936    Name: Matthias Blume
937    Date: 2002/03/14 21:30:00 EST
938    Tag: blume-20020314-controls
939    Description:
940    
941    Controls:
942    ---------
943    
944    1. Factored out the recently-added Controls : CONTROLS stuff and put
945       it into its own library $/controls-lib.cm.  The source tree for
946       this is under src/smlnj-lib/Controls.
947    
948    2. Changed the names of types and functions in this interface, so they
949       make a bit more "sense":
950    
951          module -> registry
952          'a registry -> 'a group
953    
954    3. The interface now deals in ref cells only.  The getter/setter interface
955       is (mostly) gone.
956    
957    4. Added a function that lets one register an already-existing ref cell.
958    
959    5. Made the corresponding modifications to the rest of the code so that
960       everything compiles again.
961    
962    6. Changed the implementation of Controls.MLRISC back to something closer
963       to the original.  In particular, this module (and therefore MLRISC)
964       does not depend on Controls.  There now is some link-time code in
965       int-sys.sml that registers the MLRISC controls with the Controls
966       module.
967    
968    CM:
969    ---
970    
971      * One can now specify the lambda-split aggressiveness in init.cmi.
972    
973    ----------------------------------------------------------------------
974    Name: Allen Leung
975    Date: 2002/03/13 17:30:00 EST
976    Tag: leunga-20020313-x86-fp-unary
977    Description:
978    
979    Bug fix for:
980    
981    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
982    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
983    > - fun f(x,(y,z)) = Real.~ y;
984    > [autoloading]
985    > [autoloading done]
986    >       fchsl   (%eax), 184(%esp)
987    > Error: MLRisc bug: X86MCEmitter.emitInstr
988    >
989    > uncaught exception Error
990    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
991    
992    The problem was that the code generator did not generate any fp registers
993    in this case, and the ra didn't know that it needed to run the X86FP phase to
994    translate the pseudo fp instruction.   This only happened with unary fp
995    operators in certain situations.
996    
997    ----------------------------------------------------------------------
998    Name: Matthias Blume
999    Date: 2002/03/13 14:00:00 EST
1000    Tag: blume-20020313-overload-etc
1001    Description:
1002    
1003    1. Added _overload as a synonym for overload for backward compatibility.
1004       (Control.overloadKW must be true for either version to be accepted.)
1005    
1006    2. Fixed bug in install script that caused more things to be installed
1007       than what was requested in config/targets.
1008    
1009    3. Made CM aware of the (_)overload construct so that autoloading
1010       works.
1011    
1012    ----------------------------------------------------------------------
1013    Name: Matthias Blume
1014    Date: 2002/03/12 22:03:00 EST
1015    Tag: blume-20020312-url
1016    Description:
1017    
1018    Forgot to update BOOT and srcarchiveurl.
1019    
1020    ----------------------------------------------------------------------
1021    Name: Matthias Blume
1022    Date: 2002/03/12 17:30:00 EST
1023    Tag: blume-20020312-version110392
1024    Description:
1025    
1026    Yet another version number bump (because of small changes to the
1027    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
1028    
1029    Changes:
1030    
1031      The new pid generation scheme described a few weeks ago was overly
1032      complicated.  I implemented a new mechanism that is simpler and
1033      provides a bit more "stability":  Once CM has seen a compilation
1034      unit, it keeps its identity constant (as long as you do not delete
1035      those crucial CM/GUID/* files).  This means that when you change
1036      an interface, compile, then go back to the old interface, and
1037      compile again, you arrive at the original pid.
1038    
1039      There now also is a mechanism that instructs CM to use the plain
1040      environment hash as a module's pid (effectively making its GUID
1041      the empty string).  For this, "noguid" must be specified as an
1042      option to the .sml file in question within its .cm file.
1043      This is most useful for code that is being generated by tools such
1044      as ml-nlffigen (because during development programmers tend to
1045      erase the tool's entire output directory tree including CM's cached
1046      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
1047      revert to the old, broken behavior of SML/NJ, but in specific cases
1048      where there is no danger of interface confusion, its use is ok
1049      (I think).
1050    
1051      ml-nlffigen by default generates "noguid" annotations.  They can be
1052      turned off by specifying -guid in its command line.
1053    
1054    ----------------------------------------------------------------------
1055    Name: Lal George
1056    Date: 2002/03/12 12 14:42:36 EST
1057    Tag: george-20020312-frequency-computation
1058    Description:
1059    
1060    Integrated jump chaining and static block frequency into the
1061    compiler. More details and numbers later.
1062    
1063    ----------------------------------------------------------------------
1064    Name: Lal George
1065    Date: 2002/03/11 11 22:38:53 EST
1066    Tag: george-20020311-jump-chain-elim
1067    Description:
1068    
1069    Tested the jump chain elimination on all architectures (except the
1070    hppa).  This is on by default right now and is profitable for the
1071    alpha and x86, however, it may not be profitable for the sparc and ppc
1072    when compiling the compiler.
1073    
1074    The gc test will typically jump to a label at the end of the cluster,
1075    where there is another jump to an external cluster containing the actual
1076    code to invoke gc. This is to allow factoring of common gc invocation
1077    sequences. That is to say, we generate:
1078    
1079            f:
1080               testgc
1081               ja   L1      % jump if above to L1
1082    
1083            L1:
1084               jmp L2
1085    
1086    
1087    After jump chain elimination the 'ja L1' instructions is converted to
1088    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
1089    up being implemented in their long form (if L2 is far away) using:
1090    
1091            jbe     L3      % jump if below or equal to L3
1092            jmp     L2
1093         L3:
1094            ...
1095    
1096    
1097    For large compilation units L2  may be far away.
1098    
1099    
1100    ----------------------------------------------------------------------
1101    Name: Matthias Blume
1102    Date: 2002/03/11 13:30:00 EST
1103    Tag: blume-20020311-mltreeeval
1104    Description:
1105    
1106    A functor parameter was missing.
1107    
1108    ----------------------------------------------------------------------
1109    Name: Allen Leung
1110    Date: 2002/03/11 10:30:00 EST
1111    Tag: leunga-20020311-runtime-string0
1112    Description:
1113    
1114       The representation of the empty string now points to a
1115    legal null terminated C string instead of unit.  It is now possible
1116    to convert an ML string into C string with InlineT.CharVector.getData.
1117    This compiles into one single machine instruction.
1118    
1119    ----------------------------------------------------------------------
1120    Name: Allen Leung
1121    Date: 2002/03/10 23:55:00 EST
1122    Tag: leunga-20020310-x86-call
1123    Description:
1124    
1125       Added machine generation for CALL instruction (relative displacement mode)
1126    
1127    ----------------------------------------------------------------------
1128    Name: Matthias Blume
1129    Date: 2002/03/08 16:05:00
1130    Tag: blume-20020308-entrypoints
1131    Description:
1132    
1133    Version number bumped to 110.39.1.  NEW BOOTFILES!
1134    
1135    Entrypoints: non-zero offset into a code object where execution should begin.
1136    
1137    - Added the notion of an entrypoint to CodeObj.
1138    - Added reading/writing of entrypoint info to Binfile.
1139    - Made runtime system bootloader aware of entrypoints.
1140    - Use the address of the label of the first function given to mlriscGen
1141      as the entrypoint.  This address is currently always 0, but it will
1142      not be 0 once we turn on block placement.
1143    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
1144      with entry points) from mlriscGen.
1145    
1146    ----------------------------------------------------------------------
1147    Name: Allen Leung
1148    Date: 2002/03/07 20:45:00 EST
1149    Tag: leunga-20020307-x86-cmov
1150    Description:
1151    
1152       Bug fixes for CMOVcc on x86.
1153    
1154       1. Added machine code generation for CMOVcc
1155       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
1156       3. CMOVcc cannot have an immediate operand as argument.
1157    
1158    ----------------------------------------------------------------------
1159    Name: Matthias Blume
1160    Date: 2002/03/07 16:15:00 EST
1161    Tag: blume-20020307-controls
1162    Description:
1163    
1164    This is a very large but mostly boring patch which makes (almost)
1165    every tuneable compiler knob (i.e., pretty much everything under
1166    Control.* plus a few other things) configurable via both the command
1167    line and environment variables in the style CM did its configuration
1168    until now.
1169    
1170    Try starting sml with '-h' (or, if you are brave, '-H')
1171    
1172    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
1173    implements the underlying generic mechanism.
1174    
1175    The interface to some of the existing such facilities has changed somewhat.
1176    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
1177    (The getFoo interface is still there for backward-compatibility, but its
1178    use is deprecated.)
1179    
1180    The ml-build script passes -Cxxx=yyy command-line arguments through so
1181    that one can now twiddle the compiler settings when using this "batch"
1182    compiler.
1183    
1184    TODO items:
1185    
1186    We should go through and throw out all controls that are no longer
1187    connected to anything.  Moreover, we should go through and provide
1188    meaningful (and correct!) documentation strings for those controls
1189    that still are connected.
1190    
1191    Currently, multiple calls to Controls.new are accepted (only the first
1192    has any effect).  Eventually we should make sure that every control
1193    is being made (via Controls.new) exactly once.  Future access can then
1194    be done using Controls.acc.
1195    
1196    Finally, it would probably be a good idea to use the getter-setter
1197    interface to controls rather than ref cells.  For the time being, both
1198    styles are provided by the Controls module, but getter-setter pairs are
1199    better if thread-safety is of any concern because they can be wrapped.
1200    
1201    *****************************************
1202    
1203    One bug fix: The function blockPlacement in three of the MLRISC
1204    backpatch files used to be hard-wired to one of two possibilities at
1205    link time (according to the value of the placementFlag).  But (I
1206    think) it should rather sense the flag every time.
1207    
1208    *****************************************
1209    
1210    Other assorted changes (by other people who did not supply a HISTORY entry):
1211    
1212    1. the cross-module inliner now works much better (Monnier)
1213    2. representation of weights, frequencies, and probabilities in MLRISC
1214       changed in preparation of using those for weighted block placement
1215       (Reppy, George)
1216    
1217    ----------------------------------------------------------------------
1218    Name: Lal George
1219    Date: 2002/03/07 14:44:24 EST 2002
1220    Tag: george-20020307-weighted-block-placement
1221    
1222    Tested the weighted block placement optimization on all architectures
1223    (except the hppa) using AMPL to generate the block and edge frequencies.
1224    Changes were required in the machine properties to correctly
1225    categorize trap instructions. There is an MLRISC flag
1226    "weighted-block-placement" that can be used to enable weighted block
1227    placement, but this will be ineffective without block/edge
1228    frequencies (coming soon).
1229    
1230    
1231    ----------------------------------------------------------------------
1232    Name: Lal George
1233    Date: 2002/03/05 17:24:48 EST
1234    Tag: george-20020305-linkage-cluster
1235    
1236    In order to support the block placement optimization, a new cluster
1237    is generated as the very first cluster (called the linkage cluster).
1238    It contains a single jump to the 'real' entry point for the compilation
1239    unit. Block placement has no effect on the linkage cluster itself, but
1240    all the other clusters  have full freedom in the manner in which they
1241    reorder blocks or functions.
1242    
1243    On the x86 the typical linkage code that is generated is:
1244       ----------------------
1245            .align 2
1246       L0:
1247            addl    $L1-L0, 72(%esp)
1248            jmp     L1
1249    
1250    
1251            .align  2
1252       L1:
1253       ----------------------
1254    
1255    72(%esp) is the memory location for the stdlink register. This
1256    must contain the address of the CPS function being called. In the
1257    above example, it contains the address of  L0; before
1258    calling L1 (the real entry point for the compilation unit), it
1259    must contain the address for L1, and hence
1260    
1261            addl $L1-L0, 72(%esp)
1262    
1263    I have tested this on all architectures except the hppa.The increase
1264    in code size is of course negligible
1265    
1266    ----------------------------------------------------------------------
1267    Name: Allen Leung
1268    Date: 2002/03/03 13:20:00 EST
1269    Tag: leunga-20020303-mlrisc-tools
1270    
1271      Added #[ ... ] expressions to mlrisc tools
1272    
1273    ----------------------------------------------------------------------
1274    Name: Matthias Blume
1275    Date: 2002/02/27 12:29:00 EST
1276    Tag: blume-20020227-cdebug
1277    Description:
1278    
1279    - made types in structure C and C_Debug to be equal
1280    - got rid of code duplication (c-int.sml vs. c-int-debug.sml)
1281    - there no longer is a C_Int_Debug (C_Debug is directly derived from C)
1282    
1283    ----------------------------------------------------------------------
1284    Name: Matthias Blume
1285    Date: 2002/02/26 12:00:00 EST
1286    Tag: blume-20020226-ffi
1287    Description:
1288    
1289    1. Fixed a minor bug in CM's "noweb" tool:
1290       If numbering is turned off, then truly don't number (i.e., do not
1291       supply the -L option to noweb).  The previous behavior was to supply
1292       -L'' -- which caused noweb to use the "default" line numbering scheme.
1293       Thanks to Chris Richards for pointing this out (and supplying the fix).
1294    
1295    2. Once again, I reworked some aspects of the FFI:
1296    
1297       A. The incomplete/complete type business:
1298    
1299       - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are
1300         gone!
1301       - ML types representing an incomplete type are now *equal* to
1302         ML types representing their corresponding complete types (just like
1303         in C).  This is still safe because ml-nlffigen will not generate
1304         RTTI for incomplete types, nor will it generate functions that
1305         require access to such RTTI.   But when ML code generated from both
1306         incomplete and complete versions of the C type meet, the ML types
1307         are trivially interoperable.
1308    
1309         NOTE:  These changes restore the full generality of the translation
1310         (which was previously lost when I eliminated functorization)!
1311    
1312       B. Enum types:
1313    
1314       - Structure C now has a type constructor "enum" that is similar to
1315         how the "su" constructor works.  However, "enum" is not a phantom
1316         type because each "T enum" has values (and is isomorphic to
1317         MLRep.Signed.int).
1318       - There are generic access operations for enum objects (using
1319         MLRep.Signed.int).
1320       - ml-nlffigen will generate a structure E_foo for each "enum foo".
1321         * The structure contains the definition of type "mlrep" (the ML-side
1322         representation type of the enum).  Normally, mlrep is the same
1323         as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec",
1324         then mlrep will be defined as a datatype -- thus facilitating
1325         pattern matching on mlrep values.
1326         ("-ec" will be suppressed if there are duplicate values in an
1327          enumeration.)
1328         * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep
1329         will be generated for each C enum constant xxx.
1330         * Conversion functions m2i and i2m convert between mlrep and
1331         MLRep.Signed.int.  (Without "-ec", these functions are identities.)
1332         * Coversion functions c and ml convert between mlrep and "tag enum".
1333         * Access functions (get/set) fetch and store mlrep values.
1334       - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed
1335         enumerations are merged into one single enumeration represented by
1336         structure E_'.
1337    
1338    ----------------------------------------------------------------------
1339    Name: Allen Leung
1340    Date: 2002/02/25 04:45:00 EST
1341    Tag: leunga-20020225-cps-spill
1342    
1343    This is a new implementation of the CPS spill phase.
1344    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
1345    In case of problems, replace it with the old file spill.sml
1346    
1347    The current compiler runs into some serious performance problems when
1348    constructing a large record.  This can happen when we try to compile a
1349    structure with many items.  Even a very simple structure like the following
1350    makes the compiler slow down.
1351    
1352        structure Foo = struct
1353           val x_1 = 0w1 : Word32.int
1354           val x_2 = 0w2 : Word32.int
1355           val x_3 = 0w3 : Word32.int
1356           ...
1357           val x_N = 0wN : Word32.int
1358        end
1359    
1360    The following table shows the compile time, from N=1000 to N=4000,
1361    with the old compiler:
1362    
1363    N
1364    1000   CPS 100 spill                           0.04u  0.00s  0.00g
1365           MLRISC ra                               0.06u  0.00s  0.05g
1366              (spills = 0 reloads = 0)
1367           TOTAL                                   0.63u  0.07s  0.21g
1368    
1369    1100   CPS 100 spill                           8.25u  0.32s  0.64g
1370           MLRISC ra                               5.68u  0.59s  3.93g
1371              (spills = 0 reloads = 0)
1372           TOTAL                                   14.71u  0.99s  4.81g
1373    
1374    1500   CPS 100 spill                           58.55u  2.34s  1.74g
1375           MLRISC ra                               5.54u  0.65s  3.91g
1376              (spills = 543 reloads = 1082)
1377           TOTAL                                   65.40u  3.13s  6.00g
1378    
1379    2000   CPS 100 spill                           126.69u  4.84s  3.08g
1380           MLRISC ra                               0.80u  0.10s  0.55g
1381              (spills = 42 reloads = 84)
1382           TOTAL                                   129.42u  5.10s  4.13g
1383    
1384    3000   CPS 100 spill                           675.59u  19.03s  11.64g
1385           MLRISC ra                               2.69u  0.27s  1.38g
1386              (spills = 62 reloads = 124)
1387           TOTAL                                   682.48u  19.61s  13.99g
1388    
1389    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
1390           MLRISC ra                               4.96u  0.27s  2.72g
1391              (spills = 85 reloads = 170)
1392           TOTAL                                   2375.26u  57.21s  48.00g
1393    
1394    As you can see the old cps spill module suffers from some serious
1395    performance problem.  But since I cannot decipher the old code fully,
1396    instead of patching the problems up, I'm reimplementing it
1397    with a different algorithm.  The new code is more modular,
1398    smaller when compiled, and substantially faster
1399    (O(n log n) time and O(n) space).  Timing of the new spill module:
1400    
1401    4000  CPS 100 spill                           0.02u  0.00s  0.00g
1402          MLRISC ra                               0.25u  0.02s  0.15g
1403             (spills=1 reloads=3)
1404          TOTAL                                   7.74u  0.34s  1.62g
1405    
1406    Implementation details:
1407    
1408    As far as I can tell, the purpose of the CPS spill module is to make sure the
1409    number of live variables at any program point (the bandwidth)
1410    does not exceed a certain limit, which is determined by the
1411    size of the spill area.
1412    
1413    When the bandwidth is too large, we decrease the register pressure by
1414    packing live variables into spill records.  How we achieve this is
1415    completely different than what we did in the old code.
1416    
1417    First, there is something about the MLRiscGen code generator
1418    that we should be aware of:
1419    
1420    o MLRiscGen performs code motion!
1421    
1422       In particular, it will move floating point computations and
1423       address computations involving only the heap pointer to
1424       their use sites (if there is only a single use).
1425       What this means is that if we have a CPS record construction
1426       statement
1427    
1428           RECORD(k,vl,w,e)
1429    
1430       we should never count the new record address w as live if w
1431       has only one use (which is often the case).
1432    
1433       We should do something similar to floating point, but the transformation
1434       there is much more complex, so I won't deal with that.
1435    
1436    Secondly, there are now two new cps primops at our disposal:
1437    
1438     1. rawrecord of record_kind option
1439        This pure operator allocates some uninitialized storage from the heap.
1440        There are two forms:
1441    
1442         rawrecord NONE [INT n]  allocates a tagless record of length n
1443         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
1444                                     and initializes the tag.
1445    
1446     2. rawupdate of cty
1447          rawupdate cty (v,i,x)
1448          Assigns to x to the ith component of record v.
1449          The storelist is not updated.
1450    
1451    We use these new primops for both spilling and increment record construction.
1452    
1453     1. Spilling.
1454    
1455        This is implemented with a linear scan algorithm (but generalized
1456        to trees).  The algorithm will create a single spill record at the
1457        beginning of the cps function and use rawupdate to spill to it,
1458        and SELECT or SELp to reload from it.  So both spills and reloads
1459        are fine-grain operations.  In contrast, in the old algorithm
1460        "spills" have to be bundled together in records.
1461    
1462        Ideally, we should sink the spill record construction to where
1463        it is needed.  We can even split the spill record into multiple ones
1464        at the places where they are needed.  But CPS is not a good
1465        representation for global code motion, so I'll keep it simple and
1466        am not attempting this.
1467    
1468     2. Incremental record construction (aka record splitting).
1469    
1470        Long records with many component values which are simulatenously live
1471        (recall that single use record addresses are not considered to
1472         be live) are constructed with rawrecord and rawupdate.
1473        We allocate space on the heap with rawrecord first, then gradually
1474        fill it in with rawupdate.  This is the technique suggested to me
1475        by Matthias.
1476    
1477        Some restrictions on when this is applicable:
1478        1. It is not a VECTOR record.  The code generator currently does not handle
1479           this case. VECTOR record uses double indirection like arrays.
1480        2. All the record component values are defined in the same "basic block"
1481           as the record constructor.  This is to prevent speculative
1482           record construction.
1483    
1484    ----------------------------------------------------------------------
1485    Name: Allen Leung
1486    Date: 2002/02/22 01:02:00 EST
1487    Tag: leunga-20020222-mlrisc-tools
1488    
1489    Minor bug fixes in the parser and rewriter
1490    
1491    ----------------------------------------------------------------------
1492    Name: Allen Leung
1493    Date: 2002/02/21 20:20:00 EST
1494    Tag: leunga-20020221-peephole
1495    
1496    Regenerated the peephole files.  Some contained typos in the specification
1497    and some didn't compile because of pretty printing bugs in the old version
1498    of 'nowhere'.
1499    
1500    ----------------------------------------------------------------------
1501    Name: Allen Leung
1502    Date: 2002/02/19 20:20:00 EST
1503    Tag: leunga-20020219-mlrisc-tools
1504    Description:
1505    
1506       Minor bug fixes to the mlrisc-tools library:
1507    
1508       1.  Fixed up parsing colon suffixed keywords
1509       2.  Added the ability to shut the error messages up
1510       3.  Reimplemented the pretty printer and fixed up/improved
1511           the pretty printing of handle and -> types.
1512       4.  Fixed up generation of literal symbols in the nowhere tool.
1513       5.  Added some SML keywords to to sml.sty
1514    
1515    ----------------------------------------------------------------------
1516    Name: Matthias Blume
1517    Date: 2002/02/19 16:20:00 EST
1518    Tag: blume-20020219-cmffi
1519    Description:
1520    
1521    A wild mix of changes, some minor, some major:
1522    
1523    * All C FFI-related libraries are now anchored under $c:
1524        $/c.cm      --> $c/c.cm
1525        $/c-int.cm  --> $c/internals/c-int.cm
1526        $/memory.cm --> $c/memory/memory.cm
1527    
1528    * "make" tool (in CM) now treats its argument pathname slightly
1529      differently:
1530        1. If the native expansion is an absolute name, then before invoking
1531           the "make" command on it, CM will apply OS.Path.mkRelative
1532           (with relativeTo = OS.FileSys.getDir()) to it.
1533        2. The argument will be passed through to subsequent phases of CM
1534           processing without "going native".  In particular, if the argument
1535           was an anchored path, then "make" will not lose track of that anchor.
1536    
1537    * Compiler backends now "know" their respective C calling conventions
1538      instead of having to be told about it by ml-nlffigen.  This relieves
1539      ml-nlffigen from one of its burdens.
1540    
1541    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
1542    
1543    * Export C_DEBUG and C_Debug from $c/c.cm.
1544    
1545    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
1546      subtyping relationship between incomplete pointers and their complete
1547      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
1548      with the convention of instantiating 'o with ('t, 'c) obj whenever
1549      the pointer target type is complete.  In the incomplete case, 'o
1550      will be instantiated with some "'c iobj" -- a type obtained by
1551      using one of the functors PointerToIncompleteType or PointerToCompleteType.
1552    
1553      Operations that work on both incomplete and complete pointer types are
1554      typed as taking an 'o ptr while operations that require the target to
1555      be known are typed as taking some ('t, 'c) obj ptr.
1556    
1557      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
1558      where void is an eqtype without any values.  This makes it possible
1559      to work on voidptr values using functions meant to operate on light
1560      incomplete pointers.
1561    
1562    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
1563      been vastly simplified.
1564    
1565    ----------------------------------------------------------------------
1566    Name: Matthias Blume
1567    Date: 2002/02/19 10:48:00 EST
1568    Tag: blume-20020219-pqfix
1569    Description:
1570    
1571    Applied Chris Okasaki's bug fix for priority queues.
1572    
1573    ----------------------------------------------------------------------
1574    Name: Matthias Blume
1575    Date: 2002/02/15 17:05:00
1576    Tag: Release_110_39
1577    Description:
1578    
1579    Last-minute retagging is becoming a tradition... :-(
1580    
1581    This is the working release 110.39.
1582    
1583    ----------------------------------------------------------------------
1584    Name: Matthias Blume
1585    Date: 2002/02/15 16:00:00 EST
1586    Tag: Release_110_39-orig
1587    Description:
1588    
1589    Working release 110.39.  New bootfiles.
1590    
1591    (Update: There was a small bug in the installer so it wouldn't work
1592    with all shells.  So I retagged. -Matthias)
1593    
1594    ----------------------------------------------------------------------
1595    Name: Matthias Blume
1596    Date: 2002/02/15 14:17:00 EST
1597    Tag: blume-20020215-showbindings
1598    Description:
1599    
1600    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
1601    the latter can be useful for exploring what bindings are available at
1602    the interactive prompt.  (The first function returns only the list
1603    of symbols that are really bound, the second prints those but also the
1604    ones that CM's autoloading mechanism knows about.)
1605    
1606    ----------------------------------------------------------------------
1607    Name: Matthias Blume
1608    Date: 2002/02/15 12:08:00 EST
1609    Tag: blume-20020215-iptrs
1610    Description:
1611    
1612    Two improvements to ml-nlffigen:
1613    
1614      1. Write files only if they do not exist or if their current contents
1615         do not coincide with what's being written.  (That is, avoid messing
1616         with the time stamps unless absolutely necessary.)
1617    
1618      2. Implement a "repository" mechanism for generated files related
1619         to "incomplete pointer types".   See the README file for details.
1620    
1621    ----------------------------------------------------------------------
1622    Name: Matthias Blume
1623    Date: 2002/02/14 11:50:00 EST
1624    Tag: blume-20020214-quote
1625    Description:
1626    
1627    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
1628    because of the new and improved tag generation scheme.  (Thanks to Allen
1629    Leung for pointing it out.)
1630    
1631    ----------------------------------------------------------------------
1632    Name: Lal George
1633    Date: 2002/02/14 09:55:27 EST 2002
1634    Tag: george-20020214-isabelle-bug
1635    Description:
1636    
1637    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
1638    of Isabelle on the x86.
1639    
1640    From Allen:
1641    -----------
1642     I've found the problem:
1643    
1644         in ra-core.sml, I use the counter "blocked" to keep track of the
1645         true number of elements in the freeze queue.  When the counter goes
1646         to zero, I skip examining the queue.  But I've messed up the
1647         bookkeeping in combine():
1648    
1649             else ();
1650             case !ucol of
1651               PSEUDO => (if !cntv > 0 then
1652                     (if !cntu > 0 then blocked := !blocked - 1 else ();
1653                                        ^^^^^^^^^^^^^^^^^^^^^^^
1654                      moveu := mergeMoveList(!movev, !moveu)
1655                     )
1656                  else ();
1657    
1658         combine() is called to coalesce two nodes u and v.
1659         I think I was thinking that if the move counts of u and v are both
1660         greater than zero then after they are coalesced then one node is
1661         removed from the freeze queue.  Apparently I was thinking that
1662         both u and v are of low degree, but that's clearly not necessarily true.
1663    
1664    
1665    02/12/2002:
1666        Here's the patch.  HOL now compiles.
1667    
1668        I don't know how this impact on performance (compile
1669        time or runtime).  This bug caused the RA (especially on the x86)
1670        to go thru the potential spill phase when there are still nodes on the
1671        freeze queue.
1672    
1673    
1674    
1675    
1676    ----------------------------------------------------------------------
1677    Name: Matthias Blume
1678    Date: 2002/02/13 22:40:00 EST
1679    Tag: blume-20020213-fptr-rtti
1680    Description:
1681    
1682    Fixed a bug in ml-nlffigen that was introduced with one of the previous
1683    updates.
1684    
1685    ----------------------------------------------------------------------
1686    Name: Matthias Blume
1687    Date: 2002/02/13 16:41:00 EST
1688    Tag: blume-20020213-cmlpq
1689    Description:
1690    
1691    Added new priority queue export symbols (which have just been added to
1692    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
1693    not compile and the installer would choke.)
1694    
1695    ----------------------------------------------------------------------
1696    Name: Matthias Blume
1697    Date: 2002/02/13 16:15:00 EST
1698    Tag: blume-20020213-various
1699    Description:
1700    
1701    1. More tweaks to ml-nlffigen:
1702    
1703       - better internal datastructures (resulting in slight speedup)
1704       - "-match" option requires exact match
1705       - "localized" gensym counters (untagged structs/unions nested within
1706         other structs/unions or within typedefs get a fresh counter; their
1707         tag will be prefixed by a concatenation of their parents' tags)
1708       - bug fixes (related to calculation of transitive closure of types
1709         to be included in the output)
1710    
1711    2. Minor Basis updates:
1712    
1713       - added implementations for List.collate and Option.app
1714    
1715    ----------------------------------------------------------------------
1716    Name: Matthias Blume
1717    Date: 2002/02/11 15:55:00 EST
1718    Tag: blume-20020211-gensym
1719    Description:
1720    
1721    Added a "-gensym" option to command line of ml-nlffigen.  This can be
1722    used to specify a "stem" -- a string that is inserted in all "gensym'd"
1723    names (ML structure names that correspond to unnamed C structs, unions,
1724    and enums), so that separate runs of ml-nlffigen do not clash.
1725    
1726    ----------------------------------------------------------------------
1727    Name: Matthias Blume
1728    Date: 2002/02/11 12:05:00 EST
1729    Tag: blume-20020211-gensml
1730    Description:
1731    
1732    A quick fix for a problem with GenSML (in the pgraph-util library):
1733    Make generation of toplevel "local" optional.  (Strictly speaking,
1734    signature definitions within "local" are not legal SML.)
1735    
1736    Other than that: updates to INSTALL and cm/TODO.
1737    
1738    ----------------------------------------------------------------------
1739    Name: Matthias Blume
1740    Date: 2002/02/08 15:00:00 EST
1741    Tag: blume-20020208-uniquepid
1742    Description:
1743    
1744    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
1745    
1746    1. The installer (config/install.sh) has gotten smarter:
1747    
1748         - Configuration options are a bit easier to specify now
1749           (in config/targets).
1750         - Bug in recognizing .tar.bz2 files fixed.
1751         - Installer automatically resolves dependencies between
1752           configuration options (e.g., if you ask for eXene, you will
1753           also get cml -- regardless whether you asked for it or not).
1754         - Installer can run in "quieter mode" by setting the environment
1755           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
1756           "completely silent", though.
1757         - Build HashCons library as part of smlnj-lib.
1758    
1759    2. A new scheme for assigning persistent identifiers to compilation
1760       units (and, by extension, to types etc.) has been put into place.
1761       This fixes a long-standing bug where types and even dynamic values
1762       can get internally confused, thereby compromising type safety
1763       (abstraction) and dynamic correctness.  See
1764    
1765         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
1766    
1767       for an example of how things could go wrong until now.
1768    
1769       The downside of the new scheme is that pids are not quite as
1770       persistent as they used to be: CM will generate a fresh pid
1771       for every compilation unit that it thinks it sees for the first
1772       time.  That means that if you compile starting from a clean, fresh
1773       source tree at two different times, you end up with different
1774       binaries.
1775    
1776       Cutoff recompilation, however, has not been compromised because
1777       CM keeps pid information in special caches between runs.
1778    
1779    ----------------------------------------------------------------------
1780    Name: Lal George
1781    Date: 2002/02/07 15:34:13 EST 2002
1782    Tag: <none>
1783    Description:
1784    
1785    Compilers that generate assembly code may produce  global labels
1786    whose value is resolved at link time. The various peephole optimization
1787    modules did not take this in account.
1788    
1789    TODO. The Labels.addrOf function should really return an option
1790    type so that clients are forced to deal with this issue, rather
1791    than an exception being raised.
1792    
1793    ----------------------------------------------------------------------
1794    Name: Lal George
1795    Date: 2002/02/06 13:55:02 EST
1796    Tag: george-20020206-ra-breakup
1797    Description:
1798    
1799    1. A bug fix from Allen.
1800    
1801        A typo causes extra fstp %st(0)'s to be generated at compensation
1802        edges, which might cause stack underflow traps at runtime.  This
1803        occurs in fft where there are extraneous fstps right before the 'into'
1804        trap instruction (in this case they are harmless since none of the
1805        integers overflow.)
1806    
1807    2. Pulled out various utility modules that were embedded in the modules
1808       of the register allocator. I need these modules for other purposes, but
1809       they are not complete enough to put into a library (just yet).
1810    ----------------------------------------------------------------------
1811    Name: Matthias Blume
1812    Date: 2002/01/31 16:05:00 EST
1813    Tag: blume-20020131-sparc-ccalls
1814    Description:
1815    
1816    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
1817       of extra stack space by mistake.  Fixed.
1818    
1819    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
1820    
1821    ----------------------------------------------------------------------
1822    Name: Allen Leung
1823    Date: 2002/01/30
1824    Tag: leunga-20020130-nowhere-bug-fix
1825    Description:
1826    
1827       MLRISC bug fixes:
1828       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
1829       2. MachineInt.fromString was negating its value.
1830    
1831    ----------------------------------------------------------------------
1832    Name: Matthias Blume
1833    Date: 2002/01/29
1834    Tag: blume-20020129-INSTALL
1835    Description:
1836    
1837    - Added somewhat detailed installation instructions (file INSTALL).
1838    - Fixed curl-detection bug in config/install.sh.
1839    - It is now possible to select the URL getter using the URLGETTER
1840      environment variable:
1841    
1842          not set / "unknown"      --> automatic detection (script tries wget,
1843                                       curl, and lynx)
1844          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
1845                                       how to properly invoke them)
1846          other                    --> use $URLGETTER directly, it must take
1847                                       precisely two command-line arguments
1848                                       (source URL and destination file name)
1849    
1850    ----------------------------------------------------------------------
1851    Name: Matthias Blume
1852    Date: 2002/01/28
1853    Tag: blume-20020128-sparc-ccalls
1854    Description:
1855    
1856    - Fixed problem with calculation of "used" registers in sparc-c-calls.
1857    - Make use of the allocParam argument in sparc-c-calls.
1858    
1859    ----------------------------------------------------------------------
1860    Name: Matthias Blume
1861    Date: 2002/01/28
1862    Tag: blume-20020128-allocParam
1863    Description:
1864    
1865    John Reppy:  Changes c-calls API to accept client-callback for
1866    allocating extra stack space.
1867    me: Corresponding changes to mlriscGen (using a dummy argument that
1868        does not change the current behavior).
1869    
1870    ----------------------------------------------------------------------
1871  Name: Matthias Blume  Name: Matthias Blume
1872  Date: 2001/01/25 21:27:00 EST  Date: 2002/01/28 12:00:00
1873  Tag: Release_110_38  Tag: Release_110_38
1874  Description:  Description:
1875    
1876    This time for real!!!
1877    
1878    ----------------------------------------------------------------------
1879    Name: Matthias Blume
1880    Date: 2002/01/28 10:56:00 EST
1881    Tag: blume-20020128-retraction
1882    Description:
1883    
1884    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
1885       with blume-Release_110_38-retracted.)
1886    
1887    1. Fixed a problem with incorrect rounding modes in real64.sml.
1888       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
1889    
1890    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
1891       and enums fixed.  The naming of corresponding ML identifiers should
1892       now be consistent again.
1893    
1894    ----------------------------------------------------------------------
1895    Name: Allen Leung
1896    Date: 2002/01/27
1897    Tag: leunga-20020127-nowhere
1898    Description:
1899    
1900       Added a target called nowhere in the configuration scripts.
1901       Enabling this will build the MLRISC 'nowhere' tool (for translating
1902       programs with where-clauses into legal SML code) during installation.
1903    
1904    ----------------------------------------------------------------------
1905    Name: Matthias Blume
1906    Date: 2002/01/25 21:27:00 EST
1907    Tag: blume-Release_110_38-retracted
1908    Description:
1909    
1910  Call it a (working) release!  Version is 110.38. Bootfiles are ready.  Call it a (working) release!  Version is 110.38. Bootfiles are ready.
1911    
1912  README will be added later.  README will be added later.
1913    
1914    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
1915    (Release_110_38) removed.  Reason: Last-minute bug fixes.
1916    
1917  ----------------------------------------------------------------------  ----------------------------------------------------------------------
1918  Name: Matthias Blume  Name: Matthias Blume
1919  Date: 2002/01/25  Date: 2002/01/25
# Line 536  Line 2428 
2428    
2429  ----------------------------------------------------------------------  ----------------------------------------------------------------------
2430  Name: Matthias Blume  Name: Matthias Blume
 >>>>>>> 1.169  
2431  Date: 2001/09/18 15:35:00 EDT  Date: 2001/09/18 15:35:00 EDT
2432  Tag: blume-20010918-readme11036  Tag: blume-20010918-readme11036
2433  Description:  Description:

Legend:
Removed from v.1037  
changed lines
  Added in v.1342

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