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 987, Wed Nov 21 21:14:44 2001 UTC revision 1174, Sat Mar 23 21:14:40 2002 UTC
# Line 8  Line 8 
8  The form of an entry should be:  The form of an entry should be:
9    
10  Name:  Name:
11  Date:  Date: yyyy/mm/dd
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Allen Leung
17    Date: 2002/03/23 15:50:00 EST
18    Tag: leunga-20020323-flint-cps-rcc-primops
19    Description:
20    
21      1. Changes to FLINT primops:
22    
23        (* make a call to a C-function;
24         * The primop carries C function prototype information and specifies
25         * which of its (ML-) arguments are floating point. C prototype
26         * information is for use by the backend, ML information is for
27         * use by the CPS converter. *)
28      | RAW_CCALL of { c_proto: CTypes.c_proto,
29                       ml_args: ccall_type list,
30                       ml_res_opt: ccall_type option,
31                       reentrant : bool
32                     } option
33       (* Allocate uninitialized storage on the heap.
34        * The record is meant to hold short-lived C objects, i.e., they
35        * are not ML pointers.  With the tag, the representation is
36        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
37        *)
38      | RAW_RECORD of {tag:bool,sz:int}
39      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
40    
41      2.  These CPS primops are now overloaded:
42    
43           rawload of {kind:numkind}
44           rawstore of {kind:numkind}
45    
46          The one argument form is:
47    
48             rawload {kind} address
49    
50          The two argument form is:
51    
52             rawload {kind} [ml object, byte-offset]
53    
54      3. RAW_CCALL/RCC now takes two extra arguments:
55    
56         a. The first is whether the C call is reentrant, i.e., whether
57            ML state should be saved and restored.
58         b. The second argument is a string argument specifying the name of
59            library and the C function.
60    
61         These things are currently not handled in the code generator, yet.
62    
63      4. In CProto,
64    
65         An encoding type of "bool" means "ml object" and is mapped into
66         C prototype of PTR.  Note that "bool" is different than "string",
67         even though "string" is also mapped into PTR, because "bool"
68         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
69    
70      5. Pickler/unpicker
71    
72         Changed to handle RAW_RECORD and newest RAW_CCALL
73    
74      6. MLRiscGen,
75    
76         1. Changed to handle the new rawload/rawstore/rawrecord operators.
77         2. Code for handling C Calls has been moved to a new module CPSCCalls,
78            in the file CodeGen/cpscompile/cps-c-calls.sml
79    
80      7. Added the conditional move operator
81    
82             condmove of branch
83    
84         to cps.  Generation of this is still buggy so it is currently
85         disabled.
86    
87    ----------------------------------------------------------------------
88    Name: Lal George
89    Date: 2002/03/22 14:18:25 EST
90    Tag: george-20020322-cps-branch-prob
91    Description:
92    
93    Implemented the Ball-Larus branch prediction-heuristics, and
94    incorporated graphical viewers for control flow graphs.
95    
96    Ball-Larus Heuristics:
97    ---------------------
98    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
99    
100    By design it uses the Dempster-Shafer theory for combining
101    probabilities.  For example, in the function:
102    
103        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
104    
105    the ball-larus heuristics predicts that the n=0 is unlikely
106    (OH-heuristic), and the 'then' branch is unlikely because of the
107    RH-heuristic -- giving the 'then' branch an even lower combined
108    probability using the Dempster-Shafer theory.
109    
110    Finally, John Reppy's loop analysis in MLRISC, further lowers the
111    probability of the 'then' branch because of the loop in the else
112    branch.
113    
114    
115    Graphical Viewing:
116    ------------------
117    I merely plugged in Allen's graphical viewers into the compiler. The
118    additional code is not much. At the top level, saying:
119    
120            Control.MLRISC.getFlag "cfg-graphical-view" := true;
121    
122    will display the graphical view of the control flow graph just before
123    back-patching.  daVinci must be in your path for this to work. If
124    daVinci is not available, then the default viewer can be changed
125    using:
126    
127            Control.MLRISC.getString "viewer"
128    
129    which can be set to "dot" or "vcg" for the corresponding viewers. Of
130    course, these viewers must be in your path.
131    
132    The above will display the compilation unit at the level of clusters,
133    many of which are small, boring, and un-interesting. Also setting:
134    
135            Control.MLRISC.getInt "cfg-graphical-view_size"
136    
137    will display clusters that are larger than the value set by the above.
138    
139    
140    ----------------------------------------------------------------------
141    Name: Matthias Blume
142    Date: 2002/03/21 22:20:00 EST
143    Tag: blume-20020321-kmp-bugfix
144    Description:
145    
146    Changed the interface to the KMP routine in PreString and fixed
147    a minor bug in one place where it was used.
148    
149    ----------------------------------------------------------------------
150    Name: Allen Leung
151    Date: 2002/03/21 20:30:00 EST
152    Tag: leunga-20020321-cfg
153    Description:
154    
155      Fixed a potential problem in cfg edge splitting.
156    
157    ----------------------------------------------------------------------
158    Name: Allen Leung
159    Date: 2002/03/21 17:15:00 EST
160    Tag: leunga-20020321-x86-fp-cfg
161    Description:
162    
163      1. Recoded the buggy parts of x86-fp.
164    
165         a. All the block reordering code has been removed.
166            We now depend on the block placement phases to do this work.
167    
168         b. Critical edge splitting code has been simplified and moved into the
169            CFG modules, as where they belong.
170    
171         Both of these were quite buggy and complex.  The code is now much, much
172         simpler.
173    
174      2. X86 backend.
175    
176         a. Added instructions for 64-bit support.  Instruction selection for
177            64-bit has not been committed, however, since that
178            requires changes to MLTREE which haven't been approved by
179            Lal and John.
180    
181         b. Added support for FUCOMI and FUCOMIP when generating code for
182            PentiumPro and above.  We only generate these instructions in
183            the fast-fp mode.
184    
185         c. Added cases for JP and JNP in X86FreqProps.
186    
187      3. CFG
188    
189         CFG now has a bunch of methods for edge splitting and merging.
190    
191      4. Machine description.
192    
193         John's simplification of MLTREE_BASIS.fcond broke a few machine
194         description things:
195    
196         rtl-build.{sig,sml} and hppa.mdl fixed.
197    
198         NOTE: the machine description stuff in the repository is still broken.
199               Again, I can't put my fixes in because that involves
200               changes to MLTREE.
201    
202    ----------------------------------------------------------------------
203    Name: Matthias Blume
204    Date: 2002/03/20 15:55:00 EST
205    Tag: blume-20020320-kmp
206    Description:
207    
208    Implemented Knuth-Morris-Pratt string matching in PreString and used
209    it for String.isSubstring, Substring.isSubstring, and
210    Substring.position.
211    
212    (Might need some stress-testing.  Simple examples worked fine.)
213    
214    ----------------------------------------------------------------------
215    Name: Matthias Blume
216    Date: 2002/03/19 16:37:00 EST
217    Tag: blume-20020319-witnesses
218    Description:
219    
220    Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
221    
222    This implements a generic mechanism for changing constness qualifiers
223    anywhere within big C types without resorting to outright "casts".
224    (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you
225    modify the constness at the outermost level.)
226    The implementation of "convert" is based on the idea of "witness"
227    values -- values that are not used by the operation but whose types
228    "testify" to their applicability.  On the implementation side, "convert"
229    is simply a projection (returning its second curried argument).  With
230    cross-module inlining, it should not result in any machine code being
231    generated.
232    
233    ----------------------------------------------------------------------
234    Name: Matthias Blume
235    Date: 2002/03/15 16:40:00 EST
236    Tag: blume-20020315-basis
237    Description:
238    
239    Provided (preliminary?) implementations for
240    
241      {String,Substring}.{concatWith,isSuffix,isSubstring}
242    
243    and
244    
245      Substring.full
246    
247    Those are in the Basis spec but they were missing in SML/NJ.
248    
249    ----------------------------------------------------------------------
250    Name: Matthias Blume
251    Date: 2002/03/14 21:30:00 EST
252    Tag: blume-20020314-controls
253    Description:
254    
255    Controls:
256    ---------
257    
258    1. Factored out the recently-added Controls : CONTROLS stuff and put
259       it into its own library $/controls-lib.cm.  The source tree for
260       this is under src/smlnj-lib/Controls.
261    
262    2. Changed the names of types and functions in this interface, so they
263       make a bit more "sense":
264    
265          module -> registry
266          'a registry -> 'a group
267    
268    3. The interface now deals in ref cells only.  The getter/setter interface
269       is (mostly) gone.
270    
271    4. Added a function that lets one register an already-existing ref cell.
272    
273    5. Made the corresponding modifications to the rest of the code so that
274       everything compiles again.
275    
276    6. Changed the implementation of Controls.MLRISC back to something closer
277       to the original.  In particular, this module (and therefore MLRISC)
278       does not depend on Controls.  There now is some link-time code in
279       int-sys.sml that registers the MLRISC controls with the Controls
280       module.
281    
282    CM:
283    ---
284    
285      * One can now specify the lambda-split aggressiveness in init.cmi.
286    
287    ----------------------------------------------------------------------
288    Name: Allen Leung
289    Date: 2002/03/13 17:30:00 EST
290    Tag: leunga-20020313-x86-fp-unary
291    Description:
292    
293    Bug fix for:
294    
295    > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml
296    > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002
297    > - fun f(x,(y,z)) = Real.~ y;
298    > [autoloading]
299    > [autoloading done]
300    >       fchsl   (%eax), 184(%esp)
301    > Error: MLRisc bug: X86MCEmitter.emitInstr
302    >
303    > uncaught exception Error
304    >   raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
305    
306    The problem was that the code generator did not generate any fp registers
307    in this case, and the ra didn't know that it needed to run the X86FP phase to
308    translate the pseudo fp instruction.   This only happened with unary fp
309    operators in certain situations.
310    
311    ----------------------------------------------------------------------
312    Name: Matthias Blume
313    Date: 2002/03/13 14:00:00 EST
314    Tag: blume-20020313-overload-etc
315    Description:
316    
317    1. Added _overload as a synonym for overload for backward compatibility.
318       (Control.overloadKW must be true for either version to be accepted.)
319    
320    2. Fixed bug in install script that caused more things to be installed
321       than what was requested in config/targets.
322    
323    3. Made CM aware of the (_)overload construct so that autoloading
324       works.
325    
326    ----------------------------------------------------------------------
327    Name: Matthias Blume
328    Date: 2002/03/12 22:03:00 EST
329    Tag: blume-20020312-url
330    Description:
331    
332    Forgot to update BOOT and srcarchiveurl.
333    
334    ----------------------------------------------------------------------
335    Name: Matthias Blume
336    Date: 2002/03/12 17:30:00 EST
337    Tag: blume-20020312-version110392
338    Description:
339    
340    Yet another version number bump (because of small changes to the
341    binfile format).  Version number is now 110.39.2.  NEW BOOTFILES!
342    
343    Changes:
344    
345      The new pid generation scheme described a few weeks ago was overly
346      complicated.  I implemented a new mechanism that is simpler and
347      provides a bit more "stability":  Once CM has seen a compilation
348      unit, it keeps its identity constant (as long as you do not delete
349      those crucial CM/GUID/* files).  This means that when you change
350      an interface, compile, then go back to the old interface, and
351      compile again, you arrive at the original pid.
352    
353      There now also is a mechanism that instructs CM to use the plain
354      environment hash as a module's pid (effectively making its GUID
355      the empty string).  For this, "noguid" must be specified as an
356      option to the .sml file in question within its .cm file.
357      This is most useful for code that is being generated by tools such
358      as ml-nlffigen (because during development programmers tend to
359      erase the tool's entire output directory tree including CM's cached
360      GUIDs).  "noguid" is somewhat dangerous (since it can be used to locally
361      revert to the old, broken behavior of SML/NJ, but in specific cases
362      where there is no danger of interface confusion, its use is ok
363      (I think).
364    
365      ml-nlffigen by default generates "noguid" annotations.  They can be
366      turned off by specifying -guid in its command line.
367    
368    ----------------------------------------------------------------------
369    Name: Lal George
370    Date: 2002/03/12 12 14:42:36 EST
371    Tag: george-20020312-frequency-computation
372    Description:
373    
374    Integrated jump chaining and static block frequency into the
375    compiler. More details and numbers later.
376    
377    ----------------------------------------------------------------------
378    Name: Lal George
379    Date: 2002/03/11 11 22:38:53 EST
380    Tag: george-20020311-jump-chain-elim
381    Description:
382    
383    Tested the jump chain elimination on all architectures (except the
384    hppa).  This is on by default right now and is profitable for the
385    alpha and x86, however, it may not be profitable for the sparc and ppc
386    when compiling the compiler.
387    
388    The gc test will typically jump to a label at the end of the cluster,
389    where there is another jump to an external cluster containing the actual
390    code to invoke gc. This is to allow factoring of common gc invocation
391    sequences. That is to say, we generate:
392    
393            f:
394               testgc
395               ja   L1      % jump if above to L1
396    
397            L1:
398               jmp L2
399    
400    
401    After jump chain elimination the 'ja L1' instructions is converted to
402    'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end
403    up being implemented in their long form (if L2 is far away) using:
404    
405            jbe     L3      % jump if below or equal to L3
406            jmp     L2
407         L3:
408            ...
409    
410    
411    For large compilation units L2  may be far away.
412    
413    
414    ----------------------------------------------------------------------
415    Name: Matthias Blume
416    Date: 2002/03/11 13:30:00 EST
417    Tag: blume-20020311-mltreeeval
418    Description:
419    
420    A functor parameter was missing.
421    
422    ----------------------------------------------------------------------
423    Name: Allen Leung
424    Date: 2002/03/11 10:30:00 EST
425    Tag: leunga-20020311-runtime-string0
426    Description:
427    
428       The representation of the empty string now points to a
429    legal null terminated C string instead of unit.  It is now possible
430    to convert an ML string into C string with InlineT.CharVector.getData.
431    This compiles into one single machine instruction.
432    
433    ----------------------------------------------------------------------
434    Name: Allen Leung
435    Date: 2002/03/10 23:55:00 EST
436    Tag: leunga-20020310-x86-call
437    Description:
438    
439       Added machine generation for CALL instruction (relative displacement mode)
440    
441    ----------------------------------------------------------------------
442    Name: Matthias Blume
443    Date: 2002/03/08 16:05:00
444    Tag: blume-20020308-entrypoints
445    Description:
446    
447    Version number bumped to 110.39.1.  NEW BOOTFILES!
448    
449    Entrypoints: non-zero offset into a code object where execution should begin.
450    
451    - Added the notion of an entrypoint to CodeObj.
452    - Added reading/writing of entrypoint info to Binfile.
453    - Made runtime system bootloader aware of entrypoints.
454    - Use the address of the label of the first function given to mlriscGen
455      as the entrypoint.  This address is currently always 0, but it will
456      not be 0 once we turn on block placement.
457    - Removed the linkage cluster code (which was The Other Way(tm) of dealing
458      with entry points) from mlriscGen.
459    
460    ----------------------------------------------------------------------
461    Name: Allen Leung
462    Date: 2002/03/07 20:45:00 EST
463    Tag: leunga-20020307-x86-cmov
464    Description:
465    
466       Bug fixes for CMOVcc on x86.
467    
468       1. Added machine code generation for CMOVcc
469       2. CMOVcc is now generated in preference over SETcc on PentiumPro or above.
470       3. CMOVcc cannot have an immediate operand as argument.
471    
472    ----------------------------------------------------------------------
473    Name: Matthias Blume
474    Date: 2002/03/07 16:15:00 EST
475    Tag: blume-20020307-controls
476    Description:
477    
478    This is a very large but mostly boring patch which makes (almost)
479    every tuneable compiler knob (i.e., pretty much everything under
480    Control.* plus a few other things) configurable via both the command
481    line and environment variables in the style CM did its configuration
482    until now.
483    
484    Try starting sml with '-h' (or, if you are brave, '-H')
485    
486    To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which
487    implements the underlying generic mechanism.
488    
489    The interface to some of the existing such facilities has changed somewhat.
490    For example, the MLRiscControl module now provides mkFoo instead of getFoo.
491    (The getFoo interface is still there for backward-compatibility, but its
492    use is deprecated.)
493    
494    The ml-build script passes -Cxxx=yyy command-line arguments through so
495    that one can now twiddle the compiler settings when using this "batch"
496    compiler.
497    
498    TODO items:
499    
500    We should go through and throw out all controls that are no longer
501    connected to anything.  Moreover, we should go through and provide
502    meaningful (and correct!) documentation strings for those controls
503    that still are connected.
504    
505    Currently, multiple calls to Controls.new are accepted (only the first
506    has any effect).  Eventually we should make sure that every control
507    is being made (via Controls.new) exactly once.  Future access can then
508    be done using Controls.acc.
509    
510    Finally, it would probably be a good idea to use the getter-setter
511    interface to controls rather than ref cells.  For the time being, both
512    styles are provided by the Controls module, but getter-setter pairs are
513    better if thread-safety is of any concern because they can be wrapped.
514    
515    *****************************************
516    
517    One bug fix: The function blockPlacement in three of the MLRISC
518    backpatch files used to be hard-wired to one of two possibilities at
519    link time (according to the value of the placementFlag).  But (I
520    think) it should rather sense the flag every time.
521    
522    *****************************************
523    
524    Other assorted changes (by other people who did not supply a HISTORY entry):
525    
526    1. the cross-module inliner now works much better (Monnier)
527    2. representation of weights, frequencies, and probabilities in MLRISC
528       changed in preparation of using those for weighted block placement
529       (Reppy, George)
530    
531    ----------------------------------------------------------------------
532    Name: Lal George
533    Date: 2002/03/07 14:44:24 EST 2002
534    Tag: george-20020307-weighted-block-placement
535    
536    Tested the weighted block placement optimization on all architectures
537    (except the hppa) using AMPL to generate the block and edge frequencies.
538    Changes were required in the machine properties to correctly
539    categorize trap instructions. There is an MLRISC flag
540    "weighted-block-placement" that can be used to enable weighted block
541    placement, but this will be ineffective without block/edge
542    frequencies (coming soon).
543    
544    
545    ----------------------------------------------------------------------
546    Name: Lal George
547    Date: 2002/03/05 17:24:48 EST
548    Tag: george-20020305-linkage-cluster
549    
550    In order to support the block placement optimization, a new cluster
551    is generated as the very first cluster (called the linkage cluster).
552    It contains a single jump to the 'real' entry point for the compilation
553    unit. Block placement has no effect on the linkage cluster itself, but
554    all the other clusters  have full freedom in the manner in which they
555    reorder blocks or functions.
556    
557    On the x86 the typical linkage code that is generated is:
558       ----------------------
559            .align 2
560       L0:
561            addl    $L1-L0, 72(%esp)
562            jmp     L1
563    
564    
565            .align  2
566       L1:
567       ----------------------
568    
569    72(%esp) is the memory location for the stdlink register. This
570    must contain the address of the CPS function being called. In the
571    above example, it contains the address of  L0; before
572    calling L1 (the real entry point for the compilation unit), it
573    must contain the address for L1, and hence
574    
575            addl $L1-L0, 72(%esp)
576    
577    I have tested this on all architectures except the hppa.The increase
578    in code size is of course negligible
579    
580    ----------------------------------------------------------------------
581    Name: Allen Leung
582    Date: 2002/03/03 13:20:00 EST
583    Tag: leunga-20020303-mlrisc-tools
584    
585      Added #[ ... ] expressions to mlrisc tools
586    
587    ----------------------------------------------------------------------
588    Name: Matthias Blume
589    Date: 2002/02/27 12:29:00 EST
590    Tag: blume-20020227-cdebug
591    Description:
592    
593    - made types in structure C and C_Debug to be equal
594    - got rid of code duplication (c-int.sml vs. c-int-debug.sml)
595    - there no longer is a C_Int_Debug (C_Debug is directly derived from C)
596    
597    ----------------------------------------------------------------------
598    Name: Matthias Blume
599    Date: 2002/02/26 12:00:00 EST
600    Tag: blume-20020226-ffi
601    Description:
602    
603    1. Fixed a minor bug in CM's "noweb" tool:
604       If numbering is turned off, then truly don't number (i.e., do not
605       supply the -L option to noweb).  The previous behavior was to supply
606       -L'' -- which caused noweb to use the "default" line numbering scheme.
607       Thanks to Chris Richards for pointing this out (and supplying the fix).
608    
609    2. Once again, I reworked some aspects of the FFI:
610    
611       A. The incomplete/complete type business:
612    
613       - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are
614         gone!
615       - ML types representing an incomplete type are now *equal* to
616         ML types representing their corresponding complete types (just like
617         in C).  This is still safe because ml-nlffigen will not generate
618         RTTI for incomplete types, nor will it generate functions that
619         require access to such RTTI.   But when ML code generated from both
620         incomplete and complete versions of the C type meet, the ML types
621         are trivially interoperable.
622    
623         NOTE:  These changes restore the full generality of the translation
624         (which was previously lost when I eliminated functorization)!
625    
626       B. Enum types:
627    
628       - Structure C now has a type constructor "enum" that is similar to
629         how the "su" constructor works.  However, "enum" is not a phantom
630         type because each "T enum" has values (and is isomorphic to
631         MLRep.Signed.int).
632       - There are generic access operations for enum objects (using
633         MLRep.Signed.int).
634       - ml-nlffigen will generate a structure E_foo for each "enum foo".
635         * The structure contains the definition of type "mlrep" (the ML-side
636         representation type of the enum).  Normally, mlrep is the same
637         as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec",
638         then mlrep will be defined as a datatype -- thus facilitating
639         pattern matching on mlrep values.
640         ("-ec" will be suppressed if there are duplicate values in an
641          enumeration.)
642         * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep
643         will be generated for each C enum constant xxx.
644         * Conversion functions m2i and i2m convert between mlrep and
645         MLRep.Signed.int.  (Without "-ec", these functions are identities.)
646         * Coversion functions c and ml convert between mlrep and "tag enum".
647         * Access functions (get/set) fetch and store mlrep values.
648       - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed
649         enumerations are merged into one single enumeration represented by
650         structure E_'.
651    
652    ----------------------------------------------------------------------
653    Name: Allen Leung
654    Date: 2002/02/25 04:45:00 EST
655    Tag: leunga-20020225-cps-spill
656    
657    This is a new implementation of the CPS spill phase.
658    The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml
659    In case of problems, replace it with the old file spill.sml
660    
661    The current compiler runs into some serious performance problems when
662    constructing a large record.  This can happen when we try to compile a
663    structure with many items.  Even a very simple structure like the following
664    makes the compiler slow down.
665    
666        structure Foo = struct
667           val x_1 = 0w1 : Word32.int
668           val x_2 = 0w2 : Word32.int
669           val x_3 = 0w3 : Word32.int
670           ...
671           val x_N = 0wN : Word32.int
672        end
673    
674    The following table shows the compile time, from N=1000 to N=4000,
675    with the old compiler:
676    
677    N
678    1000   CPS 100 spill                           0.04u  0.00s  0.00g
679           MLRISC ra                               0.06u  0.00s  0.05g
680              (spills = 0 reloads = 0)
681           TOTAL                                   0.63u  0.07s  0.21g
682    
683    1100   CPS 100 spill                           8.25u  0.32s  0.64g
684           MLRISC ra                               5.68u  0.59s  3.93g
685              (spills = 0 reloads = 0)
686           TOTAL                                   14.71u  0.99s  4.81g
687    
688    1500   CPS 100 spill                           58.55u  2.34s  1.74g
689           MLRISC ra                               5.54u  0.65s  3.91g
690              (spills = 543 reloads = 1082)
691           TOTAL                                   65.40u  3.13s  6.00g
692    
693    2000   CPS 100 spill                           126.69u  4.84s  3.08g
694           MLRISC ra                               0.80u  0.10s  0.55g
695              (spills = 42 reloads = 84)
696           TOTAL                                   129.42u  5.10s  4.13g
697    
698    3000   CPS 100 spill                           675.59u  19.03s  11.64g
699           MLRISC ra                               2.69u  0.27s  1.38g
700              (spills = 62 reloads = 124)
701           TOTAL                                   682.48u  19.61s  13.99g
702    
703    4000   CPS 100 spill                           2362.82u  56.28s  43.60g
704           MLRISC ra                               4.96u  0.27s  2.72g
705              (spills = 85 reloads = 170)
706           TOTAL                                   2375.26u  57.21s  48.00g
707    
708    As you can see the old cps spill module suffers from some serious
709    performance problem.  But since I cannot decipher the old code fully,
710    instead of patching the problems up, I'm reimplementing it
711    with a different algorithm.  The new code is more modular,
712    smaller when compiled, and substantially faster
713    (O(n log n) time and O(n) space).  Timing of the new spill module:
714    
715    4000  CPS 100 spill                           0.02u  0.00s  0.00g
716          MLRISC ra                               0.25u  0.02s  0.15g
717             (spills=1 reloads=3)
718          TOTAL                                   7.74u  0.34s  1.62g
719    
720    Implementation details:
721    
722    As far as I can tell, the purpose of the CPS spill module is to make sure the
723    number of live variables at any program point (the bandwidth)
724    does not exceed a certain limit, which is determined by the
725    size of the spill area.
726    
727    When the bandwidth is too large, we decrease the register pressure by
728    packing live variables into spill records.  How we achieve this is
729    completely different than what we did in the old code.
730    
731    First, there is something about the MLRiscGen code generator
732    that we should be aware of:
733    
734    o MLRiscGen performs code motion!
735    
736       In particular, it will move floating point computations and
737       address computations involving only the heap pointer to
738       their use sites (if there is only a single use).
739       What this means is that if we have a CPS record construction
740       statement
741    
742           RECORD(k,vl,w,e)
743    
744       we should never count the new record address w as live if w
745       has only one use (which is often the case).
746    
747       We should do something similar to floating point, but the transformation
748       there is much more complex, so I won't deal with that.
749    
750    Secondly, there are now two new cps primops at our disposal:
751    
752     1. rawrecord of record_kind option
753        This pure operator allocates some uninitialized storage from the heap.
754        There are two forms:
755    
756         rawrecord NONE [INT n]  allocates a tagless record of length n
757         rawrecord (SOME rk) [INT n] allocates a tagged record of length n
758                                     and initializes the tag.
759    
760     2. rawupdate of cty
761          rawupdate cty (v,i,x)
762          Assigns to x to the ith component of record v.
763          The storelist is not updated.
764    
765    We use these new primops for both spilling and increment record construction.
766    
767     1. Spilling.
768    
769        This is implemented with a linear scan algorithm (but generalized
770        to trees).  The algorithm will create a single spill record at the
771        beginning of the cps function and use rawupdate to spill to it,
772        and SELECT or SELp to reload from it.  So both spills and reloads
773        are fine-grain operations.  In contrast, in the old algorithm
774        "spills" have to be bundled together in records.
775    
776        Ideally, we should sink the spill record construction to where
777        it is needed.  We can even split the spill record into multiple ones
778        at the places where they are needed.  But CPS is not a good
779        representation for global code motion, so I'll keep it simple and
780        am not attempting this.
781    
782     2. Incremental record construction (aka record splitting).
783    
784        Long records with many component values which are simulatenously live
785        (recall that single use record addresses are not considered to
786         be live) are constructed with rawrecord and rawupdate.
787        We allocate space on the heap with rawrecord first, then gradually
788        fill it in with rawupdate.  This is the technique suggested to me
789        by Matthias.
790    
791        Some restrictions on when this is applicable:
792        1. It is not a VECTOR record.  The code generator currently does not handle
793           this case. VECTOR record uses double indirection like arrays.
794        2. All the record component values are defined in the same "basic block"
795           as the record constructor.  This is to prevent speculative
796           record construction.
797    
798    ----------------------------------------------------------------------
799    Name: Allen Leung
800    Date: 2002/02/22 01:02:00 EST
801    Tag: leunga-20020222-mlrisc-tools
802    
803    Minor bug fixes in the parser and rewriter
804    
805    ----------------------------------------------------------------------
806    Name: Allen Leung
807    Date: 2002/02/21 20:20:00 EST
808    Tag: leunga-20020221-peephole
809    
810    Regenerated the peephole files.  Some contained typos in the specification
811    and some didn't compile because of pretty printing bugs in the old version
812    of 'nowhere'.
813    
814    ----------------------------------------------------------------------
815    Name: Allen Leung
816    Date: 2002/02/19 20:20:00 EST
817    Tag: leunga-20020219-mlrisc-tools
818    Description:
819    
820       Minor bug fixes to the mlrisc-tools library:
821    
822       1.  Fixed up parsing colon suffixed keywords
823       2.  Added the ability to shut the error messages up
824       3.  Reimplemented the pretty printer and fixed up/improved
825           the pretty printing of handle and -> types.
826       4.  Fixed up generation of literal symbols in the nowhere tool.
827       5.  Added some SML keywords to to sml.sty
828    
829    ----------------------------------------------------------------------
830    Name: Matthias Blume
831    Date: 2002/02/19 16:20:00 EST
832    Tag: blume-20020219-cmffi
833    Description:
834    
835    A wild mix of changes, some minor, some major:
836    
837    * All C FFI-related libraries are now anchored under $c:
838        $/c.cm      --> $c/c.cm
839        $/c-int.cm  --> $c/internals/c-int.cm
840        $/memory.cm --> $c/memory/memory.cm
841    
842    * "make" tool (in CM) now treats its argument pathname slightly
843      differently:
844        1. If the native expansion is an absolute name, then before invoking
845           the "make" command on it, CM will apply OS.Path.mkRelative
846           (with relativeTo = OS.FileSys.getDir()) to it.
847        2. The argument will be passed through to subsequent phases of CM
848           processing without "going native".  In particular, if the argument
849           was an anchored path, then "make" will not lose track of that anchor.
850    
851    * Compiler backends now "know" their respective C calling conventions
852      instead of having to be told about it by ml-nlffigen.  This relieves
853      ml-nlffigen from one of its burdens.
854    
855    * The X86Backend has been split into X86CCallBackend and X86StdCallBackend.
856    
857    * Export C_DEBUG and C_Debug from $c/c.cm.
858    
859    * C type encoding in ml-nlffi-lib has been improved to model the conceptual
860      subtyping relationship between incomplete pointers and their complete
861      counterparts.  For this, ('t, 'c) ptr has been changed to 'o ptr --
862      with the convention of instantiating 'o with ('t, 'c) obj whenever
863      the pointer target type is complete.  In the incomplete case, 'o
864      will be instantiated with some "'c iobj" -- a type obtained by
865      using one of the functors PointerToIncompleteType or PointerToCompleteType.
866    
867      Operations that work on both incomplete and complete pointer types are
868      typed as taking an 'o ptr while operations that require the target to
869      be known are typed as taking some ('t, 'c) obj ptr.
870    
871      voidptr is now a bit "more concrete", namely "type voidptr = void ptr'"
872      where void is an eqtype without any values.  This makes it possible
873      to work on voidptr values using functions meant to operate on light
874      incomplete pointers.
875    
876    * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has
877      been vastly simplified.
878    
879    ----------------------------------------------------------------------
880    Name: Matthias Blume
881    Date: 2002/02/19 10:48:00 EST
882    Tag: blume-20020219-pqfix
883    Description:
884    
885    Applied Chris Okasaki's bug fix for priority queues.
886    
887    ----------------------------------------------------------------------
888    Name: Matthias Blume
889    Date: 2002/02/15 17:05:00
890    Tag: Release_110_39
891    Description:
892    
893    Last-minute retagging is becoming a tradition... :-(
894    
895    This is the working release 110.39.
896    
897    ----------------------------------------------------------------------
898    Name: Matthias Blume
899    Date: 2002/02/15 16:00:00 EST
900    Tag: Release_110_39-orig
901    Description:
902    
903    Working release 110.39.  New bootfiles.
904    
905    (Update: There was a small bug in the installer so it wouldn't work
906    with all shells.  So I retagged. -Matthias)
907    
908    ----------------------------------------------------------------------
909    Name: Matthias Blume
910    Date: 2002/02/15 14:17:00 EST
911    Tag: blume-20020215-showbindings
912    Description:
913    
914    Added EnvRef.listBoundSymbols and CM.State.showBindings.  Especially
915    the latter can be useful for exploring what bindings are available at
916    the interactive prompt.  (The first function returns only the list
917    of symbols that are really bound, the second prints those but also the
918    ones that CM's autoloading mechanism knows about.)
919    
920    ----------------------------------------------------------------------
921    Name: Matthias Blume
922    Date: 2002/02/15 12:08:00 EST
923    Tag: blume-20020215-iptrs
924    Description:
925    
926    Two improvements to ml-nlffigen:
927    
928      1. Write files only if they do not exist or if their current contents
929         do not coincide with what's being written.  (That is, avoid messing
930         with the time stamps unless absolutely necessary.)
931    
932      2. Implement a "repository" mechanism for generated files related
933         to "incomplete pointer types".   See the README file for details.
934    
935    ----------------------------------------------------------------------
936    Name: Matthias Blume
937    Date: 2002/02/14 11:50:00 EST
938    Tag: blume-20020214-quote
939    Description:
940    
941    Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm).  This is required
942    because of the new and improved tag generation scheme.  (Thanks to Allen
943    Leung for pointing it out.)
944    
945    ----------------------------------------------------------------------
946    Name: Lal George
947    Date: 2002/02/14 09:55:27 EST 2002
948    Tag: george-20020214-isabelle-bug
949    Description:
950    
951    Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation
952    of Isabelle on the x86.
953    
954    From Allen:
955    -----------
956     I've found the problem:
957    
958         in ra-core.sml, I use the counter "blocked" to keep track of the
959         true number of elements in the freeze queue.  When the counter goes
960         to zero, I skip examining the queue.  But I've messed up the
961         bookkeeping in combine():
962    
963             else ();
964             case !ucol of
965               PSEUDO => (if !cntv > 0 then
966                     (if !cntu > 0 then blocked := !blocked - 1 else ();
967                                        ^^^^^^^^^^^^^^^^^^^^^^^
968                      moveu := mergeMoveList(!movev, !moveu)
969                     )
970                  else ();
971    
972         combine() is called to coalesce two nodes u and v.
973         I think I was thinking that if the move counts of u and v are both
974         greater than zero then after they are coalesced then one node is
975         removed from the freeze queue.  Apparently I was thinking that
976         both u and v are of low degree, but that's clearly not necessarily true.
977    
978    
979    02/12/2002:
980        Here's the patch.  HOL now compiles.
981    
982        I don't know how this impact on performance (compile
983        time or runtime).  This bug caused the RA (especially on the x86)
984        to go thru the potential spill phase when there are still nodes on the
985        freeze queue.
986    
987    
988    
989    
990    ----------------------------------------------------------------------
991    Name: Matthias Blume
992    Date: 2002/02/13 22:40:00 EST
993    Tag: blume-20020213-fptr-rtti
994    Description:
995    
996    Fixed a bug in ml-nlffigen that was introduced with one of the previous
997    updates.
998    
999    ----------------------------------------------------------------------
1000    Name: Matthias Blume
1001    Date: 2002/02/13 16:41:00 EST
1002    Tag: blume-20020213-cmlpq
1003    Description:
1004    
1005    Added new priority queue export symbols (which have just been added to
1006    smlnj-lib.cm) to CML's version of smlnj-lib.cm.  (Otherwise CML would
1007    not compile and the installer would choke.)
1008    
1009    ----------------------------------------------------------------------
1010    Name: Matthias Blume
1011    Date: 2002/02/13 16:15:00 EST
1012    Tag: blume-20020213-various
1013    Description:
1014    
1015    1. More tweaks to ml-nlffigen:
1016    
1017       - better internal datastructures (resulting in slight speedup)
1018       - "-match" option requires exact match
1019       - "localized" gensym counters (untagged structs/unions nested within
1020         other structs/unions or within typedefs get a fresh counter; their
1021         tag will be prefixed by a concatenation of their parents' tags)
1022       - bug fixes (related to calculation of transitive closure of types
1023         to be included in the output)
1024    
1025    2. Minor Basis updates:
1026    
1027       - added implementations for List.collate and Option.app
1028    
1029    ----------------------------------------------------------------------
1030    Name: Matthias Blume
1031    Date: 2002/02/11 15:55:00 EST
1032    Tag: blume-20020211-gensym
1033    Description:
1034    
1035    Added a "-gensym" option to command line of ml-nlffigen.  This can be
1036    used to specify a "stem" -- a string that is inserted in all "gensym'd"
1037    names (ML structure names that correspond to unnamed C structs, unions,
1038    and enums), so that separate runs of ml-nlffigen do not clash.
1039    
1040    ----------------------------------------------------------------------
1041    Name: Matthias Blume
1042    Date: 2002/02/11 12:05:00 EST
1043    Tag: blume-20020211-gensml
1044    Description:
1045    
1046    A quick fix for a problem with GenSML (in the pgraph-util library):
1047    Make generation of toplevel "local" optional.  (Strictly speaking,
1048    signature definitions within "local" are not legal SML.)
1049    
1050    Other than that: updates to INSTALL and cm/TODO.
1051    
1052    ----------------------------------------------------------------------
1053    Name: Matthias Blume
1054    Date: 2002/02/08 15:00:00 EST
1055    Tag: blume-20020208-uniquepid
1056    Description:
1057    
1058    0. Version number has been bumped to 110.38.1.  NEW BOOTFILES!!!
1059    
1060    1. The installer (config/install.sh) has gotten smarter:
1061    
1062         - Configuration options are a bit easier to specify now
1063           (in config/targets).
1064         - Bug in recognizing .tar.bz2 files fixed.
1065         - Installer automatically resolves dependencies between
1066           configuration options (e.g., if you ask for eXene, you will
1067           also get cml -- regardless whether you asked for it or not).
1068         - Installer can run in "quieter mode" by setting the environment
1069           variable INSTALL_QUIETLY to "true".  "Quieter" does not mean
1070           "completely silent", though.
1071         - Build HashCons library as part of smlnj-lib.
1072    
1073    2. A new scheme for assigning persistent identifiers to compilation
1074       units (and, by extension, to types etc.) has been put into place.
1075       This fixes a long-standing bug where types and even dynamic values
1076       can get internally confused, thereby compromising type safety
1077       (abstraction) and dynamic correctness.  See
1078    
1079         http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz
1080    
1081       for an example of how things could go wrong until now.
1082    
1083       The downside of the new scheme is that pids are not quite as
1084       persistent as they used to be: CM will generate a fresh pid
1085       for every compilation unit that it thinks it sees for the first
1086       time.  That means that if you compile starting from a clean, fresh
1087       source tree at two different times, you end up with different
1088       binaries.
1089    
1090       Cutoff recompilation, however, has not been compromised because
1091       CM keeps pid information in special caches between runs.
1092    
1093    ----------------------------------------------------------------------
1094    Name: Lal George
1095    Date: 2002/02/07 15:34:13 EST 2002
1096    Tag: <none>
1097    Description:
1098    
1099    Compilers that generate assembly code may produce  global labels
1100    whose value is resolved at link time. The various peephole optimization
1101    modules did not take this in account.
1102    
1103    TODO. The Labels.addrOf function should really return an option
1104    type so that clients are forced to deal with this issue, rather
1105    than an exception being raised.
1106    
1107    ----------------------------------------------------------------------
1108    Name: Lal George
1109    Date: 2002/02/06 13:55:02 EST
1110    Tag: george-20020206-ra-breakup
1111    Description:
1112    
1113    1. A bug fix from Allen.
1114    
1115        A typo causes extra fstp %st(0)'s to be generated at compensation
1116        edges, which might cause stack underflow traps at runtime.  This
1117        occurs in fft where there are extraneous fstps right before the 'into'
1118        trap instruction (in this case they are harmless since none of the
1119        integers overflow.)
1120    
1121    2. Pulled out various utility modules that were embedded in the modules
1122       of the register allocator. I need these modules for other purposes, but
1123       they are not complete enough to put into a library (just yet).
1124    ----------------------------------------------------------------------
1125    Name: Matthias Blume
1126    Date: 2002/01/31 16:05:00 EST
1127    Tag: blume-20020131-sparc-ccalls
1128    Description:
1129    
1130    1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes)
1131       of extra stack space by mistake.  Fixed.
1132    
1133    2. Bug in logic of handling of command-line options in ml-nlffigen fixed.
1134    
1135    ----------------------------------------------------------------------
1136    Name: Allen Leung
1137    Date: 2002/01/30
1138    Tag: leunga-20020130-nowhere-bug-fix
1139    Description:
1140    
1141       MLRISC bug fixes:
1142       1. Fixed a bindings computation bug in the 'nowhere' program generator tool.
1143       2. MachineInt.fromString was negating its value.
1144    
1145    ----------------------------------------------------------------------
1146    Name: Matthias Blume
1147    Date: 2002/01/29
1148    Tag: blume-20020129-INSTALL
1149    Description:
1150    
1151    - Added somewhat detailed installation instructions (file INSTALL).
1152    - Fixed curl-detection bug in config/install.sh.
1153    - It is now possible to select the URL getter using the URLGETTER
1154      environment variable:
1155    
1156          not set / "unknown"      --> automatic detection (script tries wget,
1157                                       curl, and lynx)
1158          "wget" / "curl" / "lynx" --> use the specified program (script "knows"
1159                                       how to properly invoke them)
1160          other                    --> use $URLGETTER directly, it must take
1161                                       precisely two command-line arguments
1162                                       (source URL and destination file name)
1163    
1164    ----------------------------------------------------------------------
1165    Name: Matthias Blume
1166    Date: 2002/01/28
1167    Tag: blume-20020128-sparc-ccalls
1168    Description:
1169    
1170    - Fixed problem with calculation of "used" registers in sparc-c-calls.
1171    - Make use of the allocParam argument in sparc-c-calls.
1172    
1173    ----------------------------------------------------------------------
1174    Name: Matthias Blume
1175    Date: 2002/01/28
1176    Tag: blume-20020128-allocParam
1177    Description:
1178    
1179    John Reppy:  Changes c-calls API to accept client-callback for
1180    allocating extra stack space.
1181    me: Corresponding changes to mlriscGen (using a dummy argument that
1182        does not change the current behavior).
1183    
1184    ----------------------------------------------------------------------
1185    Name: Matthias Blume
1186    Date: 2002/01/28 12:00:00
1187    Tag: Release_110_38
1188    Description:
1189    
1190    This time for real!!!
1191    
1192    ----------------------------------------------------------------------
1193    Name: Matthias Blume
1194    Date: 2002/01/28 10:56:00 EST
1195    Tag: blume-20020128-retraction
1196    Description:
1197    
1198    0. Retracted earlier 110.38.  (The Release_110_38 tag has been replaced
1199       with blume-Release_110_38-retracted.)
1200    
1201    1. Fixed a problem with incorrect rounding modes in real64.sml.
1202       (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.)
1203    
1204    2. A bug in ml-nlffigen related to the handling of unnamed structs, unions,
1205       and enums fixed.  The naming of corresponding ML identifiers should
1206       now be consistent again.
1207    
1208    ----------------------------------------------------------------------
1209    Name: Allen Leung
1210    Date: 2002/01/27
1211    Tag: leunga-20020127-nowhere
1212    Description:
1213    
1214       Added a target called nowhere in the configuration scripts.
1215       Enabling this will build the MLRISC 'nowhere' tool (for translating
1216       programs with where-clauses into legal SML code) during installation.
1217    
1218    ----------------------------------------------------------------------
1219    Name: Matthias Blume
1220    Date: 2002/01/25 21:27:00 EST
1221    Tag: blume-Release_110_38-retracted
1222    Description:
1223    
1224    Call it a (working) release!  Version is 110.38. Bootfiles are ready.
1225    
1226    README will be added later.
1227    
1228    !!! NOTE:  Re-tagged as blume-Release_110_38-retracted. Original tag
1229    (Release_110_38) removed.  Reason: Last-minute bug fixes.
1230    
1231    ----------------------------------------------------------------------
1232    Name: Matthias Blume
1233    Date: 2002/01/25
1234    Tag: blume-20020125-ffi
1235    Description:
1236    
1237    A large number of tweaks and improvements to ml-nlffi-lib and
1238    ml-nlffigen:
1239    
1240       - ML represenation types have been streamlined
1241       - getter and setter functions work with concrete values, not abstract
1242         ones where possible
1243       - ml-nlffigen command line more flexible (see README file there)
1244       - some bugs have been fixed (hopefully)
1245    
1246    ----------------------------------------------------------------------
1247    Name: Lal George
1248    Date: 2002/01/24
1249    Tag: george-20020124-risc-ra-interface
1250    Description:
1251    
1252       There is a dramatic simplification in the interface to the
1253       register allocator for RISC architectures as a result of making
1254       parallel copy instructions explicit.
1255    
1256    ----------------------------------------------------------------------
1257    Name: Matthias Blume
1258    Date: 2002/01/22
1259    Tag: blume-20020122-x86-ccalls
1260    Description:
1261    
1262    Bug fix for c-calls on x86 (having to do with how char- and
1263    short-arguments are being handled).
1264    
1265    ----------------------------------------------------------------------
1266    Name: Matthias Blume
1267    Date: 2002/01/21
1268    Tag: blume-20020121-ff
1269    Description:
1270    
1271    Another day of fiddling with the FFI...
1272    
1273    1. Bug fix/workaround:  CKIT does not complain about negative array
1274       dimensions, so ml-nlffigen has to guard itself against this possibility.
1275       (Otherwise a negative dimension would send it into an infinite loop.)
1276    
1277    2. Some of the abstract types (light objects, light pointers, most "base"
1278       types) in structure C are now eqtypes.
1279    
1280    3. Added constructors and test functions for NULL function pointers.
1281    
1282    ----------------------------------------------------------------------
1283    Name: Matthias Blume
1284    Date: 2002/01/18
1285    Tag: blume-20020118-ready-for-new-release
1286    Description:
1287    
1288    Made config/srcarchiveurl point to a new place.  (Will provide boot
1289    files shortly.)
1290    
1291    Maybe we christen this to be 110.38?
1292    
1293    ----------------------------------------------------------------------
1294    Name: Matthias Blume
1295    Date: 2002/01/18
1296    Tag: blume-20020118-more-ffifiddle
1297    Description:
1298    
1299    Today's FFI fiddling:
1300    
1301      - Provided a structure CGetSet with "convenient" versions of C.Get.* and
1302        C.Set.* that use concrete (MLRep.*) arguments and results instead
1303        of abstract ones.
1304    
1305      - Provided word-style bit operations etc. for "int" representation
1306        types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short,
1307        and Long.
1308    
1309    ----------------------------------------------------------------------
1310    Name: Matthias Blume
1311    Date: 2002/01/18
1312    Tag: blume-20020118-use-x86-fp
1313    Description:
1314    
1315    Now that x86-fast-fp seems to be working, I turned it back on again
1316    by default.  (Seems to work fine now, even with the FFI.)
1317    
1318    Other than that, I added some documentation about the FFI to
1319    src/ml-nlffigen/README and updated the FFI test examples in
1320    src/ml-nlffi-lib/Tests/*.
1321    
1322    ----------------------------------------------------------------------
1323    Name: Allen Leung
1324    Date: 2002/01/17
1325    Tag: leunga-20020117-x86-fast-fp-call
1326    Description:
1327    
1328       1. Fixed a problem with handling return fp values when x86's fast fp
1329          mode is turned on.
1330    
1331       2. Minor pretty printing fix for cellset.  Print %st(0) as %st(0) instead
1332          of %f32.
1333    
1334       3. Added a constructor INT32lit to the ast of MLRISC tools.
1335    
1336    ----------------------------------------------------------------------
1337    Name: Matthias Blume
1338    Date: 2002/01/16
1339    Tag: blume-20020116-ffifiddle
1340    Description:
1341    
1342    More fiddling with the FFI interface:
1343    
1344     - Make constness 'c instead of rw wherever possible.  This eliminates
1345       the need for certain explicit coercions.  (However, due to ML's
1346       value polymorphism, there will still be many cases where explicit
1347       coercions are necessary.  Phantom types are not the whole answer
1348       to modeling a subtyping relationship in ML.)
1349    
1350     - ro/rw coersions for pointers added.  (Avoids the detour through */&.)
1351    
1352     - "printf" test example added to src/ml-nlffi-lib/Tests.  (Demonstrates
1353       clumsy workaround for varargs problem.)
1354    
1355    ----------------------------------------------------------------------
1356    Name: Lal George
1357    Date: 2002/01/15
1358    Tag: <none>
1359    Description:
1360    
1361    1. Since COPY instructions are no longer native to the architecture,
1362       a generic functor can be used to implement the expandCopies function.
1363    
1364    2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a
1365       TEXT segment.
1366    
1367    ----------------------------------------------------------------------
1368    Name: Matthias Blume
1369    Date: 2002/01/15
1370    Tag: blume-20020115-ffiupdates
1371    Description:
1372    
1373    1. Fix for bug resulting in single-precision float values being returned
1374       incorrectly from FFI calls.
1375    
1376    2. Small modifications to C FFI API:
1377    
1378        - memory-allocation routines return straight objects (no options)
1379          and raise an exception in out-of-memory situations
1380        - unsafe extensions to cast between function pointers and pointers
1381          from/to ints
1382        - added structure C_Debug as an alternative to structure C where
1383          pointer-dereferencing (|*| and |*!) always check for null-pointers
1384        - added open_lib' to DynLinkage;  open_lib' works like open_lib
1385          but also takes a (possibly empty) list of existing library handles
1386          that the current library depends on
1387    
1388    ----------------------------------------------------------------------
1389    Name: Matthias Blume
1390    Date: 2002/01/10
1391    Tag: blume-20020110-newffigen
1392    Description:
1393    
1394    1. Updates to portable graph code.
1395    
1396    2. Major update to ml-nlffigen and ml-nlffi-lib.  Things are much
1397       more scalable now so that even huge interfaces such as the one
1398       for GTK compile in finite time and space. :-)
1399       See src/ml-nlffigen/README for details on what's new.
1400    
1401    ----------------------------------------------------------------------
1402    Name: Lal George
1403    Date: 2001/01/09 14:31:35 EST 2002
1404    Tag: george-20011206-rm-native-copy
1405    Description:
1406    
1407            Removed the native COPY and FCOPY instructions
1408            from all the architectures and replaced it with the
1409            explicit COPY instruction from the previous commit.
1410    
1411            It is now possible to simplify many of the optimizations
1412            modules that manipulate copies. This has not been
1413            done in this change.
1414    
1415    ----------------------------------------------------------------------
1416    Name: Lal George
1417    Date: 2001/12/06 16:50:13 EST 2001
1418    Tag: george-20011206-mlrisc-instruction
1419    Description:
1420    
1421    Changed the representation of instructions from being fully abstract
1422    to being partially concrete. That is to say:
1423    
1424      from
1425            type instruction
1426    
1427      to
1428            type instr                              (* machine instruction *)
1429    
1430            datatype instruction =
1431                LIVE of {regs: C.cellset, spilled: C.cellset}
1432              | KILL of {regs: C.cellset, spilled: C.cellset}
1433              | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
1434              | ANNOTATION of {i: instruction, a: Annotations.annotation}
1435              | INSTR of instr
1436    
1437    This makes the handling of certain special instructions that appear on
1438    all architectures easier and uniform.
1439    
1440    LIVE and KILL say that a list of registers are live or killed at the
1441    program point where they appear. No spill code is generated when an
1442    element of the 'regs' field is spilled, but the register is moved to
1443    the 'spilled' (which is present, more for debugging than anything else).
1444    
1445    LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
1446    We used to generate:
1447    
1448            DEFFREG f1
1449            f1 := f2 + f3
1450            trapb
1451    
1452    but now generate:
1453    
1454            f1 := f2 + f3
1455            trapb
1456            LIVE {regs=[f1,f2,f3], spilled=[]}
1457    
1458    Furthermore, the DEFFREG (hack) required that all floating point instruction
1459    use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
1460    defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
1461    in a cleaner alpha implementation. (Hopefully, intel will not get rid of
1462    this architecture).
1463    
1464    COPYXXX is intended to replace the parallel COPY and FCOPY  available on
1465    all the architectures. This will result in further simplification of the
1466    register allocator that must be aware of them for coalescing purposes, and
1467    will also simplify certain aspects of the machine description that provides
1468    callbacks related to parallel copies.
1469    
1470    ANNOTATION should be obvious, and now INSTR represents the honest to God
1471    machine instruction set!
1472    
1473    The <arch>/instructions/<arch>Instr.sml files define certain utility
1474    functions for making porting easier -- essentially converting upper case
1475    to lower case. All machine instructions (of type instr) are in upper case,
1476    and the lower case form generates an MLRISC instruction. For example on
1477    the alpha we have:
1478    
1479      datatype instr =
1480         LDA of {r:cell, b:cell, d:operand}
1481       | ...
1482    
1483      val lda : {r:cell, b:cell, d:operand} -> instruction
1484        ...
1485    
1486    where lda is just (INSTR o LDA), etc.
1487    
1488    ----------------------------------------------------------------------
1489    Name: Matthias Blume
1490    Date: 2001/11/22 21:40:00 EST
1491    Tag: Release_110_37
1492    Description:
1493    
1494    Release 110.37.  This time for real.
1495    
1496    ----------------------------------------------------------------------
1497    Name: Matthias Blume
1498    Date: 2001/11/21 16:35:00 EST
1499    Tag: blume-20011121-foot-in-mouth
1500    Description:
1501    
1502    Removed the "Release_110_37" tag because of a serious bug.
1503    This will be re-tagged once the bug is fixed.
1504    
1505    ----------------------------------------------------------------------
1506  Name: Matthias Blume  Name: Matthias Blume
1507  Date: 2001/11/21 16:14:00 EST  Date: 2001/11/21 16:14:00 EST
1508  Tag: blume-20011121-forgottenfile  Tag: blume-20011121-forgottenfile
# Line 24  Line 1514 
1514  ----------------------------------------------------------------------  ----------------------------------------------------------------------
1515  Name: Matthias Blume  Name: Matthias Blume
1516  Date: 2001/11/21 16:10:00 EST  Date: 2001/11/21 16:10:00 EST
1517  Tag: Release_110_37  Tag: blume-20011121-invalid_110_37
1518  Description:  Description:
1519    
1520    Note: I removed the original tag "Release_110_37" from this commit
1521          because we found a serious bug in all non-x86 backends.
1522          - Matthias
1523    
1524  1. Modifications to the SML/NJ code generator and to the runtime system  1. Modifications to the SML/NJ code generator and to the runtime system
1525     so that code object name strings are directly inserted into code     so that code object name strings are directly inserted into code
1526     objects at code generation time.  The only business the runtime system     objects at code generation time.  The only business the runtime system
# Line 248  Line 1742 
1742    
1743  ----------------------------------------------------------------------  ----------------------------------------------------------------------
1744  Name: Matthias Blume  Name: Matthias Blume
 >>>>>>> 1.169  
1745  Date: 2001/09/18 15:35:00 EDT  Date: 2001/09/18 15:35:00 EDT
1746  Tag: blume-20010918-readme11036  Tag: blume-20010918-readme11036
1747  Description:  Description:

Legend:
Removed from v.987  
changed lines
  Added in v.1174

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