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 1152, Tue Mar 19 21:36:30 2002 UTC revision 1222, Thu May 23 16:23:41 2002 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Lal George
17    Date: 2002/05/23 12:21:40 EDT
18    Tag: george-20020523-visual-labels
19    Description:
20    
21    Labels are now displayed in the graphical output to make
22    the fall-through and target blocks obvious.
23    
24    ----------------------------------------------------------------------
25    Name: Matthias Blume
26    Date: 2002/05/22 11:03:00 EDT
27    Tag: blume-20020522-shrink
28    Description:
29    
30    John tweaked yesterday's fix for 1131 to handle an out-of-memory
31    situation that comes up when allocating huge arrays.
32    
33    ----------------------------------------------------------------------
34    Name: Matthias Blume
35    Date: 2002/05/21 16:00:00 EDT
36    Tag: Release_110_40
37    Description:
38    
39    New working release (110.40).  New bootfiles.
40    
41    [Also: John Reppy fixed GC bug 1131.]
42    
43    ----------------------------------------------------------------------
44    Name: Matthias Blume
45    Date: 2002/05/21 12:35:00 EDT
46    Tag: blume-20020521-cmdoc
47    Description:
48    
49    CM documentation update.
50    
51    ----------------------------------------------------------------------
52    Name: Matthias Blume
53    Date: 2002/05/21 10:55:00 EDT
54    Tag: blume-20020521-misc
55    Description:
56    
57    - John tweaked runtime to be silent on heap export (except when
58      GC messages are on).
59    - I added a few more things (cross-compiling versions of CMB) to
60      config/preloads (as suggestions).
61    
62    ----------------------------------------------------------------------
63    Name: Matthias Blume
64    Date: 2002/05/20 22:25:00 EDT
65    Tag: blume-20020520-controls
66    Description:
67    
68    - Added ControlUtil structure to control-lib.cm.
69    - Use it throughout.
70    - Used Controls facility to define MLRISC controls (as opposed to
71      registering MLRISC control ref cells with Controls after the fact)
72    - Fixed messed-up controls priorities.
73    
74    * Removed again all the stuff from config/preloads that one wouldn't
75      be able to preload at the time the initial heap image is built.
76      (Many libraries, e.g., CML, do not exist yet at this time.  The
77       only libraries that can be preloaded via config/preloads are those
78       that come bundled with the bootfiles.)
79    
80    ----------------------------------------------------------------------
81    Name: Matthias Blume
82    Date: 2002/05/20 10:59:00 EDT
83    Tag: blume-20020520-preloads
84    Description:
85    
86    Added a lot of commented-out suggestions for things to be included
87    in config/preloads.
88    
89    ----------------------------------------------------------------------
90    Name: Allen Leung
91    Date: 2002/05/18 14:20:00 EDT
92    Tag: leunga-20020518-mdl
93    Description:
94    
95    o Made the mdl tool stuff compile and run again.
96    o I've disabled all the stuff that depends on RTL specifications; they
97      are all badly broken anyway.
98    
99    ----------------------------------------------------------------------
100    Name: Matthias Blume
101    Date: 2002/05/17 16:49:00 EDT
102    Tag: blume-20020517-controls
103    Description:
104    
105    0. John Reppy made several modifications to the SML/NJ library.
106       In particular, there is a shiny new controls-lib.cm.
107    
108    1. Pushed new controls interface through compiler so that everything
109       compiles again.
110    
111    2. Added FormatComb and FORMAT_COMB to the CML version of the
112       SML/NJ library (so that CML compiles again).
113    
114    3. Modified init scripts because XXX_DEFAULT environment variables
115       are no longer with us.  (Boot-time initialization is now done
116       using the same environment variables that are also used for
117       startup-time initialization of controls.)
118    
119    ----------------------------------------------------------------------
120    Name: Lal George
121    Date: 2002/05/15 09:20:10 EDT
122    Tag: george-20020515-pseudo-op-decls
123    Description:
124    
125            All pseudo-ops emitted before the first segment declaration
126    such as TEXT, DATA, and BSS directives are assumed to be global
127    declarations and are emitted first in the assembly file. This is
128    useful in a number of situations where one has pseudo-ops that are not
129    specific to any segment, and also works around the constraint that one
130    cannot have client pseudo-ops in the TEXT segment.
131    
132            Because no segment is associated with these declarations it is
133    an error to allocate any space or objects before the first segment
134    directive and an exception will be raised. However, we cannot make
135    this check for client pseudo-ops.
136    
137            These top level declarations are a field in the CFG graph_info.
138    In theory you can continue to add to this field after the CFG has been
139    built -- provided you know what you are doing;-)
140    
141    ----------------------------------------------------------------------
142    Name: Matthias Blume
143    Date: 2002/05/13 16:40:00 EDT
144    Tag: blume-20020513-pp-etc
145    Description:
146    
147    A few minor bugfixes:
148    
149      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
150        (Bogus printouts for redefined bindings still occur.  Compiler
151        bug should no longer occur now.  We need to redo the prettyprinter
152        from scratch.)
153    
154      - CM pathname printer now also adds escape sequences for ( and )
155    
156      - commend and docu fixes for ml-nlffi
157    
158    ----------------------------------------------------------------------
159    Name: Matthias Blume
160    Date: 2002/05/10 16:40:00 EDT
161    Tag: blume-20020510-erg-textio
162    Description:
163    
164    Applied the following bugfix provided by Emden Gansner:
165    
166        Output is corrupted when outputSubstr is used rather than output.
167    
168        The problem occurs when a substring
169    
170            ss = (s, dataStart, dataLen)
171    
172        where dataStart > 0, fills a stream buffer with avail bytes left.
173        avail bytes of s, starting at index dataStart, are copied into the
174        buffer, the buffer is flushed, and then the remaining dataLen-avail
175        bytes of ss are copied into the beginning of the buffer. Instead of
176        starting this copy at index dataStart+avail in s, the current code
177        starts the copy at index avail.
178    
179        Fix:
180        In text-io-fn.sml, change line 695 from
181             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
182        to
183             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
184    
185    ----------------------------------------------------------------------
186    Name: Matthias Blume
187    Date: 2002/04/12 13:55:00 EDT
188    Tag: blume-20020412-assyntax
189    Description:
190    
191    1. Grabbed newer assyntax.h from the XFree86 project.
192    2. Fiddled with how to compile X86.prim.asm without warnings.
193    3. (Very) Minor cleanup in CM.
194    
195    ----------------------------------------------------------------------
196    Name: Matthias Blume
197    Date: 2002/04/01 (no joke!) 17:07:00 EST
198    Tag: blume-20020401-x86div
199    Description:
200    
201    Added full support for div/mod/rem/quot on the x86, using the machine
202    instruction's two results (without clumsily recomputing the remainder)
203    directly where appropriate.
204    
205    Some more extensive power-of-two support was added to the x86 instruction
206    selector (avoiding expensive divs, mods, and muls where they can be
207    replaced with cheaper shifts and masks).  However, this sort of thing
208    ought to be done earlier, e.g., within the CPS optimizer so that
209    all architectures benefit from it.
210    
211    The compiler compiles to a fixed point, but changes might be somewhat
212    fragile nevertheless.  Please, report any strange things that you might
213    see wrt. div/mod/quot/rem...
214    
215    ----------------------------------------------------------------------
216    Name: Matthias Blume
217    Date: 2002/03/29 17:22:00
218    Tag: blume-20020329-div
219    Description:
220    
221    Fixed my broken div/mod logic.  Unfortunately, this means that the
222    inline code for div/mod now has one more comparison than before.
223    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
224    The problem was with quotient = 0, because that alone does not tell
225    us which way the rounding went.  One then has to look at whether
226    remainder and divisor have the same sign...  :(
227    
228    Anyway, I replaced the bootfiles with fresh ones...
229    
230    ----------------------------------------------------------------------
231    Name: Matthias Blume
232    Date: 2002/03/29 14:10:00 EST
233    Tag: blume-20020329-inlprims
234    Description:
235    
236    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
237    
238    Primops have changed. This means that the bin/boot-file formats have
239    changed as well.
240    
241    To make sure that there is no confusion, I made a new version.
242    
243    
244    CHANGES:
245    
246    * removed REMT from mltree (remainder should never overflow).
247    
248    * added primops to deal with divisions of all flavors to the frontend
249    
250    * handled these primops all the way through so they map to their respective
251      MLRISC support
252    
253    * used these primops in the implementation of Int, Int32, Word, Word32
254    
255    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
256    
257    * parameterized INLMIN, INLMAX, and INLABS by a numkind
258    
259    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
260      floating point
261    
262    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
263      and Real (but Real.abs maps to a separate floating-point-only primop)
264    
265    
266    TODO items:
267    
268    * Hacked Alpha32 instruction selection, disabling the selection of REMx
269      instructions because the machine instruction encoder cannot handle
270      them.  (Hppa, PPC, and Sparc instruction selection did not handle
271      REM in the first place, and REM is supported by the x86 machine coder.)
272    
273    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
274      selection phase.  (The two can be streamlined because the hardware
275      delivers both quotient and remainder at the same time anyway.)
276    
277    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
278      (Currently the behavior is inconsistent both across architectures and
279      wrt. the draft Basis spec.)
280    
281    * Word8 should eventually be handled natively, too.
282    
283    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
284      as if there currently is no execution path that could trigger it in
285      SML/NJ.  (The assumptions underlying functions arith and promotable do not
286      hold for things like multiplication and division.)
287    
288    ----------------------------------------------------------------------
289    Name: Matthias Blume
290    Date: 2002/03/27 16:27:00 EST
291    Tag: blume-20020327-mlrisc-divisions
292    Description:
293    
294    Added support for all four division operations (ML's div, mod, quot,
295    and rem) to MLRISC.  In the course of doing so, I also rationalized
296    the naming (no more annoying switch-around of DIV and QUOT), by
297    parameterizing the operation by div_rounding_mode (which can be either
298    DIV_TO_ZERO or DIV_TO_NEGINF).
299    
300    The generic MLTreeGen functor takes care of compiling all four
301    operations down to only round-to-zero div.
302    
303    Missing pieces:
304    
305      * Doing something smarter than relying on MLTreeGen on architectures
306        like, e.g., the x86 where hardware division delivers both quotient and
307        remainder at the same time.  With this, the implementation of the
308        round-to-neginf operations could be further streamlined.
309    
310      * Remove inlining support for div/mod/rem from the frontend and replace it
311        with primops that get carried through to the backend.  Do this for all
312        int and word types.
313    
314    ----------------------------------------------------------------------
315    Name: Matthias Blume
316    Date: 2002/03/25 17:25:00 EST
317    Tag: blume-20020325-divmod
318    Description:
319    
320    I improved (hopefully without breaking them) the implementation of Int.div,
321    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
322    advantage of the following observations:
323    
324      Let  q = x quot y      r = x rem y
325           d = x div  y      m = x mod y
326    
327    where "quot" is the round-to-zero version of integer division that
328    hardware usually provides.  Then we have:
329    
330         r = x - q * y        where neither the * nor the - will overflow
331         d = if q >= 0 orelse x = q * y then q else q - 1
332                              where neither the * nor the - will overflow
333         m = if q >= 0 orelse r = 0 then r else r + y
334                              where the + will not overflow
335    
336    This results in substantial simplification of the generated code.
337    The following table shows the number of CFG nodes and edges generated
338    for
339            fun f (x, y) = x OPER y
340            (* with OPER \in div, mod, quot, rem *)
341    
342    
343        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
344        --------------------------------------------------------
345         div |         24 |         39 |         12 |         16
346         mod |         41 |         71 |         12 |         16
347        quot |          8 |         10 |          8 |         10
348         rem |         10 |         14 |          8 |         10
349    
350    
351    ----------------------------------------------------------------------
352    Name: Matthias Blume
353    Date: 2002/03/25 22:06:00 EST
354    Tag: blume-20020325-cprotobug
355    Description:
356    
357    Fixed a bug in cproto (c prototype decoder).
358    
359    ----------------------------------------------------------------------
360    Name: Matthias Blume
361    Date: 2002/03/25 16:00:00 EST
362    Tag: blume-20020325-raw-primops
363    Description:
364    
365    I did some cleanup to Allen's new primop code and
366    replaced yesterday's bootfiles with new ones.
367    (But they are stored in the same place.)
368    
369    ----------------------------------------------------------------------
370    Name: Matthias Blume
371    Date: 2002/03/24 22:40:00 EST
372    Tag: blume-20020324-bootfiles
373    Description:
374    
375    Made the bootfiles that Allen asked for.
376    
377    ----------------------------------------------------------------------
378    Name: Allen Leung
379    Date: 2002/03/23 15:50:00 EST
380    Tag: leunga-20020323-flint-cps-rcc-primops
381    Description:
382    
383      1. Changes to FLINT primops:
384    
385        (* make a call to a C-function;
386         * The primop carries C function prototype information and specifies
387         * which of its (ML-) arguments are floating point. C prototype
388         * information is for use by the backend, ML information is for
389         * use by the CPS converter. *)
390      | RAW_CCALL of { c_proto: CTypes.c_proto,
391                       ml_args: ccall_type list,
392                       ml_res_opt: ccall_type option,
393                       reentrant : bool
394                     } option
395       (* Allocate uninitialized storage on the heap.
396        * The record is meant to hold short-lived C objects, i.e., they
397        * are not ML pointers.  With the tag, the representation is
398        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
399        *)
400      | RAW_RECORD of {tag:bool,sz:int}
401      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
402    
403      2.  These CPS primops are now overloaded:
404    
405           rawload of {kind:numkind}
406           rawstore of {kind:numkind}
407    
408          The one argument form is:
409    
410             rawload {kind} address
411    
412          The two argument form is:
413    
414             rawload {kind} [ml object, byte-offset]
415    
416      3. RAW_CCALL/RCC now takes two extra arguments:
417    
418         a. The first is whether the C call is reentrant, i.e., whether
419            ML state should be saved and restored.
420         b. The second argument is a string argument specifying the name of
421            library and the C function.
422    
423         These things are currently not handled in the code generator, yet.
424    
425      4. In CProto,
426    
427         An encoding type of "bool" means "ml object" and is mapped into
428         C prototype of PTR.  Note that "bool" is different than "string",
429         even though "string" is also mapped into PTR, because "bool"
430         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
431    
432      5. Pickler/unpicker
433    
434         Changed to handle RAW_RECORD and newest RAW_CCALL
435    
436      6. MLRiscGen,
437    
438         1. Changed to handle the new rawload/rawstore/rawrecord operators.
439         2. Code for handling C Calls has been moved to a new module CPSCCalls,
440            in the file CodeGen/cpscompile/cps-c-calls.sml
441    
442      7. Added the conditional move operator
443    
444             condmove of branch
445    
446         to cps.  Generation of this is still buggy so it is currently
447         disabled.
448    
449    ----------------------------------------------------------------------
450    Name: Lal George
451    Date: 2002/03/22 14:18:25 EST
452    Tag: george-20020322-cps-branch-prob
453    Description:
454    
455    Implemented the Ball-Larus branch prediction-heuristics, and
456    incorporated graphical viewers for control flow graphs.
457    
458    Ball-Larus Heuristics:
459    ---------------------
460    See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
461    
462    By design it uses the Dempster-Shafer theory for combining
463    probabilities.  For example, in the function:
464    
465        fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
466    
467    the ball-larus heuristics predicts that the n=0 is unlikely
468    (OH-heuristic), and the 'then' branch is unlikely because of the
469    RH-heuristic -- giving the 'then' branch an even lower combined
470    probability using the Dempster-Shafer theory.
471    
472    Finally, John Reppy's loop analysis in MLRISC, further lowers the
473    probability of the 'then' branch because of the loop in the else
474    branch.
475    
476    
477    Graphical Viewing:
478    ------------------
479    I merely plugged in Allen's graphical viewers into the compiler. The
480    additional code is not much. At the top level, saying:
481    
482            Control.MLRISC.getFlag "cfg-graphical-view" := true;
483    
484    will display the graphical view of the control flow graph just before
485    back-patching.  daVinci must be in your path for this to work. If
486    daVinci is not available, then the default viewer can be changed
487    using:
488    
489            Control.MLRISC.getString "viewer"
490    
491    which can be set to "dot" or "vcg" for the corresponding viewers. Of
492    course, these viewers must be in your path.
493    
494    The above will display the compilation unit at the level of clusters,
495    many of which are small, boring, and un-interesting. Also setting:
496    
497            Control.MLRISC.getInt "cfg-graphical-view_size"
498    
499    will display clusters that are larger than the value set by the above.
500    
501    
502    ----------------------------------------------------------------------
503    Name: Matthias Blume
504    Date: 2002/03/21 22:20:00 EST
505    Tag: blume-20020321-kmp-bugfix
506    Description:
507    
508    Changed the interface to the KMP routine in PreString and fixed
509    a minor bug in one place where it was used.
510    
511    ----------------------------------------------------------------------
512    Name: Allen Leung
513    Date: 2002/03/21 20:30:00 EST
514    Tag: leunga-20020321-cfg
515    Description:
516    
517      Fixed a potential problem in cfg edge splitting.
518    
519    ----------------------------------------------------------------------
520    Name: Allen Leung
521    Date: 2002/03/21 17:15:00 EST
522    Tag: leunga-20020321-x86-fp-cfg
523    Description:
524    
525      1. Recoded the buggy parts of x86-fp.
526    
527         a. All the block reordering code has been removed.
528            We now depend on the block placement phases to do this work.
529    
530         b. Critical edge splitting code has been simplified and moved into the
531            CFG modules, as where they belong.
532    
533         Both of these were quite buggy and complex.  The code is now much, much
534         simpler.
535    
536      2. X86 backend.
537    
538         a. Added instructions for 64-bit support.  Instruction selection for
539            64-bit has not been committed, however, since that
540            requires changes to MLTREE which haven't been approved by
541            Lal and John.
542    
543         b. Added support for FUCOMI and FUCOMIP when generating code for
544            PentiumPro and above.  We only generate these instructions in
545            the fast-fp mode.
546    
547         c. Added cases for JP and JNP in X86FreqProps.
548    
549      3. CFG
550    
551         CFG now has a bunch of methods for edge splitting and merging.
552    
553      4. Machine description.
554    
555         John's simplification of MLTREE_BASIS.fcond broke a few machine
556         description things:
557    
558         rtl-build.{sig,sml} and hppa.mdl fixed.
559    
560         NOTE: the machine description stuff in the repository is still broken.
561               Again, I can't put my fixes in because that involves
562               changes to MLTREE.
563    
564    ----------------------------------------------------------------------
565    Name: Matthias Blume
566    Date: 2002/03/20 15:55:00 EST
567    Tag: blume-20020320-kmp
568    Description:
569    
570    Implemented Knuth-Morris-Pratt string matching in PreString and used
571    it for String.isSubstring, Substring.isSubstring, and
572    Substring.position.
573    
574    (Might need some stress-testing.  Simple examples worked fine.)
575    
576    ----------------------------------------------------------------------
577  Name: Matthias Blume  Name: Matthias Blume
578  Date: 2002/03/19 16:37:00 EST  Date: 2002/03/19 16:37:00 EST
579  Tag: blume-20020319-witnesses  Tag: blume-20020319-witnesses

Legend:
Removed from v.1152  
changed lines
  Added in v.1222

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