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 1098, Wed Feb 27 17:29:47 2002 UTC revision 1337, Tue Jun 17 20:45:15 2003 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
17    Date: 2003/06/17
18    Tag: macqueen-20030617-bug895
19    Description:
20    
21    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
22    Tag will be used for new development branch (mcz-branch) for
23    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
24    
25    ----------------------------------------------------------------------
26    Name: Matthias Blume (blume@tti-c.org)
27    Date: 2003/05/27 16:55:00 CDT
28    Tag: blume-20030527-polyeq
29    Description:
30    
31    Tried to eliminated most cases of polymorphic equality.
32    
33    ----------------------------------------------------------------------
34    Name: Matthias Blume (blume@tti-c.org)
35    Date: 2003/05/21 17:45:00 CDT
36    Tag: blume-20030517-complete
37    Description:
38    
39    Two changes:
40    
41      1. Added a flag for controlling whether non-exhaustive bindings will
42         be treated as errors (default is false).
43      2. Cleaned up the *entire* source tree so that CMB.make goes through
44         without a single non-exhaustive match- or bind warning.
45    
46    ----------------------------------------------------------------------
47    Name: Matthias Blume (blume@tti-c.org)
48    Date: 2003/05/17 10:20:00 CDT
49    Tag: blume-20030517-absyn
50    Description:
51    
52    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
53    
54       This mainly affects the quality of error messages.  However, some
55       of the code is now more straightforward than before. (Treatment of
56       the above four constructs in translate.sml is much simpler than
57       the "macro-expansion" that was going on before.  Plus, the mach-
58       compiler no longer gets invoked just to be able to compile an
59       if-expression.)
60    
61    2. The ErrorMsg.Error exception is now caught and absorbed by the
62       interactive loop.
63    
64    ----------------------------------------------------------------------
65    Name: Allen Leung
66    Date: 2003/05/16 13:05:00 CDT
67    Tag: leunga-20030516-cygwin-runtime
68    Description:
69    
70        Ported the runtime system to cygwin, which uses the unix
71    x86-unix bin files.  Missing/buggy features:
72    
73       o getnetbyname, getnetbyaddr: these functions seem to be missing in
74         the Cygwin library.
75       o Ctrl-C handling may be flaky.
76       o Windows system calls and Windows I/O are not supported.
77    
78       A new set of binfiles is located at:
79    
80         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
81    
82       This is only needed for bootstrapping the cygwin version of smlnj.
83       Other x86 versions can use the existing binfiles.
84    
85    ----------------------------------------------------------------------
86    Name: Matthias Blume
87    Date: 2003/04/08 15:42:00 CDT
88    Tag: blume-20030408-listpair
89    Description:
90    
91    1. Added a target 'mlrisc' to installer.
92    
93    2. Added missing elements to structure ListPair.
94    
95    ----------------------------------------------------------------------
96    Name: Allen Leung
97    Date: 2003/01/07 10:40:00 EST
98    Tag: leunga-20030107-int-rem
99    Description:
100    
101    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
102    The arguments to the SUBL instruction were swapped.
103    
104    ----------------------------------------------------------------------
105    Name: Matthias Blume
106    Date: 2002/12/12 16:25:00 EST
107    Tag: blume-20021212-risc-ra
108    Description:
109    
110    Fixed a serious bug in the rewrite code for FP spilling/reloading that
111    sent the RA into an infinite loop when floating point registers get
112    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
113    110.37 and 110.38.)
114    There was another set of potential problems related to the handling of
115    MLRISC annotations (but those did not yet cause real problems, apparently).
116    
117    ----------------------------------------------------------------------
118    Name: Matthias Blume
119    Date: 2002/12/06 22:40:00 EST
120    Tag: blume-20021206-cm-fileid
121    Description:
122    
123    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
124    This fixes the problem of CM getting confused by files that suddenly
125    change their identity (e.g., by getting unlinked and recreated by some
126    text editor such as vi).  There might be a better/cheaper/cleaner way
127    of doing this, but for now this will have to do.
128    
129    ----------------------------------------------------------------------
130    Name: Matthias Blume
131    Date: 2002/10/28 09:50:00 EST
132    Tag: blume-20021028-typecheck
133    Description:
134    
135    Exported structure Typecheck from $smlnj/viscomp/core.cm.
136    
137    ----------------------------------------------------------------------
138    Name: Matthias Blume
139    Date: 2002/10/17 09:10:00 EDT
140    Tag: Release_110_42
141    Description:
142    
143    In good old tradition, there has been a slight hiccup so that we have
144    to patch 110.42 after the fact.   The old release tag has been replaced
145    (see below).
146    
147    The change solves a problem with two competing approaches the
148    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
149    each other's way.
150    
151    This change only affects the runtime system code and the installer script.
152    (No new bootfiles.)
153    
154    ----------------------------------------------------------------------
155    Name: Matthias Blume
156    Date: 2002/10/16 12:00:00 EDT
157    Tag: Release_110_42_removed
158    Description:
159    
160    New working release.  New bootfiles.
161    
162    ----------------------------------------------------------------------
163    Name: Matthias Blume
164    Date: 2002/10/10 13:10:00 EDT
165    Tag: blume-20021010-ppc-divs
166    Description:
167    
168    The mltree operator DIVS must be implemented with an overflow check on
169    the PPC because the hardware indicates divide-by-zero using "overflow" as
170    well.
171    
172    ----------------------------------------------------------------------
173    Name: Matthias Blume
174    Date: 2002/07/23 11:45:00
175    Tag: blume-20020723-smlnj-home
176    Description:
177    
178    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
179    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
180    CM_PATHCONFIG is also set), the path configuration file is assumed
181    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
182    the entire tree to some other place and everything will "just work".
183    
184    (Companion commands such as ml-build and ml-makedepend also sense this
185    variable.)
186    
187    ----------------------------------------------------------------------
188    Name: Matthias Blume
189    Date: 2002/07/12 21:19:00 EDT
190    Tag: blume-20020712-liveness
191    Description:
192    
193    Exported two useful "step" functions from liveness module (MLRISC).
194    
195    ----------------------------------------------------------------------
196    Name: Matthias Blume
197    Date: 2002/07/05 16:00 EDT
198    Tag: Release_110_41
199    Description:
200    
201    New working release.  New bootfiles.
202    
203    ----------------------------------------------------------------------
204    Name: Matthias Blume
205    Date: 2002/07/05 10:25:00 EDT
206    Tag: blume-20020705-btimp
207    Description:
208    
209    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
210    other clients can set up backtracing support.
211    
212    ----------------------------------------------------------------------
213    Name: Matthias Blume
214    Date: 2002/06/25 17:23:00 EDT
215    Tag: blume-20020625-fpmax
216    Description:
217    
218    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
219    case.  (The sense of the isNaN test was reversed -- which made min and
220    max always return their first argument.)
221    
222    ----------------------------------------------------------------------
223    Name: Matthias Blume
224    Date: 2002/06/11
225    Tag: blume-20020611-unixpath
226    Description:
227    
228    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
229    
230    ----------------------------------------------------------------------
231    Name: Matthias Blume
232    Date: 2002/06/10 16:35:00 EDT
233    Tag: blume-20020610-ieeereal
234    Description:
235    
236    I back-ported my implementation of IEEEReal.fromString from the
237    idlbasis-devel branch so that we can test it.
238    
239    Another small change is that ppDec tries to give more information
240    than just "<sig>" in the case of functors.  However, this code is
241    broken in some mysterious way if the functor's body's signature
242    has not been declared by ascription but gets inferred from the
243    implementation.  This needs fixing...
244    
245    ----------------------------------------------------------------------
246    Name: Matthias Blume
247    Date: 2002/05/31
248    Tag: blume-20020531-btrace-mode
249    Description:
250    
251    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
252    the wayside when I switched over to using Controls everywhere.)
253    
254    ----------------------------------------------------------------------
255    Name: Lal George
256    Date: 2002/05/23 12:21:40 EDT
257    Tag: george-20020523-visual-labels
258    Description:
259    
260    Labels are now displayed in the graphical output to make
261    the fall-through and target blocks obvious.
262    
263    ----------------------------------------------------------------------
264    Name: Matthias Blume
265    Date: 2002/05/22 11:03:00 EDT
266    Tag: blume-20020522-shrink
267    Description:
268    
269    John tweaked yesterday's fix for 1131 to handle an out-of-memory
270    situation that comes up when allocating huge arrays.
271    
272    ----------------------------------------------------------------------
273    Name: Matthias Blume
274    Date: 2002/05/21 16:00:00 EDT
275    Tag: Release_110_40
276    Description:
277    
278    New working release (110.40).  New bootfiles.
279    
280    [Also: John Reppy fixed GC bug 1131.]
281    
282    ----------------------------------------------------------------------
283    Name: Matthias Blume
284    Date: 2002/05/21 12:35:00 EDT
285    Tag: blume-20020521-cmdoc
286    Description:
287    
288    CM documentation update.
289    
290    ----------------------------------------------------------------------
291    Name: Matthias Blume
292    Date: 2002/05/21 10:55:00 EDT
293    Tag: blume-20020521-misc
294    Description:
295    
296    - John tweaked runtime to be silent on heap export (except when
297      GC messages are on).
298    - I added a few more things (cross-compiling versions of CMB) to
299      config/preloads (as suggestions).
300    
301    ----------------------------------------------------------------------
302    Name: Matthias Blume
303    Date: 2002/05/20 22:25:00 EDT
304    Tag: blume-20020520-controls
305    Description:
306    
307    - Added ControlUtil structure to control-lib.cm.
308    - Use it throughout.
309    - Used Controls facility to define MLRISC controls (as opposed to
310      registering MLRISC control ref cells with Controls after the fact)
311    - Fixed messed-up controls priorities.
312    
313    * Removed again all the stuff from config/preloads that one wouldn't
314      be able to preload at the time the initial heap image is built.
315      (Many libraries, e.g., CML, do not exist yet at this time.  The
316       only libraries that can be preloaded via config/preloads are those
317       that come bundled with the bootfiles.)
318    
319    ----------------------------------------------------------------------
320    Name: Matthias Blume
321    Date: 2002/05/20 10:59:00 EDT
322    Tag: blume-20020520-preloads
323    Description:
324    
325    Added a lot of commented-out suggestions for things to be included
326    in config/preloads.
327    
328    ----------------------------------------------------------------------
329    Name: Allen Leung
330    Date: 2002/05/18 14:20:00 EDT
331    Tag: leunga-20020518-mdl
332    Description:
333    
334    o Made the mdl tool stuff compile and run again.
335    o I've disabled all the stuff that depends on RTL specifications; they
336      are all badly broken anyway.
337    
338    ----------------------------------------------------------------------
339    Name: Matthias Blume
340    Date: 2002/05/17 16:49:00 EDT
341    Tag: blume-20020517-controls
342    Description:
343    
344    0. John Reppy made several modifications to the SML/NJ library.
345       In particular, there is a shiny new controls-lib.cm.
346    
347    1. Pushed new controls interface through compiler so that everything
348       compiles again.
349    
350    2. Added FormatComb and FORMAT_COMB to the CML version of the
351       SML/NJ library (so that CML compiles again).
352    
353    3. Modified init scripts because XXX_DEFAULT environment variables
354       are no longer with us.  (Boot-time initialization is now done
355       using the same environment variables that are also used for
356       startup-time initialization of controls.)
357    
358    ----------------------------------------------------------------------
359    Name: Lal George
360    Date: 2002/05/15 09:20:10 EDT
361    Tag: george-20020515-pseudo-op-decls
362    Description:
363    
364            All pseudo-ops emitted before the first segment declaration
365    such as TEXT, DATA, and BSS directives are assumed to be global
366    declarations and are emitted first in the assembly file. This is
367    useful in a number of situations where one has pseudo-ops that are not
368    specific to any segment, and also works around the constraint that one
369    cannot have client pseudo-ops in the TEXT segment.
370    
371            Because no segment is associated with these declarations it is
372    an error to allocate any space or objects before the first segment
373    directive and an exception will be raised. However, we cannot make
374    this check for client pseudo-ops.
375    
376            These top level declarations are a field in the CFG graph_info.
377    In theory you can continue to add to this field after the CFG has been
378    built -- provided you know what you are doing;-)
379    
380    ----------------------------------------------------------------------
381    Name: Matthias Blume
382    Date: 2002/05/13 16:40:00 EDT
383    Tag: blume-20020513-pp-etc
384    Description:
385    
386    A few minor bugfixes:
387    
388      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
389        (Bogus printouts for redefined bindings still occur.  Compiler
390        bug should no longer occur now.  We need to redo the prettyprinter
391        from scratch.)
392    
393      - CM pathname printer now also adds escape sequences for ( and )
394    
395      - commend and docu fixes for ml-nlffi
396    
397    ----------------------------------------------------------------------
398    Name: Matthias Blume
399    Date: 2002/05/10 16:40:00 EDT
400    Tag: blume-20020510-erg-textio
401    Description:
402    
403    Applied the following bugfix provided by Emden Gansner:
404    
405        Output is corrupted when outputSubstr is used rather than output.
406    
407        The problem occurs when a substring
408    
409            ss = (s, dataStart, dataLen)
410    
411        where dataStart > 0, fills a stream buffer with avail bytes left.
412        avail bytes of s, starting at index dataStart, are copied into the
413        buffer, the buffer is flushed, and then the remaining dataLen-avail
414        bytes of ss are copied into the beginning of the buffer. Instead of
415        starting this copy at index dataStart+avail in s, the current code
416        starts the copy at index avail.
417    
418        Fix:
419        In text-io-fn.sml, change line 695 from
420             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
421        to
422             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
423    
424    ----------------------------------------------------------------------
425    Name: Matthias Blume
426    Date: 2002/04/12 13:55:00 EDT
427    Tag: blume-20020412-assyntax
428    Description:
429    
430    1. Grabbed newer assyntax.h from the XFree86 project.
431    2. Fiddled with how to compile X86.prim.asm without warnings.
432    3. (Very) Minor cleanup in CM.
433    
434    ----------------------------------------------------------------------
435    Name: Matthias Blume
436    Date: 2002/04/01 (no joke!) 17:07:00 EST
437    Tag: blume-20020401-x86div
438    Description:
439    
440    Added full support for div/mod/rem/quot on the x86, using the machine
441    instruction's two results (without clumsily recomputing the remainder)
442    directly where appropriate.
443    
444    Some more extensive power-of-two support was added to the x86 instruction
445    selector (avoiding expensive divs, mods, and muls where they can be
446    replaced with cheaper shifts and masks).  However, this sort of thing
447    ought to be done earlier, e.g., within the CPS optimizer so that
448    all architectures benefit from it.
449    
450    The compiler compiles to a fixed point, but changes might be somewhat
451    fragile nevertheless.  Please, report any strange things that you might
452    see wrt. div/mod/quot/rem...
453    
454    ----------------------------------------------------------------------
455    Name: Matthias Blume
456    Date: 2002/03/29 17:22:00
457    Tag: blume-20020329-div
458    Description:
459    
460    Fixed my broken div/mod logic.  Unfortunately, this means that the
461    inline code for div/mod now has one more comparison than before.
462    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
463    The problem was with quotient = 0, because that alone does not tell
464    us which way the rounding went.  One then has to look at whether
465    remainder and divisor have the same sign...  :(
466    
467    Anyway, I replaced the bootfiles with fresh ones...
468    
469    ----------------------------------------------------------------------
470    Name: Matthias Blume
471    Date: 2002/03/29 14:10:00 EST
472    Tag: blume-20020329-inlprims
473    Description:
474    
475    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
476    
477    Primops have changed. This means that the bin/boot-file formats have
478    changed as well.
479    
480    To make sure that there is no confusion, I made a new version.
481    
482    
483    CHANGES:
484    
485    * removed REMT from mltree (remainder should never overflow).
486    
487    * added primops to deal with divisions of all flavors to the frontend
488    
489    * handled these primops all the way through so they map to their respective
490      MLRISC support
491    
492    * used these primops in the implementation of Int, Int32, Word, Word32
493    
494    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
495    
496    * parameterized INLMIN, INLMAX, and INLABS by a numkind
497    
498    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
499      floating point
500    
501    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
502      and Real (but Real.abs maps to a separate floating-point-only primop)
503    
504    
505    TODO items:
506    
507    * Hacked Alpha32 instruction selection, disabling the selection of REMx
508      instructions because the machine instruction encoder cannot handle
509      them.  (Hppa, PPC, and Sparc instruction selection did not handle
510      REM in the first place, and REM is supported by the x86 machine coder.)
511    
512    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
513      selection phase.  (The two can be streamlined because the hardware
514      delivers both quotient and remainder at the same time anyway.)
515    
516    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
517      (Currently the behavior is inconsistent both across architectures and
518      wrt. the draft Basis spec.)
519    
520    * Word8 should eventually be handled natively, too.
521    
522    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
523      as if there currently is no execution path that could trigger it in
524      SML/NJ.  (The assumptions underlying functions arith and promotable do not
525      hold for things like multiplication and division.)
526    
527    ----------------------------------------------------------------------
528    Name: Matthias Blume
529    Date: 2002/03/27 16:27:00 EST
530    Tag: blume-20020327-mlrisc-divisions
531    Description:
532    
533    Added support for all four division operations (ML's div, mod, quot,
534    and rem) to MLRISC.  In the course of doing so, I also rationalized
535    the naming (no more annoying switch-around of DIV and QUOT), by
536    parameterizing the operation by div_rounding_mode (which can be either
537    DIV_TO_ZERO or DIV_TO_NEGINF).
538    
539    The generic MLTreeGen functor takes care of compiling all four
540    operations down to only round-to-zero div.
541    
542    Missing pieces:
543    
544      * Doing something smarter than relying on MLTreeGen on architectures
545        like, e.g., the x86 where hardware division delivers both quotient and
546        remainder at the same time.  With this, the implementation of the
547        round-to-neginf operations could be further streamlined.
548    
549      * Remove inlining support for div/mod/rem from the frontend and replace it
550        with primops that get carried through to the backend.  Do this for all
551        int and word types.
552    
553    ----------------------------------------------------------------------
554    Name: Matthias Blume
555    Date: 2002/03/25 17:25:00 EST
556    Tag: blume-20020325-divmod
557    Description:
558    
559    I improved (hopefully without breaking them) the implementation of Int.div,
560    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
561    advantage of the following observations:
562    
563      Let  q = x quot y      r = x rem y
564           d = x div  y      m = x mod y
565    
566    where "quot" is the round-to-zero version of integer division that
567    hardware usually provides.  Then we have:
568    
569         r = x - q * y        where neither the * nor the - will overflow
570         d = if q >= 0 orelse x = q * y then q else q - 1
571                              where neither the * nor the - will overflow
572         m = if q >= 0 orelse r = 0 then r else r + y
573                              where the + will not overflow
574    
575    This results in substantial simplification of the generated code.
576    The following table shows the number of CFG nodes and edges generated
577    for
578            fun f (x, y) = x OPER y
579            (* with OPER \in div, mod, quot, rem *)
580    
581    
582        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
583        --------------------------------------------------------
584         div |         24 |         39 |         12 |         16
585         mod |         41 |         71 |         12 |         16
586        quot |          8 |         10 |          8 |         10
587         rem |         10 |         14 |          8 |         10
588    
589    
590    ----------------------------------------------------------------------
591    Name: Matthias Blume
592    Date: 2002/03/25 22:06:00 EST
593    Tag: blume-20020325-cprotobug
594    Description:
595    
596    Fixed a bug in cproto (c prototype decoder).
597    
598    ----------------------------------------------------------------------
599    Name: Matthias Blume
600    Date: 2002/03/25 16:00:00 EST
601    Tag: blume-20020325-raw-primops
602    Description:
603    
604    I did some cleanup to Allen's new primop code and
605    replaced yesterday's bootfiles with new ones.
606    (But they are stored in the same place.)
607    
608    ----------------------------------------------------------------------
609    Name: Matthias Blume
610    Date: 2002/03/24 22:40:00 EST
611    Tag: blume-20020324-bootfiles
612    Description:
613    
614    Made the bootfiles that Allen asked for.
615    
616    ----------------------------------------------------------------------
617    Name: Allen Leung
618    Date: 2002/03/23 15:50:00 EST
619    Tag: leunga-20020323-flint-cps-rcc-primops
620    Description:
621    
622      1. Changes to FLINT primops:
623    
624        (* make a call to a C-function;
625         * The primop carries C function prototype information and specifies
626         * which of its (ML-) arguments are floating point. C prototype
627         * information is for use by the backend, ML information is for
628         * use by the CPS converter. *)
629      | RAW_CCALL of { c_proto: CTypes.c_proto,
630                       ml_args: ccall_type list,
631                       ml_res_opt: ccall_type option,
632                       reentrant : bool
633                     } option
634       (* Allocate uninitialized storage on the heap.
635        * The record is meant to hold short-lived C objects, i.e., they
636        * are not ML pointers.  With the tag, the representation is
637        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
638        *)
639      | RAW_RECORD of {tag:bool,sz:int}
640      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
641    
642      2.  These CPS primops are now overloaded:
643    
644           rawload of {kind:numkind}
645           rawstore of {kind:numkind}
646    
647          The one argument form is:
648    
649             rawload {kind} address
650    
651          The two argument form is:
652    
653             rawload {kind} [ml object, byte-offset]
654    
655      3. RAW_CCALL/RCC now takes two extra arguments:
656    
657         a. The first is whether the C call is reentrant, i.e., whether
658            ML state should be saved and restored.
659         b. The second argument is a string argument specifying the name of
660            library and the C function.
661    
662         These things are currently not handled in the code generator, yet.
663    
664      4. In CProto,
665    
666         An encoding type of "bool" means "ml object" and is mapped into
667         C prototype of PTR.  Note that "bool" is different than "string",
668         even though "string" is also mapped into PTR, because "bool"
669         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
670    
671      5. Pickler/unpicker
672    
673         Changed to handle RAW_RECORD and newest RAW_CCALL
674    
675      6. MLRiscGen,
676    
677         1. Changed to handle the new rawload/rawstore/rawrecord operators.
678         2. Code for handling C Calls has been moved to a new module CPSCCalls,
679            in the file CodeGen/cpscompile/cps-c-calls.sml
680    
681      7. Added the conditional move operator
682    
683             condmove of branch
684    
685         to cps.  Generation of this is still buggy so it is currently
686         disabled.
687    
688    ----------------------------------------------------------------------
689    Name: Lal George
690    Date: 2002/03/22 14:18:25 EST
691    Tag: george-20020322-cps-branch-prob
692    Description:
693    
694    Implemented the Ball-Larus branch prediction-heuristics, and
695    incorporated graphical viewers for control flow graphs.
696    
697    Ball-Larus Heuristics:
698    ---------------------
699    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
700    
701    By design it uses the Dempster-Shafer theory for combining
702    probabilities.  For example, in the function:
703    
704        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
705    
706    the ball-larus heuristics predicts that the n=0 is unlikely
707    (OH-heuristic), and the 'then' branch is unlikely because of the
708    RH-heuristic -- giving the 'then' branch an even lower combined
709    probability using the Dempster-Shafer theory.
710    
711    Finally, John Reppy's loop analysis in MLRISC, further lowers the
712    probability of the 'then' branch because of the loop in the else
713    branch.
714    
715    
716    Graphical Viewing:
717    ------------------
718    I merely plugged in Allen's graphical viewers into the compiler. The
719    additional code is not much. At the top level, saying:
720    
721            Control.MLRISC.getFlag "cfg-graphical-view" := true;
722    
723    will display the graphical view of the control flow graph just before
724    back-patching.  daVinci must be in your path for this to work. If
725    daVinci is not available, then the default viewer can be changed
726    using:
727    
728            Control.MLRISC.getString "viewer"
729    
730    which can be set to "dot" or "vcg" for the corresponding viewers. Of
731    course, these viewers must be in your path.
732    
733    The above will display the compilation unit at the level of clusters,
734    many of which are small, boring, and un-interesting. Also setting:
735    
736            Control.MLRISC.getInt "cfg-graphical-view_size"
737    
738    will display clusters that are larger than the value set by the above.
739    
740    
741    ----------------------------------------------------------------------
742    Name: Matthias Blume
743    Date: 2002/03/21 22:20:00 EST
744    Tag: blume-20020321-kmp-bugfix
745    Description:
746    
747    Changed the interface to the KMP routine in PreString and fixed
748    a minor bug in one place where it was used.
749    
750    ----------------------------------------------------------------------
751    Name: Allen Leung
752    Date: 2002/03/21 20:30:00 EST
753    Tag: leunga-20020321-cfg
754    Description:
755    
756      Fixed a potential problem in cfg edge splitting.
757    
758    ----------------------------------------------------------------------
759    Name: Allen Leung
760    Date: 2002/03/21 17:15:00 EST
761    Tag: leunga-20020321-x86-fp-cfg
762    Description:
763    
764      1. Recoded the buggy parts of x86-fp.
765    
766         a. All the block reordering code has been removed.
767            We now depend on the block placement phases to do this work.
768    
769         b. Critical edge splitting code has been simplified and moved into the
770            CFG modules, as where they belong.
771    
772         Both of these were quite buggy and complex.  The code is now much, much
773         simpler.
774    
775      2. X86 backend.
776    
777         a. Added instructions for 64-bit support.  Instruction selection for
778            64-bit has not been committed, however, since that
779            requires changes to MLTREE which haven't been approved by
780            Lal and John.
781    
782         b. Added support for FUCOMI and FUCOMIP when generating code for
783            PentiumPro and above.  We only generate these instructions in
784            the fast-fp mode.
785    
786         c. Added cases for JP and JNP in X86FreqProps.
787    
788      3. CFG
789    
790         CFG now has a bunch of methods for edge splitting and merging.
791    
792      4. Machine description.
793    
794         John's simplification of MLTREE_BASIS.fcond broke a few machine
795         description things:
796    
797         rtl-build.{sig,sml} and hppa.mdl fixed.
798    
799         NOTE: the machine description stuff in the repository is still broken.
800               Again, I can't put my fixes in because that involves
801               changes to MLTREE.
802    
803    ----------------------------------------------------------------------
804    Name: Matthias Blume
805    Date: 2002/03/20 15:55:00 EST
806    Tag: blume-20020320-kmp
807    Description:
808    
809    Implemented Knuth-Morris-Pratt string matching in PreString and used
810    it for String.isSubstring, Substring.isSubstring, and
811    Substring.position.
812    
813    (Might need some stress-testing.  Simple examples worked fine.)
814    
815    ----------------------------------------------------------------------
816    Name: Matthias Blume
817    Date: 2002/03/19 16:37:00 EST
818    Tag: blume-20020319-witnesses
819    Description:
820    
821    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
822    
823    This implements a generic mechanism for changing constness qualifiers
824    anywhere within big C types without resorting to outright "casts".
825    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
826    modify the constness at the outermost level.)
827    The implementation of "convert" is based on the idea of "witness"
828    values -- values that are not used by the operation but whose types
829    "testify" to their applicability.  On the implementation side, "convert"
830    is simply a projection (returning its second curried argument).  With
831    cross-module inlining, it should not result in any machine code being
832    generated.
833    
834    ----------------------------------------------------------------------
835    Name: Matthias Blume
836    Date: 2002/03/15 16:40:00 EST
837    Tag: blume-20020315-basis
838    Description:
839    
840    Provided (preliminary?) implementations for
841    
842      {String,Substring}.{concatWith,isSuffix,isSubstring}
843    
844    and
845    
846      Substring.full
847    
848    Those are in the Basis spec but they were missing in SML/NJ.
849    
850    ----------------------------------------------------------------------
851    Name: Matthias Blume
852    Date: 2002/03/14 21:30:00 EST
853    Tag: blume-20020314-controls
854    Description:
855    
856    Controls:
857    ---------
858    
859    1. Factored out the recently-added Controls : CONTROLS stuff and put
860       it into its own library $/controls-lib.cm.  The source tree for
861       this is under src/smlnj-lib/Controls.
862    
863    2. Changed the names of types and functions in this interface, so they
864       make a bit more "sense":
865    
866          module -> registry
867          'a registry -> 'a group
868    
869    3. The interface now deals in ref cells only.  The getter/setter interface
870       is (mostly) gone.
871    
872    4. Added a function that lets one register an already-existing ref cell.
873    
874    5. Made the corresponding modifications to the rest of the code so that
875       everything compiles again.
876    
877    6. Changed the implementation of Controls.MLRISC back to something closer
878       to the original.  In particular, this module (and therefore MLRISC)
879       does not depend on Controls.  There now is some link-time code in
880       int-sys.sml that registers the MLRISC controls with the Controls
881       module.
882    
883    CM:
884    ---
885    
886      * One can now specify the lambda-split aggressiveness in init.cmi.
887    
888    ----------------------------------------------------------------------
889    Name: Allen Leung
890    Date: 2002/03/13 17:30:00 EST
891    Tag: leunga-20020313-x86-fp-unary
892    Description:
893    
894    Bug fix for:
895    
896    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
897    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
898    > - fun f(x,(y,z)) = Real.~ y;
899    > [autoloading]
900    > [autoloading done]
901    >       fchsl   (%eax), 184(%esp)
902    > Error: MLRisc bug: X86MCEmitter.emitInstr
903    >
904    > uncaught exception Error
905    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
906    
907    The problem was that the code generator did not generate any fp registers
908    in this case, and the ra didn't know that it needed to run the X86FP phase to
909    translate the pseudo fp instruction.   This only happened with unary fp
910    operators in certain situations.
911    
912    ----------------------------------------------------------------------
913    Name: Matthias Blume
914    Date: 2002/03/13 14:00:00 EST
915    Tag: blume-20020313-overload-etc
916    Description:
917    
918    1. Added _overload as a synonym for overload for backward compatibility.
919       (Control.overloadKW must be true for either version to be accepted.)
920    
921    2. Fixed bug in install script that caused more things to be installed
922       than what was requested in config/targets.
923    
924    3. Made CM aware of the (_)overload construct so that autoloading
925       works.
926    
927    ----------------------------------------------------------------------
928    Name: Matthias Blume
929    Date: 2002/03/12 22:03:00 EST
930    Tag: blume-20020312-url
931    Description:
932    
933    Forgot to update BOOT and srcarchiveurl.
934    
935    ----------------------------------------------------------------------
936    Name: Matthias Blume
937    Date: 2002/03/12 17:30:00 EST
938    Tag: blume-20020312-version110392
939    Description:
940    
941    Yet another version number bump (because of small changes to the
942    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
943    
944    Changes:
945    
946      The new pid generation scheme described a few weeks ago was overly
947      complicated.  I implemented a new mechanism that is simpler and
948      provides a bit more "stability":  Once CM has seen a compilation
949      unit, it keeps its identity constant (as long as you do not delete
950      those crucial CM/GUID/* files).  This means that when you change
951      an interface, compile, then go back to the old interface, and
952      compile again, you arrive at the original pid.
953    
954      There now also is a mechanism that instructs CM to use the plain
955      environment hash as a module's pid (effectively making its GUID
956      the empty string).  For this, "noguid" must be specified as an
957      option to the .sml file in question within its .cm file.
958      This is most useful for code that is being generated by tools such
959      as ml-nlffigen (because during development programmers tend to
960      erase the tool's entire output directory tree including CM's cached
961      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
962      revert to the old, broken behavior of SML/NJ, but in specific cases
963      where there is no danger of interface confusion, its use is ok
964      (I think).
965    
966      ml-nlffigen by default generates "noguid" annotations.  They can be
967      turned off by specifying -guid in its command line.
968    
969    ----------------------------------------------------------------------
970    Name: Lal George
971    Date: 2002/03/12 12 14:42:36 EST
972    Tag: george-20020312-frequency-computation
973    Description:
974    
975    Integrated jump chaining and static block frequency into the
976    compiler. More details and numbers later.
977    
978    ----------------------------------------------------------------------
979    Name: Lal George
980    Date: 2002/03/11 11 22:38:53 EST
981    Tag: george-20020311-jump-chain-elim
982    Description:
983    
984    Tested the jump chain elimination on all architectures (except the
985    hppa).  This is on by default right now and is profitable for the
986    alpha and x86, however, it may not be profitable for the sparc and ppc
987    when compiling the compiler.
988    
989    The gc test will typically jump to a label at the end of the cluster,
990    where there is another jump to an external cluster containing the actual
991    code to invoke gc. This is to allow factoring of common gc invocation
992    sequences. That is to say, we generate:
993    
994            f:
995               testgc
996               ja   L1      % jump if above to L1
997    
998            L1:
999               jmp L2
1000    
1001    
1002    After jump chain elimination the 'ja L1' instructions is converted to
1003    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
1004    up being implemented in their long form (if L2 is far away) using:
1005    
1006            jbe     L3      % jump if below or equal to L3
1007            jmp     L2
1008         L3:
1009            ...
1010    
1011    
1012    For large compilation units L2  may be far away.
1013    
1014    
1015    ----------------------------------------------------------------------
1016    Name: Matthias Blume
1017    Date: 2002/03/11 13:30:00 EST
1018    Tag: blume-20020311-mltreeeval
1019    Description:
1020    
1021    A functor parameter was missing.
1022    
1023    ----------------------------------------------------------------------
1024    Name: Allen Leung
1025    Date: 2002/03/11 10:30:00 EST
1026    Tag: leunga-20020311-runtime-string0
1027    Description:
1028    
1029       The representation of the empty string now points to a
1030    legal null terminated C string instead of unit.  It is now possible
1031    to convert an ML string into C string with InlineT.CharVector.getData.
1032    This compiles into one single machine instruction.
1033    
1034    ----------------------------------------------------------------------
1035    Name: Allen Leung
1036    Date: 2002/03/10 23:55:00 EST
1037    Tag: leunga-20020310-x86-call
1038    Description:
1039    
1040       Added machine generation for CALL instruction (relative displacement mode)
1041    
1042    ----------------------------------------------------------------------
1043    Name: Matthias Blume
1044    Date: 2002/03/08 16:05:00
1045    Tag: blume-20020308-entrypoints
1046    Description:
1047    
1048    Version number bumped to 110.39.1.  NEW BOOTFILES!
1049    
1050    Entrypoints: non-zero offset into a code object where execution should begin.
1051    
1052    - Added the notion of an entrypoint to CodeObj.
1053    - Added reading/writing of entrypoint info to Binfile.
1054    - Made runtime system bootloader aware of entrypoints.
1055    - Use the address of the label of the first function given to mlriscGen
1056      as the entrypoint.  This address is currently always 0, but it will
1057      not be 0 once we turn on block placement.
1058    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
1059      with entry points) from mlriscGen.
1060    
1061    ----------------------------------------------------------------------
1062    Name: Allen Leung
1063    Date: 2002/03/07 20:45:00 EST
1064    Tag: leunga-20020307-x86-cmov
1065    Description:
1066    
1067       Bug fixes for CMOVcc on x86.
1068    
1069       1. Added machine code generation for CMOVcc
1070       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
1071       3. CMOVcc cannot have an immediate operand as argument.
1072    
1073    ----------------------------------------------------------------------
1074    Name: Matthias Blume
1075    Date: 2002/03/07 16:15:00 EST
1076    Tag: blume-20020307-controls
1077    Description:
1078    
1079    This is a very large but mostly boring patch which makes (almost)
1080    every tuneable compiler knob (i.e., pretty much everything under
1081    Control.* plus a few other things) configurable via both the command
1082    line and environment variables in the style CM did its configuration
1083    until now.
1084    
1085    Try starting sml with '-h' (or, if you are brave, '-H')
1086    
1087    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
1088    implements the underlying generic mechanism.
1089    
1090    The interface to some of the existing such facilities has changed somewhat.
1091    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
1092    (The getFoo interface is still there for backward-compatibility, but its
1093    use is deprecated.)
1094    
1095    The ml-build script passes -Cxxx=yyy command-line arguments through so
1096    that one can now twiddle the compiler settings when using this "batch"
1097    compiler.
1098    
1099    TODO items:
1100    
1101    We should go through and throw out all controls that are no longer
1102    connected to anything.  Moreover, we should go through and provide
1103    meaningful (and correct!) documentation strings for those controls
1104    that still are connected.
1105    
1106    Currently, multiple calls to Controls.new are accepted (only the first
1107    has any effect).  Eventually we should make sure that every control
1108    is being made (via Controls.new) exactly once.  Future access can then
1109    be done using Controls.acc.
1110    
1111    Finally, it would probably be a good idea to use the getter-setter
1112    interface to controls rather than ref cells.  For the time being, both
1113    styles are provided by the Controls module, but getter-setter pairs are
1114    better if thread-safety is of any concern because they can be wrapped.
1115    
1116    *****************************************
1117    
1118    One bug fix: The function blockPlacement in three of the MLRISC
1119    backpatch files used to be hard-wired to one of two possibilities at
1120    link time (according to the value of the placementFlag).  But (I
1121    think) it should rather sense the flag every time.
1122    
1123    *****************************************
1124    
1125    Other assorted changes (by other people who did not supply a HISTORY entry):
1126    
1127    1. the cross-module inliner now works much better (Monnier)
1128    2. representation of weights, frequencies, and probabilities in MLRISC
1129       changed in preparation of using those for weighted block placement
1130       (Reppy, George)
1131    
1132    ----------------------------------------------------------------------
1133    Name: Lal George
1134    Date: 2002/03/07 14:44:24 EST 2002
1135    Tag: george-20020307-weighted-block-placement
1136    
1137    Tested the weighted block placement optimization on all architectures
1138    (except the hppa) using AMPL to generate the block and edge frequencies.
1139    Changes were required in the machine properties to correctly
1140    categorize trap instructions. There is an MLRISC flag
1141    "weighted-block-placement" that can be used to enable weighted block
1142    placement, but this will be ineffective without block/edge
1143    frequencies (coming soon).
1144    
1145    
1146    ----------------------------------------------------------------------
1147    Name: Lal George
1148    Date: 2002/03/05 17:24:48 EST
1149    Tag: george-20020305-linkage-cluster
1150    
1151    In order to support the block placement optimization, a new cluster
1152    is generated as the very first cluster (called the linkage cluster).
1153    It contains a single jump to the 'real' entry point for the compilation
1154    unit. Block placement has no effect on the linkage cluster itself, but
1155    all the other clusters  have full freedom in the manner in which they
1156    reorder blocks or functions.
1157    
1158    On the x86 the typical linkage code that is generated is:
1159       ----------------------
1160            .align 2
1161       L0:
1162            addl    $L1-L0, 72(%esp)
1163            jmp     L1
1164    
1165    
1166            .align  2
1167       L1:
1168       ----------------------
1169    
1170    72(%esp) is the memory location for the stdlink register. This
1171    must contain the address of the CPS function being called. In the
1172    above example, it contains the address of  L0; before
1173    calling L1 (the real entry point for the compilation unit), it
1174    must contain the address for L1, and hence
1175    
1176            addl $L1-L0, 72(%esp)
1177    
1178    I have tested this on all architectures except the hppa.The increase
1179    in code size is of course negligible
1180    
1181    ----------------------------------------------------------------------
1182    Name: Allen Leung
1183    Date: 2002/03/03 13:20:00 EST
1184    Tag: leunga-20020303-mlrisc-tools
1185    
1186      Added #[ ... ] expressions to mlrisc tools
1187    
1188    ----------------------------------------------------------------------
1189  Name: Matthias Blume  Name: Matthias Blume
1190  Date: 2002/02/27 12:29:00 EST  Date: 2002/02/27 12:29:00 EST
1191  Tag: blume-20020227-cdebug  Tag: blume-20020227-cdebug
# Line 134  Line 1307 
1307         TOTAL                                   2375.26u  57.21s  48.00g         TOTAL                                   2375.26u  57.21s  48.00g
1308    
1309  As you can see the old cps spill module suffers from some serious  As you can see the old cps spill module suffers from some serious
1310  performance problem but since I cannot decipher the old code fully,  performance problem.  But since I cannot decipher the old code fully,
1311  innstead of patching the problems up, I'm reimplementing it  instead of patching the problems up, I'm reimplementing it
1312  with a different algorithm.  The new code is more modular,  with a different algorithm.  The new code is more modular,
1313  smaller when compiled, and substantially faster  smaller when compiled, and substantially faster
1314  (O(n log n) time and O(n) space).  Timing of the new spill module:  (O(n log n) time and O(n) space).  Timing of the new spill module:

Legend:
Removed from v.1098  
changed lines
  Added in v.1337

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