Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/branches/primop-branch-3/NOTES/HISTORY
ViewVC logotype

Annotation of /sml/branches/primop-branch-3/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 898 - (view) (download)
Original Path: sml/trunk/HISTORY

1 : dbm 570 This is the HISTORY file for the Yale SML/NJ CVS repository.
2 :    
3 :     An entry should be made for _every_ commit to the repository.
4 :     The entries in this file will be used when creating the README
5 :     for new versions, so keep that in mind when writing the
6 :     description.
7 :    
8 :     The form of an entry should be:
9 :    
10 :     Name:
11 :     Date:
12 :     Tag: <post-commit CVS tag>
13 :     Description:
14 : george 824
15 : leunga 815 ----------------------------------------------------------------------
16 : blume 898 Name: Matthias Blume
17 :     Date: 2001/08/13
18 :     Tag: blume-20010813-closures
19 :     Description:
20 :    
21 :     This fix was sent to us by Zhong Shao. It is supposed to improve the
22 :     performance of certain loops by avoiding needless closure allocation.
23 :    
24 :     ----------------------------------------------------------------------
25 : george 890 Name: Lal George
26 : george 896 Date: 2001/07/31 10:03:23 EDT 2001
27 :     Tag: george-20010731-x86-fmalloc
28 :     Description: Fixed bug in x86 calls
29 :    
30 :     There was a bug where call instructions would mysteriously
31 :     vanish. The call instruction had to be one that returned
32 :     a floating point value.
33 :    
34 :     ----------------------------------------------------------------------
35 :     Name: Lal George
36 : george 890 Date: 2001/07/19 16:36:29 EDT 2001
37 :     Tag: george-20010719-simple-cells
38 :     Description:
39 :    
40 :     I have dramatically simplified the interface for CELLS in MLRISC.
41 :    
42 :     In summary, the cells interface is broken up into three parts:
43 :    
44 :     1. CellsBasis : CELLS_BASIS
45 :    
46 :     CellsBasis is a top level structure and common for all
47 :     architectures. it contains the definitions of basic datatypes
48 :     and utility functions over these types.
49 :    
50 :     2. functor Cells() : CELLS
51 :    
52 :     Cells generates an interface for CELLS that incorporates the
53 :     specific resources on the target architecture, such as the
54 :     presence of special register classes, their number and size,
55 :     and various useful substructures.
56 :    
57 :     3. <ARCH>CELLS
58 :    
59 :     e.g. SparcCells: SPARCCELLS
60 :    
61 :     <ARCH>CELLS usually contains additional bindings for special
62 :     registers on the architecture, such as:
63 :    
64 :     val r0 : cell (* register zero *)
65 :     val y : cell (* Y register *)
66 :     val psr : cell (* processor status register *)
67 :     ...
68 :    
69 :     The structure returned by applying the Cells functor is opened
70 :     in this interface.
71 :    
72 :     The main implication of all this is that the datatypes for cells is
73 :     split between CellsBasis and CELLS -- a fairly simple change for user
74 :     code.
75 :    
76 :     In the old scheme the CELLS interface had a definitional binding of
77 :     the form:
78 :    
79 :     signature CELLS = sig
80 :    
81 :     structure CellsBasis = CellsBasis
82 :    
83 :     ...
84 :    
85 :     end
86 :    
87 :     With all the sharing constraints that goes on in MLRISC, this old
88 :     design quickly leads to errors such as:
89 :    
90 :     "structure definition spec inside of sharing ... "
91 :    
92 :    
93 :     and appears to require an unacceptable amount of sharing and where
94 :     constraint hackery.
95 :    
96 :     I think this error message (the interaction of definitional specs and
97 :     sharing) requires more explanation on our web page.
98 :    
99 :     ----------------------------------------------------------------------
100 : blume 826 Name: Matthias Blume
101 : blume 879 Date: 2001/07/19 15:00:00 EDT
102 :     Tag: blume-20010719-libreorg
103 :     Description:
104 :    
105 :     This update puts together a fairly extensive but straightforward change
106 :     to the way the libraries that implement the interactive system are
107 :     organized:
108 :    
109 :     The biggest change is the elimination of structure Compiler. As a
110 :     replacement for this structure, there is now a CM library
111 :     (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm)
112 :     that exports all the substructures of the original structure Compiler
113 :     directly. So instead of saying Compiler.Foo.bar one now simply
114 :     says Foo.bar. (The CM libraries actually export a collection of
115 :     structures that is richer than the collection of substructures of
116 :     structure Compiler.)
117 :    
118 :     To make the transition smooth, there is a separate library called
119 :     $smlnj/compiler/compiler.cm which puts together and exports the
120 :     original structure Compiler (or at least something very close to it).
121 :    
122 :     There are five members of the original structure Compiler
123 :     that are not exported directly but which instead became members
124 :     of a new structure Backend (described by signature BACKEND). These are:
125 :     structure Profile (: PROFILE), structure Compile (: COMPILE), structure
126 :     Interact (: INTERACT), structure Machine (: MACHINE), and val
127 :     architecture (: string).
128 :    
129 :     Structure Compiler.Version has become structure CompilerVersion.
130 :    
131 :     Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided
132 :     by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc,
133 :     or x86, respectively.
134 :     Each of these exports the same frontend structures that
135 :     $smlnj/compiler.cm exports. But they do not have a structure Backend
136 :     and instead export some structure <Arch>Backend where <Arch> is Alpha32,
137 :     Hppa, PPC, Sparc, or X86, respectively.
138 :    
139 :     Library $smlnj/compiler/all.cm exports the union of the exports of
140 :     $smlnj/compiler/<arch>.cm
141 :    
142 :     There are no structures <Arch>Compiler anymore, use
143 :     $smlnj/compiler/<arch>.cm instead.
144 :    
145 :     Library host-compiler-0.cm is gone. Instead, the internal library
146 :     that instantiates CM is now called cm0.cm. Selection of the host
147 :     compiler (backend) is no longer done here but. (Responsibility for it
148 :     now lies with $smlnj/compiler/current.cm. This seems to be more
149 :     logical.)
150 :    
151 :     Many individual files have been moved or renamed. Some files have
152 :     been split into multiple files, and some "dead" files have been deleted.
153 :    
154 :     Aside from these changes to library organization, there are also changes
155 :     to the way the code itself is organized:
156 :    
157 :     Structure Binfile has been re-implemented in such a way that it no
158 :     longer needs any knowledge of the compiler. It exclusively deals
159 :     with the details of binfile layout. It no longer invokes the
160 :     compiler (for the purpose of creating new prospective binfile
161 :     content), and it no longer has any knowledge of how to interpret
162 :     pickles.
163 :    
164 :     Structure Compile (: COMPILE) has been stripped down to the bare
165 :     essentials of compilation. It no longer deals with linking/execution.
166 :     The interface has been cleaned up considerably.
167 :    
168 :     Utility routines for dealing with linking and execution have been
169 :     moved into their own substructures.
170 :    
171 :     (The ultimate goal of these changes is to provide a light-weight
172 :     binfile loader/linker (at least for, e.g., stable libraries) that
173 :     does not require CM or the compiler to be present.)
174 :    
175 :     CM documentation has been updated to reflect the changes to library
176 :     organization.
177 :    
178 :     ----------------------------------------------------------------------
179 :     Name: Matthias Blume
180 : blume 875 Date: 2001/07/10 17:30:00 EDT
181 :     Tag: Release_110_34
182 :     Description:
183 :    
184 : blume 876 Minor tweak to 110.34 (re-tagged):
185 :    
186 :     - README.html file added to CVS repository
187 :     - runtime compiles properly under FreeBSD 3.X and 4.X
188 :    
189 :     ----------------------------------------------------------------------
190 :     Name: Matthias Blume
191 :     Date: 2001/07/10 17:30:00 EDT
192 :     Tag: Release_110_34
193 :     Description:
194 :    
195 : blume 875 New version number (110.34). New bootfiles.
196 :    
197 :     ----------------------------------------------------------------------
198 :     Name: Matthias Blume
199 : blume 874 Date: 2001/07/09 16:00:00 EDT
200 :     Tag: blume-20010709-more-varargs
201 :     Description:
202 :    
203 :     I changed the handling of varargs in ml-nlffigen again:
204 :     The ellipsis ... will now simply be ignored (with an accompanying warning).
205 :    
206 :     The immediate effect is that you can actually call a varargs function
207 :     from ML -- but you can't actually supply any arguments beyond the ones
208 :     specified explicitly. (For example, you can call printf with its format
209 :     string, but you cannot pass additional arguments.)
210 :    
211 :     This behavior is only marginally more useful than the one before, but
212 :     it has the advantage that a function or, more importantly, a function
213 :     type never gets dropped on the floor, thus avoiding follow-up problems with
214 :     other types that refer to the offending one.
215 :    
216 :     ----------------------------------------------------------------------
217 :     Name: Matthias Blume
218 : blume 873 Date: 2001/07/09 11:25:00 EDT
219 :     Tag: blume-20010709-varargs
220 :     Description:
221 :    
222 :     1. ckit-lib.cm now exports structure Error
223 :     2. ml-nlffigen reports occurences of "..." (i.e., varargs function types)
224 :     with a warning accompanied by a source location. Moreover, it
225 :     merely skips the offending function or type and proceeds with the
226 :     rest of its work.u As a result, one can safely feed C code containing
227 :     "..." to ml-nlffigen.
228 :     3. There are some internal improvements to CM, providing slightly
229 :     more general string substitutions in the tools subsystem.
230 :    
231 :     ----------------------------------------------------------------------
232 :     Name: Matthias Blume
233 : blume 854 Date: 2001/06/27 15:10:00 EDT
234 :     Tag: blume-20010627-concur
235 :     Description:
236 :    
237 :     Fixed a small bug in CM's handling of parallel compilation.
238 :     (You could observe the bug by Control-C-interrupting an ordinary
239 :     CMB.make or CM.stabilize and then attaching some compile servers.
240 :     The result was that all of a sudden the previously interrupted
241 :     compilation would continue on its own. This was because of
242 :     an over-optimization: CM did not bother to clean out certain queues
243 :     when no servers were attached "anyway", resulting in the contents
244 :     of these queues to grab control when new servers did get attached.)
245 :    
246 :     There is also another minor update to the CM manual.
247 :    
248 :     ----------------------------------------------------------------------
249 :     Name: Matthias Blume
250 : blume 853 Date: 2001/06/26 16:15:00 EDT
251 :     Tag: blume-20010626-cmdoc
252 :     Description:
253 :    
254 :     Minor typo fixed in CM manual (syntax diagram for libraries).
255 :    
256 :     ----------------------------------------------------------------------
257 :     Name: Matthias Blume
258 : blume 852 Date: 2001/06/25 22:55:00 EDT
259 :     Tag: blume-20010625-x86pc
260 :     Description:
261 :    
262 :     Fixed a nasty bug in the X86 assembly code that caused signal
263 :     handlers to fail (crash) randomly.
264 :    
265 :     ----------------------------------------------------------------------
266 :     Name: Matthias Blume
267 : blume 846 Date: 2001/06/25 12:05:00 EDT
268 :     Tag: blume-20010625-nlffigen
269 :     Description:
270 :    
271 :     This update fixes a number of minor bugs in ml-nlffigen as reported by
272 :     Nick Carter <nbc@andrew.cmu.edu>.
273 :    
274 :     1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted.
275 :     2. Default names for generated files are now derived from the name of
276 :     the C file *without its directory*. In particular, this causes generated
277 :     files to be placed locally even if the C file is in some system directory.
278 :     3. Default names for generated signatures and structures are also derived
279 :     from the C file name without its directory. This avoids silly things
280 :     like "structure GL/GL".
281 :     (Other silly names are still possible because ml-nlffigen does not do
282 : blume 847 a thorough check of whether generated names are legal ML identifiers.
283 :     When in doubt, use command line arguments to force particular names.)
284 : blume 846
285 :     ----------------------------------------------------------------------
286 :     Name: Matthias Blume
287 : blume 845 Date: 2001/06/21 12:25:00 EDT
288 :     Tag: blume-20010621-eXene
289 :     Description:
290 :    
291 :     eXene now compiles and (sort of) works again.
292 :    
293 :     The library name (for version > 110.33) is $/eXene.cm.
294 :    
295 :     I also added an new example in src/eXene/examples/nbody. See the
296 :     README file there for details.
297 :    
298 :     ----------------------------------------------------------------------
299 :     Name: Matthias Blume
300 : blume 844 Date: 2001/06/20 16:40:00 EDT
301 :     Tag: blume-20010620-cml
302 :     Description:
303 :    
304 :     CML now compiles and works again.
305 :    
306 :     Libraries (for version > 110.33):
307 :    
308 :     $cml/cml.cm Main CML library.
309 :     $cml/basis.cm CML's version of $/basis.cm.
310 :     $cml/cml-internal.cm Internal helper library.
311 :     $cml/core-cml.cm Internal helper library.
312 :     $cml-lib/trace-cml.cm Tracing facility.
313 :     $cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm
314 :    
315 :     The installer (config/install.sh) has been taught how to properly
316 :     install this stuff.
317 :    
318 :     ----------------------------------------------------------------------
319 :     Name: Matthias Blume
320 : blume 843 Date: 2001/06/19 17:55:00 EDT
321 :     Tag: blume-20010619-instantiate
322 :     Description:
323 :    
324 :     This un-breaks the fix for bug 1432.
325 :     (The bug was originally fixed in 110.9 but I broke it again some
326 :     time after that.)
327 :    
328 :     ----------------------------------------------------------------------
329 :     Name: Matthias Blume
330 : blume 842 Date: 2001/06/19 17:25:00 EDT
331 :     Tag: blume-20010619-signals
332 :     Description:
333 :    
334 :     This should (hopefully) fix the long-standing signal handling bug.
335 :     (The runtime system was constructing a continuation record with an
336 :     incorrect descriptor which would cause the GC to drop data on the floor...)
337 :    
338 :     ----------------------------------------------------------------------
339 :     Name: Matthias Blume
340 : blume 840 Date: 2001/06/15 15:05:00 EDT
341 : blume 841 Tag: blume-20010615-moresparc
342 :     Description:
343 :    
344 :     Here is a short late-hour update related to Sparc c-calls:
345 :    
346 :     -- made handling of double-word arguments a bit smarter
347 :    
348 :     -- instruction selection phase tries to collapse certain clumsily
349 :     constructed ML-Trees; typical example:
350 :    
351 :     ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2))
352 :    
353 :     This currently has no further impact on SML/NJ since mlriscGen does
354 :     not seem to generate such patterns in the first place, and c-calls
355 :     (which did generate them in the beginning) has meanwhile been fixed
356 :     so as to avoid them as well.
357 :    
358 :     ----------------------------------------------------------------------
359 :     Name: Matthias Blume
360 :     Date: 2001/06/15 15:05:00 EDT
361 : blume 840 Tag: blume-20010615-sparc
362 :     Description:
363 :    
364 :     The purpose of this update is to provide an implementation of NLFFI
365 :     on Sparc machines.
366 :    
367 :     Here are the changes in detail:
368 :    
369 :     * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing
370 :     the Sparc implementation of the c-calls API.
371 :     * The Sparc backend of SML/NJ has been modified to uniformely use %fp
372 :     for accessing the ML frame. Thus, we have a real frame pointer and
373 :     can freely modify %sp without need for an omit-frame-ptr phase.
374 :     The vfp logic in src/compiler/CodeGen/* has been changed to accomodate
375 :     this case.
376 :     * ml-nlffigen has been taught to produce code for different architectures
377 :     and calling conventions.
378 :     * In a way similar to what was done in the x86 case, the Sparc
379 :     backend uses its own specific extension to mltree. (For example,
380 :     it needs to be able to generate UNIMP instructions which are part
381 :     of the calling convention.)
382 :     * ml-nlffi-lib was reorganized to make it more modular (in particular,
383 :     to make it easier to plug in new machine- and os-dependent parts).
384 :    
385 :     There are some other fairly unrelated bug fixes and cleanups as well:
386 :    
387 :     * I further hacked the .cm files for MLRISC tools (like MDLGen) so
388 :     that they properly share their libraries with existing SML/NJ libraries.
389 :     * I fixed a minor cosmetic bug in CM, supressing certain spurious
390 :     follow-up error messages.
391 :     * Updates to CM/CMB documentation.
392 :    
393 :     TODO items:
394 :    
395 :     * MLRISC should use a different register as its asmTemp on the Sparc.
396 :     (The current %o2 is a really bad choice because it is part of the
397 :     calling conventions, so things might interfere in unexpected ways.)
398 :    
399 :     ----------------------------------------------------------------------
400 :     Name: Matthias Blume
401 : blume 839 Date: 2001/06/07
402 :     Tag: blume-20010607-calls
403 :     Description:
404 :    
405 :     A number of internal changes related to C calls and calling conventions:
406 :    
407 :     1. ML-Tree CALL statements now carry a "pops" field. It indicates the
408 :     number of bytes popped implicitly (by the callee). In most cases
409 :     this field is 0 but on x86/win32 it is some non-zero value. This
410 :     is information provided for the benefit of the "omit-frameptr" pass.
411 :     2. The CALL instruction on the x86 carries a similar "pops" field.
412 :     The instruction selection phase copies its value from the ML-Tree
413 :     CALL statement.
414 :     3. On all other architectures, the instruction selection phase checks
415 :     whether "pops=0" and complains if not.
416 :     4. The c-calls implementation for x86 now accepts two calling conventions:
417 :     "ccall" and "stdcall". When "ccall" is selected, the caller cleans
418 :     up after the call and pops is set to 0. For "stdcall", the caller
419 :     does nothing, leaving the cleanup to the callee; pops is set to
420 :     the number of bytes that were pushed onto the stack.
421 :     5. The cproto decoder (compiler/Semant/types/cproto.sml) now can
422 :     distinguish between "ccall" and "stdcall".
423 :     6. The UNIMP instruction has been added to the supported Sparc instruction
424 :     set. (This is needed for implementing the official C calling convention
425 :     on this architecture.)
426 :     7. I fixed some of the .cm files under src/MLRISC/Tools to make them
427 :     work with the latest CM.
428 :    
429 :     ----------------------------------------------------------------------
430 :     Name: Matthias Blume
431 : blume 838 Date: 2001/06/05 15:10:00 EDT
432 :     Tag: blume-20010605-cm-index
433 :     Description:
434 :    
435 :     0. The "lambdasplit" parameter for class "sml" in CM has been documented.
436 :    
437 :     1. CM can now generate "index files". These are human-readable files
438 :     that list on a per-.cm-file basis each toplevel symbol defined or
439 :     imported. The location of the index file for
440 :     <p>/<d>.cm is <p>/CM/INDEX/<d>.cm.
441 :     To enable index-file generation, set CM.Control.generate_index to true
442 :     or export an environment-symbol: export CM_GENERATE_INDEX=true.
443 :    
444 :     The CM manual has been updated accordingly.
445 :    
446 :     2. I made some slight modifications to the c-calls API in MLRISC.
447 :    
448 :     a) There is now a callback to support saving/restoring of
449 :     dedicated but caller-save registers around the actual call
450 :     instruction.
451 :     b) One can optionally specify a comment-annotation for the
452 :     call instruction.
453 :    
454 :     3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop.
455 :     (For example, the comment annotation shows the C prototype of
456 :     the function being called.)
457 :    
458 :     ----------------------------------------------------------------------
459 :     Name: Matthias Blume
460 : blume 837 Date: 2001/06/01 13:30:00 EDT
461 :     Tag: blume-20010601-nlffi-cleanup
462 :     Description:
463 :    
464 :     This is mostly a cleanup of MLFFI stuff:
465 :    
466 :     - some signature files have been put into a more exposed place
467 :     - the ugly 'f type parameter is gone (simplifies types tremendously!)
468 :     - ml-nlffigen changed accordingly
469 :     - tutorial updated
470 :    
471 :     Other changes:
472 :    
473 :     - author's affiliation in CM manual(s) updated
474 :     - some more recognized keywords added to Allen's sml.sty
475 :    
476 :     ----------------------------------------------------------------------
477 :     Name: Matthias Blume
478 : blume 836 Date: 2001/05/25 15:30:00 EDT
479 :     Tag: blume-20010525-iptr
480 :     Description:
481 :    
482 :     - put the official 110.33-README (as it appears on the ftp server) under
483 :     CVS
484 :     - fixed a small bug related to incomplete pointer types in
485 :     ml-nlffigen
486 :     - small cosmetic change to the ml-nlffi-lib's "arr" type constructor
487 :     (it does not need the 'f type parameter)
488 :    
489 :     ----------------------------------------------------------------------
490 :     Name: Matthias Blume
491 : blume 834 Date: 2001/05/23 14:30:00 EDT
492 :     Tag: Release_110_33
493 :     Description:
494 :    
495 :     New version number (110.33). New bootfiles.
496 :    
497 :     ----------------------------------------------------------------------
498 :     Name: Matthias Blume
499 : blume 833 Date: 2001/05/22 18:06:00 EDT
500 :     Tag: blume-20010522-targets
501 :     Description:
502 :    
503 :     Made install.sh use file config/targets.customized if it exists, falling
504 :     back to config/targets if it doesn't. This way one can have a customized
505 :     version of the targets file without touching the "real thing", thus
506 :     eliminating the constant fear of accidentally checking something bogus
507 :     back into the CVS repository... (File config/targets.customized must
508 :     not be added to the repository!)
509 :    
510 :     ----------------------------------------------------------------------
511 :     Name: Matthias Blume
512 : blume 832 Date: 2001/05/22 16:30:00 EDT
513 :     Tag: blume-20010522-minitut
514 :     Description:
515 :    
516 :     1. Bug fix in ml-nlffigen; now (hopefully) correctly handling
517 :     struct returns.
518 :     2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very
519 :     incomplete, preliminary documentation for NLFFI.
520 :    
521 :     ----------------------------------------------------------------------
522 :     Name: Matthias Blume
523 : blume 829 Date: 2001/05/14 11:30:00 EDT
524 :     Tag: blume-20010514-script
525 :     Description:
526 :    
527 :     Some bugs in install script fixed.
528 :    
529 :     In addition to that I also made a slight change to the NLFFI API:
530 :     Functors generated by ml-nlffigen now take the dynamic library as a
531 :     straight functor argument, not as a suspended one. (The original
532 :     functor code used to force the suspension right away anyway, so there
533 :     was nothing gained by this complication of the interface.)
534 :    
535 :     ----------------------------------------------------------------------
536 :     Name: Matthias Blume
537 : blume 828 Date: 2001/05/11 14:35:00 EDT
538 :     Tag: blume-20010511-ml-nlffi
539 :     Description:
540 :    
541 :     I finally took the plunge and added my new FFI code to the main
542 :     repository. For x86-linux it is now ready for prime-time.
543 :    
544 :     There are two new subdirectories of "src":
545 :    
546 :     - ml-nlffi-lib:
547 :     The utility library for programs using the FFI interface.
548 :     Here is the implementation of $/c.cm and its associated low-level
549 :     partners $/c-int.cm and $/memory.cm.
550 :     - ml-nlffigen:
551 :     A stand-alone program for generating ML glue code from C source
552 :     code.
553 :    
554 :     Building ml-nlffigen requires $/ckit-lib.cm.
555 :    
556 :     The config/install.sh script has been updates to do the Right Thing
557 :     (hopefully).
558 :    
559 :     Notice that the source tree for the C-Kit will not be put under "src"
560 :     but directly under the installation root directory. (This is the
561 :     structure that currently exists on the CVS server when you check out
562 :     module "sml".) Fortunately, config/install.sh knows about this oddity.
563 :    
564 :     Bugs: No documentation yet.
565 :    
566 :     ----------------------------------------------------------------------
567 :     Name: Matthias Blume
568 : blume 826 Date: 2001/05/09 16:35:00 EDT
569 :     Tag: blume-20010509-cpscontract
570 :     Description:
571 :    
572 :     Fixed a bug in the accounting code in cpsopt/contract.sml. (The
573 :     wrapper/unwrapper elimination did not decrement usage counts and some
574 :     dead variables got overlooked by the dead-up logic.)
575 :    
576 :     ----------------------------------------------------------------------
577 : george 824 Name: Lal George
578 :     Date: 2001/05/08 17:26:09 EDT
579 :     Tag: george-20010508-omit-frameptr
580 :     Description:
581 :    
582 :     Changes to implement the omit-frame-pointer optimization to support
583 :     raw C calls. For now, there is only support on the Intel x86, but
584 :     other architectures will follow as more experience is gained with this.
585 :    
586 :    
587 :     ----------------------------------------------------------------------
588 : blume 818 Name: Matthias Blume
589 : blume 819 Date: 2001/05/07 14:40:00 EDT
590 :     Tag: blume-20010507-proxies
591 :     Description:
592 :    
593 :     I made into "proxy libraries" all libraries that qualify for such a
594 :     change. (A qualifying library is a library that has another library or
595 :     groups as its sole member and repeats that member's export list
596 :     verbatim. A proxy library avoids this repetition by omitting its export
597 :     list, effectively inheriting the list that its (only) member exports.
598 :     See the CM manual for more explanation.)
599 :     The main effect is that explicit export lists for these libraries
600 :     do not have to be kepts in sync, making maintenance a bit easier.
601 :    
602 :     I also added copyright notices to many .cm-files.
603 :    
604 :     Last but not least, I made a new set of bootfiles.
605 :    
606 :     ----------------------------------------------------------------------
607 :     Name: Matthias Blume
608 : blume 818 Date: 2001/05/04 17:00:00 EDT
609 :     Tag: blume-20010504-cm-lsplit
610 :     Description:
611 :    
612 :     0. John merged pending changes to $/smlnj-lib.cm
613 :    
614 :     1. Allen's previous change accidentally backed out of one of Lal's
615 :     earlier changes. I undid this mistake (re-introducing Lal's change).
616 :    
617 :     2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm)
618 :     within the compiler where applicable. There is some code simplification
619 :     because of that.
620 :    
621 :     3. The "split" phase (in FLINT) is now part of the default list of phases.
622 :     Compiler.Control.LambdaSplitting.* can be used to globally control the
623 :     lambda-splitting (cross-module-inlining) engine. In addition to that,
624 :     it can now also be controlled on a per-source basis: CM has been taught
625 :     a new tool parameter applicable to ML source files.
626 :    
627 :     - To turn lambda-splitting off completely:
628 :     local open Compiler.Control.LambdaSplitting in
629 :     val _ = set Off
630 :     end
631 :     - To make "no lambda-splitting" the global default (but allow per-source
632 :     overriding); this is the initial setting:
633 :     local open Compiler.Control.LambdaSplitting in
634 :     val _ = set (Default NONE)
635 :     end
636 :     - To make "lambda-splitting with aggressiveness a" the global default
637 :     (and allow per-source overriding):
638 :     local open Compiler.Control.LambdaSplitting in
639 :     val _ = set (Default (SOME a))
640 :     end
641 :    
642 :     - To turn lambda-splitting off for a given ML souce file (say: a.sml)
643 :     write (in the respective .cm-file):
644 :     a.sml (lambdasplitting:off)
645 :     - To turn lambda-splitting for a.sml on with minimal aggressiveness:
646 :     a.sml (lambdasplitting:on)
647 :     - To turn lambda-splitting for a.sml on with aggressiveness <a> (where
648 :     <a> is a decimal non-negative integer):
649 :     a.sml (lambdasplitting:<a>)
650 :     - To turn lambda-splitting for a.sml on with maximal aggressiveness:
651 :     a.sml (lambdasplitting:infinity)
652 :     - To use the global default for a.sml:
653 :     a.sml (lambdasplitting:default)
654 :     or simply
655 :     a.sml
656 :    
657 :     ----------------------------------------------------------------------
658 : leunga 815 Name: Allen Leung
659 :     Date: 2001/05/04 01:57:00 EDT
660 :     Tag: leunga-20010504-sync
661 :     Description:
662 : leunga 788
663 : leunga 815 MLRISC features.
664 :    
665 :     1. Fix to CMPXCHG instructions.
666 :     2. Changed RA interface to allow annotations in callbacks.
667 :     3. Added a new method to the stream interface to allow annotations updates.
668 :    
669 : george 749 ----------------------------------------------------------------------
670 : blume 812 Name: Matthias Blume
671 : blume 814 Date: 2001/05/01 11:45:00 EDT
672 :     Tag: blume-20010501-pcedittmp
673 :     Description:
674 :    
675 :     Changed install.sh to use the current working directory instead of
676 :     /usr/tmp for a temporary file (pcedittmp). The previous choice
677 :     of /usr/tmp caused trouble with MacOS X because of file premission
678 :     problems.
679 :    
680 :     ----------------------------------------------------------------------
681 :     Name: Matthias Blume
682 : blume 812 Date: 2001/04/20 11:10:00 EDT
683 :     Tag: blume-20010420-inMLflag
684 :     Description:
685 :    
686 :     - added vp_limitPtrMask to vproc-state.h
687 :     (for use by the raw-C-calls mechanism to implement proper interrupt
688 :     handling)
689 :     - made the ML compiler aware of various data-structure offsets so it
690 :     can generate code for accessing the vp_inML flag and vp_limitPtrMask
691 :     - tweaked mlriscGen.sml to have it emit interrupt-handling code for
692 :     raw C-calls
693 :    
694 :     ----------------------------------------------------------------------
695 : george 810 Name: Lal George
696 :     Date: 2001/04/20 09:15:28 EDT
697 :     Tag: george-20010420-macosX
698 :     Description:
699 :    
700 :     - Changes to port to Mac OS X; Darwin.
701 :    
702 :     - In the process I found that sqrt was broken on the PPC, because the
703 :     fsqrt instruction is not implemented.
704 :    
705 :     ----------------------------------------------------------------------
706 : blume 799 Name: Matthias Blume
707 : blume 808 Date: 2001/04/18 12:45:00 EDT
708 :     Tag: blume-20010418-ccalls
709 :     Description:
710 :    
711 :     - fixed two off-by-4 errors in the x86-specific c-calls implementation
712 :     (this bug prevented structure arguments containing pointers from being
713 :     passed correctly)
714 :     - changed the raw-C-call code in mlriscGen.sml in such a way that
715 :     structure arguments are represented as a pointer to the beginning
716 :     of the structure (instead of having a series of synthesized arguments,
717 :     one for each structure member)
718 :    
719 :     - made makeml script's verbosity level configurable via environment
720 :     variable (MAKEML_VERBOSITY)
721 :    
722 : blume 813 - eliminated placeholder implementations for f32l, w16s, i16s, and f32s
723 : blume 808 in rawmem-x86.sml; we are now using the real thing
724 :    
725 :     ----------------------------------------------------------------------
726 :     Name: Matthias Blume
727 : blume 806 Date: 2001/03/22 16:25:00 EST
728 :     Tag: blume-20010322-bootfiles
729 :     Description:
730 :    
731 :     Created a new set of bootfiles (for your automatic installation convenience).
732 :    
733 :     ----------------------------------------------------------------------
734 :     Name: Matthias Blume
735 : blume 805 Date: 2001/03/22 15:10:00 EST
736 :     Tag: blume-20010322-rawmem-parcm
737 :     Description:
738 :    
739 :     1. All "raw memory access" primitives for the new FFI are implemented now
740 :     (at least on the x86).
741 :     2. Some further cleanup of CM's parallel make mechanism.
742 :    
743 :     ----------------------------------------------------------------------
744 :     Name: Matthias Blume
745 : blume 801 Date: 2001/03/19 17:53:00 EST
746 :     Tag: blume-20010319-parallel
747 :     Description:
748 :    
749 :     Parallel make (using compile servers) now works again.
750 :    
751 :     To this end, CM.stabilize and CMB.make have been modified to work in
752 :     two passes when compile servers are attached:
753 :     1. Compile everything, do not perform stabilization; this pass
754 :     uses compile servers
755 :     2. Stabilize everything; this pass does not use compile servers
756 :     If there are no compile servers, the two passes are combined into one
757 :     (as before). Splitting the passes increases the inherent parallelism
758 :     in the dependency graph because the entire graph including all
759 :     libraries is available at the same time. This, in turn, improves
760 :     server utilization. The downside is that the master process will
761 :     have to do some extra work after compilation is done (because for
762 :     technical reasons it must re-read all the binfiles during stabilization).
763 :    
764 :     ----------------------------------------------------------------------
765 :     Name: Matthias Blume
766 : blume 800 Date: 2001/03/16 12:22:00 EST
767 :     Tag: blume-20010316-bootfiles
768 :     Description:
769 :    
770 :     Created a new set of bootfiles (for your automatic installation convenience).
771 :    
772 :     ----------------------------------------------------------------------
773 :     Name: Matthias Blume
774 : blume 799 Date: 2001/03/16 11:00:00 EST
775 :     Tag: blume-20010316-MLTREE-fixup
776 :     Description:
777 :    
778 :     This is a minor fixup for an (untagged) earlier commit by Allen.
779 :     (A file was missing).
780 :    
781 :     ----------------------------------------------------------------------
782 : leunga 788 Name: Allen Leung
783 : leunga 796 Date: Mon Mar 5 18:54:57 EST 2001
784 :     Tag: leunga-20010305-cut-support
785 :    
786 :     1. New support for alternative control-flow in MLTREE.
787 :     Currently we support
788 :    
789 :     FLOW_TO(CALL ...., [k1,...,kn])
790 :    
791 :     This is needed for 'cuts to' in C-- and try/handle-like constructs
792 :     in Moby
793 :    
794 :     New assembler flag "asm-show-cutsto" to turn on control-flow debugging.
795 :    
796 :     2. Register Allocator
797 :    
798 :     Changes in interface [from Fermin, John]
799 :    
800 :     3. Alpha 8-bit SLL support [Fermin]
801 :    
802 :     4. All architectures
803 :    
804 :     A new module (ClusterExpandCopies) for expanding parallel copies.
805 :    
806 :     ----------------------------------------------------------------------
807 :     Name: Allen Leung
808 : leunga 788 Date: 2001/02/27 23:07:00 EST
809 :     Tag: leunga-20010227-minor-stuff
810 :    
811 :     1. Alpha bug fix for CMOVNE
812 :     2. Handle mltree COND(..,FCMP ...,...)
813 :     3. Bug fix in simplifier
814 :    
815 :     ----------------------------------------------------------------------
816 : blume 777 Name: Matthias Blume
817 : blume 781 Date: 2001/01/30 17:50:00 EST
818 :     Tag: blume-20010130-sync
819 :     Description:
820 :    
821 :     This is just a minor update to sync my devel branch with the main brach.
822 :     The only visible change is the addition of some README files.
823 :    
824 :     ----------------------------------------------------------------------
825 :     Name: Matthias Blume
826 : blume 778 Date: 2001/01/12 23:30:00 JST
827 :     Tag: blume-20010112-bootfiles
828 :     Description:
829 :    
830 :     Made a new set of bootfiles that goes with the current state of the
831 :     repository.
832 :    
833 :     ----------------------------------------------------------------------
834 :     Name: Matthias Blume
835 : blume 777 Date: 2001/01/12 21:20:00 JST
836 :     Tag: blume-20010112-sync
837 :     Description:
838 :    
839 :     I am just flushing out some minor changes that had accumulated in
840 :     my private branch in order to sync with the main tree. (This is
841 :     mainly because I had CVS trouble when trying to merge _into_ my
842 :     private branch.)
843 :    
844 :     Most people should be completely unaffected by this.
845 :    
846 :     ----------------------------------------------------------------------
847 : leunga 775 Name: Allen Leung
848 :     Date: Thu Jan 11 21:03:00 EST 2001
849 :     Tag: leunga-20010111-labexp=mltree
850 :     Description:
851 :    
852 :     1. Removed the type LabelExp and replace it by MLTree.
853 :     2. Rewritten mltree-simplify with the pattern matcher tool.
854 :     3. There were some bugs in alpha code generator which would break
855 :     64-bit code generation.
856 :     4. Redo the tools to generate code with the
857 :     5. The CM files in MLRISC (and in src/system/smlnj/MLRISC)
858 :     are now generated by perl scripts.
859 :    
860 :     ----------------------------------------------------------------------
861 : blume 771 Name: Matthias Blume
862 : blume 774 Date: 2001/01/10 21:55:00 JST
863 :     Tag: blume-20010110-rcc
864 :     Description:
865 :    
866 :     The RCC stuff now seems to work (but only on the x86).
867 :     This required hacking of the c-calls interface (and -implementation) in
868 :     MLRISC.
869 :    
870 :     Normal compiler users should be unaffected.
871 :    
872 :     ----------------------------------------------------------------------
873 :     Name: Matthias Blume
874 : blume 773 Date: 2001/01/09 01:20:00 JST
875 :     Tag: blume-20010109-rcc
876 :     Description:
877 :    
878 :     This is a fairly big patch, flushing out a large number of pending
879 :     changes that I made to my development copy over the last couple of days.
880 :    
881 :     Of practical relevance at this moment is a workaround for a pickling
882 :     bug that Allen ran into the other day. The cause of the bug itself is
883 :     still unknown and it might be hard to fix it properly, but the
884 :     workaround has some merits of its own (namely somewhat reducing pickling
885 :     overhead for certain libraries). Therefore, I think this solution should
886 :     be satisfactory at this time.
887 :    
888 :     The rest of the changes (i.e., the vast majority) has to do with my
889 :     ongoing efforts of providing direct support for C function calls from
890 :     ML. At the moment there is a new primop "RAW_CCALL", typing magic
891 :     in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new
892 :     case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to
893 :     translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to
894 :     handle RCC.
895 :    
896 :     The last part (the changes to mlriscGen.sml) are still known to be
897 :     wrong on the x86 and not implemented on all other architectures. But
898 :     the infrastructure is in place. I had to change a few functor
899 :     signatures in the backend to be able to route the CCalls interface
900 :     from MLRISC there, and I had to specialize the mltree type (on the
901 :     x86) to include the necessary extensions. (The extensions themselves
902 :     were already there and redy to go in MLRISC/x86).
903 :    
904 :     Everything should be very happy as soon as someone helps me with
905 :     mlriscGen.sml...
906 :    
907 :     In any case, nothing of this should matter to anyone as long as the
908 :     new primop is not being used (which is going to be the case unless you
909 :     find it where I hid it :). The rest of the compiler is completely
910 :     unaffected.
911 :    
912 :     ----------------------------------------------------------------------
913 :     Name: Matthias Blume
914 : blume 772 Date: 2001/01/05 00:30:00 JST
915 :     Tag: blume-20010105-primops
916 :     Description:
917 :    
918 :     Added some experimental support for work that I am doing right now.
919 :     These changes mostly concern added primops, but there is also a new
920 :     experimental C library in the runtime system (but currently not enabled
921 :     anywhere except on Linux/X86).
922 :    
923 :     In the course of adding primops (and playing with them), I discovered that
924 :     Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly
925 :     broken. (Zhong was very right he labeled this stuff as "major gross hack".)
926 :     To recover, I made type information in INL_PRIM mandatory and changed
927 :     prim.sml as well as built-in.sml accordingly. The InLine structure now
928 :     has complete, correct type information (i.e., no bottom types).
929 :    
930 :     Since all these changes mean that we need new binfiles, I also bumped the
931 :     version number to 110.32.1.
932 :    
933 :     ----------------------------------------------------------------------
934 :     Name: Matthias Blume
935 : blume 771 Date: 2000/12/30 22:10:00 JST
936 :     Tag: blume-20001230-various
937 :     Description:
938 :    
939 :     Added proxy libraries for MLRISC and let MLRISC libraries refer
940 :     to each other using path anchors. (See CM manual for explanation.)
941 :    
942 :     Updated CM documentation.
943 :    
944 :     Fixed some bugs in CM.
945 :    
946 :     Implemented "proxy" libraries (= syntactic sugar for CM).
947 :    
948 :     Added "-quiet" option to makeml and changed runtime system accordingly.
949 :    
950 :     Added cleanup handler for exportML to reset timers and compiler stats.
951 :    
952 :     ----------------------------------------------------------------------
953 : george 761 Name: Lal George
954 :     Date: 2000/12/22 22:22:58 EST 2000
955 :     Tag: Release_110_32
956 :     Description:
957 :    
958 :     Infinite precision used throughout MLRISC.
959 :     see MLRISC/mltree/machine-int.sig
960 :    
961 :     ----------------------------------------------------------------------
962 : blume 756 Name: Matthias Blume
963 : blume 760 Date: 2000/12/22 23:16:00 JST
964 :     Tag: blume-20001222-warn
965 :     Description:
966 : blume 759
967 : blume 760 Corrected wording and formatting of some CM warning message which I
968 :     broke in my previous patch.
969 : blume 759
970 :     ----------------------------------------------------------------------
971 :     Name: Matthias Blume
972 : blume 763 Date: 2000/12/22 21:20:00 JST
973 :     Tag: blume-20001222-anchorenv
974 :     Description:
975 :    
976 :     Fixed CM's handling of anchor environments in connection with CMB.make.
977 :    
978 :     ----------------------------------------------------------------------
979 :     Name: Matthias Blume
980 : blume 758 Date: 2000/12/22 13:15:00 JST
981 :     Tag: blume-20001222-cleanup
982 :     Description:
983 :    
984 :     Removed src/cm/ffi which does not (and did not) belong here.
985 :    
986 :     ----------------------------------------------------------------------
987 :     Name: Matthias Blume
988 : blume 757 Date: 2000/12/21 23:55:00 JST
989 :     Tag: blume-20001221-exn
990 :     Description:
991 :    
992 :     Probably most important: CM no longer silently swallows all exceptions
993 :     in the compiler.
994 :     Plus: some other minor CM changes. For example, CM now reports some
995 :     sizes for generated binfiles (code, data, envpickle, lambdapickle).
996 :    
997 :     ----------------------------------------------------------------------
998 :     Name: Matthias Blume
999 : blume 756 Date: 2000/12/15 00:01:05 JST
1000 :     Tag: blume-20001215-dirtool
1001 :     Description:
1002 :    
1003 :     - "dir" tool added.
1004 :     - improvements and cleanup to Tools structure
1005 :     - documentation updates
1006 :    
1007 :     ----------------------------------------------------------------------
1008 : leunga 752 Name: Allen Leung
1009 : leunga 755 Date: Thu Dec 14 03:45:24 EST 2000
1010 :     Description:
1011 :     Tag: leunga-20001214-int-inf
1012 :     Description:
1013 :    
1014 :     In IntInf, added these standard functions, which are missing from our
1015 :     implementation:
1016 :    
1017 :     andb : int * int -> int
1018 :     xorb : int * int -> int
1019 :     orb : int * int -> int
1020 :     notb : int -> int
1021 :     << : int * word -> int
1022 :     ~>> : int * word -> int
1023 :    
1024 :     Not tested, I hope they are correct.
1025 :    
1026 :     ----------------------------------------------------------------------
1027 :     Name: Allen Leung
1028 : leunga 752 Date: Fri Dec 8 19:23:26 EST 2000
1029 :     Description:
1030 :     Tag: leunga-20001208-nowhere
1031 :     Description:
1032 :    
1033 :     Slight improvements to the 'nowhere' tool to handle OR-patterns,
1034 :     to generate better error messages etc. Plus a brief manual.
1035 :    
1036 :     ----------------------------------------------------------------------
1037 : george 749 Name: Lal George
1038 :     Date: 2000/12/08 09:54:02 EST 2000
1039 :     Tag: Release_110_31
1040 :     Description:
1041 : george 705
1042 : george 749 - Version 110.31
1043 : leunga 591 ----------------------------------------------------------------------
1044 : leunga 744 Name: Allen Leung
1045 :     Date: Thu Dec 7 22:01:04 EST 2000
1046 :     Tag: leunga-20001207-cell-monster-hack
1047 :     Description:
1048 :    
1049 :     Major MLRISC internal changes. Affect all clients.
1050 :     Summary:
1051 :    
1052 :     1. Type CELLS.cell = int is now replaced by a datatype.
1053 :     As a result, the old regmap is now gone. Almost all interfaces
1054 :     in MLRISC change as a consequence.
1055 :    
1056 :     2. A new brand version of machine description tool (v3.0) that generates
1057 :     modules expecting the new interface. The old version is removed.
1058 :    
1059 :     3. The RA interface has been further abstracted into two new functors.
1060 :     RISC_RA and X86RA. These functors have much simpler interfaces.
1061 :     [See also directory MLRISC/demo.]
1062 :    
1063 :     4. Some other new source->source code generation tools are available:
1064 :    
1065 :     a. MLRISC/Tools/RewriteGen -- generate rewriters from rules.
1066 :     b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules.
1067 :     I use this tool to generate the peephole optimizers---with the new
1068 :     cell type changes, peephole rules are becoming difficult to write
1069 :     without conditional pattern matching.
1070 :    
1071 :     5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't
1072 :     cover the entire MLRISC source tree so many things broke.
1073 :    
1074 :     6. CM files have been moved to the subdirectory MLRISC/cm.
1075 :     They are moved because there are a lot of them and they clutter up the
1076 :     root dir.
1077 :    
1078 :     7. More detailed documentation to come...
1079 :    
1080 :     NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do
1081 :     a makeml -rebuild first. This is because of other other
1082 :     changes that Matthias has made (see below).
1083 :    
1084 :    
1085 :     ----------------------------------------------------------------------
1086 : blume 733 Name: Matthias Blume
1087 : blume 742 Date: 2000/11/30 23:12:00 JST
1088 :     Tag: blume-20001130-filereorg
1089 :     Description:
1090 :    
1091 :     Some manual updates and some file reorganizations in CM.
1092 :    
1093 :     ----------------------------------------------------------------------
1094 :     Name: Matthias Blume
1095 : blume 737 Date: 2000/11/24 17:45:00 JST
1096 :     Tag: blume-20001124-link
1097 :     Description:
1098 :    
1099 :     Drastically improved link traversal code for the case that the dynamic
1100 :     value was already loaded at bootstrap time. As a result, CM and CMB
1101 :     now both load blazingly fast -- even on a very slow machine. Also,
1102 :     memory consumption has been further reduced by this.
1103 :    
1104 :     Warning: The format of the PIDMAP file has changed. THerefore, to
1105 :     bootstrap you have to do this:
1106 :    
1107 :     1. Run CMB.make
1108 :     2. Make a symbolic link for the boot directory:
1109 :     ln -s sml.boot.ARCH-OS xxx
1110 :     3. "Rebuild" the boot directory:
1111 :     ./makeml -boot xxx -rebuild sml ; rm xxx
1112 :     4. Boot normally:
1113 :     ./makeml
1114 :    
1115 :     ----------------------------------------------------------------------
1116 :     Name: Matthias Blume
1117 : blume 735 Date: 2000/11/21 21:20:00 JST
1118 :     Tag: blume-20001121-tools
1119 :     Description:
1120 :    
1121 :     Continued hacking on autoloading problem -- with success this time.
1122 :     Also changed tool-plugin mechanism. See new CM manual.
1123 :    
1124 :     ----------------------------------------------------------------------
1125 :     Name: Matthias Blume
1126 : blume 734 Date: 2000/11/19 14:30:00 JST
1127 :     Tag: blume-20001119-autoload
1128 :     Description:
1129 :    
1130 :     Some hacking to make autoloading faster. Success for CMB, no success
1131 :     so far for CM. There is a reduced structure CM' that autoloads faster.
1132 :     (This is a temporary, non-documented hack to be eliminated again when
1133 :     the general problem is solved.)
1134 :    
1135 :     ----------------------------------------------------------------------
1136 :     Name: Matthias Blume
1137 : blume 733 Date: 2000/11/17 14:10:00 JST
1138 :     Tag: blume-20001117-pickle-lib
1139 :     Description:
1140 :    
1141 :     1. Eliminated comp-lib.cm
1142 :     2. Made pickle-lib.cm
1143 :     3. Eliminated all uses of intset.sml (from comp-lib.cm)
1144 :     4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
1145 :     equivalent constructs from smlnj-lib.cm (INtHashTable).
1146 :     5. Point 4. also goes for those uses of intmap.* in MLRISC.
1147 :     Duplicated intmap modules thrown out.
1148 :     6. Hunted down all duplicated SCC code and replaced it with
1149 :     equivalent stuff (GraphSCCFn from smlnj-lib.cm).
1150 :     7. Rewrote Feedback module.
1151 :     8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it
1152 :     should be thrown out and equivalent modules from smlnj-lib.cm
1153 :     should be used (IntRedBlackSet, IntListSet, ...).
1154 :    
1155 :     Confirmed that compiler compiles to fixpoint.
1156 :    
1157 :     ----------------------------------------------------------------------
1158 : leunga 731 Name: Allen Leung
1159 :     Date: 2000/11/10 18:00:00
1160 :     Tag: leunga-20001110-new-x86-fp
1161 :    
1162 :     A new x86 floating point code generator has been added.
1163 :     By default this is turned off. To turn this on, do:
1164 :    
1165 :     CM.autoload "$smlnj/compiler.cm";
1166 :     Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
1167 :    
1168 :     Changes:
1169 :    
1170 :     1. Changed FTAN to FPTAN so that the assembly output is correct.
1171 :     2. Changed the extension callback for FTANGENT to generate:
1172 :    
1173 :     fptan
1174 :     fstp %st(0)
1175 :     instead of
1176 :     fptan
1177 :     fstpl ftempmem
1178 :    
1179 :     3. Numerous assembly fixes for x86.
1180 :    
1181 :     5. Cleaned up the machine code output module x86/x86MC.sml and added
1182 :     support for a whole bunch of instructions and addressing modes:
1183 :    
1184 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n)
1185 :     faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n)
1186 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st
1187 :     fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
1188 :     fxch %st(n)
1189 :     fld %st(n)
1190 :     fst %st(n)
1191 :     fst mem
1192 :     fstp %st(n)
1193 :     fucom %st(n)
1194 :     fucomp %st(n)
1195 :    
1196 :     All these are now generated when the fast fp mode is turned on.
1197 :    
1198 :     6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
1199 :    
1200 :     ----------------------------------------------------------------------
1201 : blume 729 Name: Matthias Blume
1202 :     Date: 2000/11/09 11:20:00 JST
1203 :     Tag: blume-20001109-scc
1204 :     Description:
1205 :    
1206 :     Eliminated some code duplication:
1207 :    
1208 :     1. Added "where" clause to GraphSCCFn in SML/NJ Library.
1209 :     (Otherwise the functor is useless.)
1210 :     2. Used GraphSCCFn where SCCUtilFun was used previously.
1211 :     3. Got rid of SCCUtilFun (in comp-lib.cm).
1212 :    
1213 :     ----------------------------------------------------------------------
1214 : george 721 Name: Lal George
1215 :     Date: 2000/11/06 09:02:21 EST 2000
1216 :     Tag: Release_110_30
1217 :     Description:
1218 :    
1219 :     - Version 110.30
1220 :     ----------------------------------------------------------------------
1221 : blume 715 Name: Matthias Blume
1222 : blume 716 Date: 2000/11/04 14:45:00
1223 :     Tag: blume-20001104-mlbuild
1224 :     Description:
1225 :    
1226 :     - Made ml-build faster on startup.
1227 :     - Documentation fixes.
1228 :    
1229 :     ----------------------------------------------------------------------
1230 :     Name: Matthias Blume
1231 : blume 715 Date: 2000/11/02 17:00:00 JST
1232 :     Tag: blume-20001102-condcomp
1233 :     Description:
1234 :    
1235 :     - Small tweaks to pickler -- new BOOTFILES!
1236 :     - Version bumped to 110.29.2.
1237 :     - Added conditional compilation facility to init.cmi (see comment there).
1238 :     ----------------------------------------------------------------------
1239 : leunga 713 Name: Allen Leung
1240 :     Date: 2000/10/23 19:31:00
1241 :     Tag: leunga-20001023-demo-ra
1242 :    
1243 :     1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
1244 :     2. Test programs for the graph library updated
1245 :     3. Some new MLRISC demo programs added
1246 :    
1247 :     ----------------------------------------------------------------------
1248 : blume 710 Name: Matthias Blume
1249 : blume 711 Date: 2000/08/31 22:15:00 JST
1250 :     Tag: blume-20001017-errmsg
1251 :     Description:
1252 :    
1253 :     More error message grief: Where there used to be no messages, there
1254 :     now were some that had bogus error regions. Fixed.
1255 :    
1256 :     ----------------------------------------------------------------------
1257 :     Name: Matthias Blume
1258 : blume 710 Date: 2000/08/31 17:30:00 JST
1259 :     Tag: blume-20001017-v110p29p1
1260 :     Description:
1261 :    
1262 :     I made a version 110.29.1 with new bootfiles.
1263 :    
1264 :     Changes: Modified pickler/unpickler for faster and leaner unpickling.
1265 :     CM documentation changes and a small bugfix in CM's error reporting.
1266 :    
1267 :     ----------------------------------------------------------------------
1268 : george 705 Name: Lal George
1269 :     Date: 2000/09/27 14:42:35 EDT
1270 :     Tag: george-20000927-nodestatus
1271 :     Description:
1272 :    
1273 :     Changed the type of the nodestatus, so that:
1274 :    
1275 :     SPILLED(~1) is now SPILLED
1276 :     SPILLED(m) where m>=0 is now MEMREG(m)
1277 :     SPILLED(s) where s<~1 is now SPILL_LOC(~s)
1278 :    
1279 :     ----------------------------------------------------------------------
1280 : blume 697 Name: Matthias Blume
1281 : blume 703 Date: 2000/09/07 14:45:00 JST
1282 :     Tag: blume-20000907-cmerrmsg
1283 :     Description:
1284 :    
1285 :     Small tweak to CM to avoid getting ML syntax error messages twice.
1286 :    
1287 :     ----------------------------------------------------------------------
1288 :     Name: Matthias Blume
1289 : blume 701 Date: 2000/08/31 18:00:00 JST
1290 :     Tag: blume-20000831-cvsbootfiles
1291 :     Description:
1292 :    
1293 :     New URL for boot files (because the 110.29 files on the BL server do
1294 :     now work correctly with my updated install scripts for yacc and lex).
1295 :    
1296 :     ----------------------------------------------------------------------
1297 :     Name: Matthias Blume
1298 : blume 697 Date: 2000/08/08 12:33:00 JST
1299 :     Tag: blume-20000808-manual
1300 :     Description:
1301 :    
1302 :     Tiny update to CM manual.
1303 :    
1304 :     ----------------------------------------------------------------------
1305 : leunga 695 Name: Allen Leung
1306 :     Date: 2000/08/7 19:31:00
1307 :     Tag: leunga-20000807-a-whole-bunch-of-stuff
1308 :    
1309 :     Moby, C--, SSA, x86, machine descriptions etc. Should only affect C--
1310 :     and Mobdy.
1311 :    
1312 :     1. x86
1313 :    
1314 :     a. Fixes to peephole module by John and Dan.
1315 :     b. Assembly fix to SETcc by Allen.
1316 :     c. Fix to c-call by John.
1317 :     d. Fix to spilling by John. (This one deals with the missing FSTPT case)
1318 :     e. Instruction selection optimization to SETcc as suggested by John.
1319 :    
1320 :     For example,
1321 :    
1322 :     MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
1323 :    
1324 :     should generate:
1325 :    
1326 :     MOVL a, x
1327 :     SUBL b, x
1328 :     SHRL 31, x
1329 :    
1330 :     2. IR stuff
1331 :    
1332 :     A bunch of new DJ-graph related algorithms added. These
1333 :     speed up SSA construction.
1334 :    
1335 :     3. SSA + Scheduling
1336 :    
1337 :     Added code for SSA and scheduling to the repository
1338 :    
1339 :     ----------------------------------------------------------------------
1340 : george 694 Name: Lal George
1341 :     Date: 2000/07/27 11:53:14 EDT
1342 :    
1343 :     Tag: lal-20000727-linux-ppc
1344 :     Description:
1345 :    
1346 :     Made changes to support Linux PPC.
1347 :     p.s. I have confirmation that the 110.29 boot files work fine.
1348 :    
1349 :     ----------------------------------------------------------------------
1350 : blume 684 Name: Matthias Blume
1351 : blume 692 Date: 2000/07/27 17:40:00 JST
1352 :     Tag: blume-20000727-scripts
1353 :     Description:
1354 :    
1355 :     !!!! WARNING !!!!
1356 :     You must recompile the runtime system!
1357 :     !!!! WARNING !!!!
1358 :    
1359 :     This is basically another round of script-enhancements:
1360 :    
1361 :     1. sml, ml-build, and ml-makedepend accept options -D and -U to define
1362 :     and undefine CM preprocessor symbols.
1363 :    
1364 :     2. ml-build avoids generating a new heap image if it finds that the
1365 :     existing one is still ok. (The condition is that no ML file had to
1366 :     be recompiled and all ML files are found to be older that the heap
1367 :     file.)
1368 :    
1369 :     To make this work smoothly, I also hacked the runtime system as
1370 :     well as SMLofNJ.SysInfo to get access to the heap image suffix
1371 :     (.sparc-solaris, ...) that is currently being used.
1372 :    
1373 :     Moreover, the signature of CM.mk_standalone has changed. See the
1374 :     CM manual.
1375 :    
1376 :     3. ml-makedepend accepts additional options -n, -a, and -o. (See the
1377 :     CM manual for details.)
1378 :    
1379 :     4. More CM manual updates:
1380 :     - all of the above has been documented.
1381 :     - there is now a section describing the (CM-related) command line
1382 :     arguments that are accepted by the "sml" command
1383 :    
1384 :     ----------------------------------------------------------------------
1385 :     Name: Matthias Blume
1386 : blume 691 Date: 2000/07/25 16:20:00 JST
1387 :     Tag: blume-20000725-makedepend
1388 :     Description:
1389 :    
1390 :     Added a script called ml-makedepend. This can be used in makefiles
1391 :     for Unix' make in a way very similar to the "makedepend" command for
1392 :     C.
1393 :    
1394 :     The script internally uses function CM.sources.
1395 :    
1396 :     Synopsis:
1397 :    
1398 :     ml-makedepend [-f makefile] cmfile targetname
1399 :    
1400 :     The default for the makefile is "makefile" (or "Makefile" should
1401 :     "makefile" not exist).
1402 :    
1403 :     ml-makedepend adds a cmfile/targetname-specific section to this
1404 :     makefile (after removing the previous version of this section). The
1405 :     section contains a single dependency specification with targetname on
1406 :     the LHS (targetname is an arbitrary name), and a list of files derived
1407 :     from the cmfile on the RHS. Some of the files on the RHS are
1408 :     ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to
1409 :     "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
1410 :     path names. The makefile writer is responsible for making sure that
1411 :     these variables have correct at the time "make" is invoked.
1412 :    
1413 :     ----------------------------------------------------------------------
1414 :     Name: Matthias Blume
1415 : blume 690 Date: 2000/07/22 23:30:00 JST
1416 :     Tag: blume-20000722-urlupdate
1417 :     Description:
1418 :    
1419 :     Changed BOOT and config/srcarchiveurl to point to BL server:
1420 :    
1421 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
1422 :    
1423 :     ----------------------------------------------------------------------
1424 :     Name: Matthias Blume
1425 : blume 686 Date: 2000/07/18 18:00:00 JST
1426 :     Tag: blume-20000718-Version_110_29
1427 :     Description:
1428 :    
1429 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
1430 :    
1431 :     2. Updated config/version to 110.29
1432 :    
1433 :     3. Updated config/srcarchiveurl
1434 :    
1435 :     3. New boot files!
1436 :     ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
1437 :    
1438 :     ----------------------------------------------------------------------
1439 :     Name: Matthias Blume
1440 : blume 684 Date: 2000/07/11 13:58:00 JST
1441 :     Tag: blume-20000711-doctypo
1442 :     Description:
1443 :    
1444 :     Fixed a few typos in CM manual.
1445 :    
1446 :     ----------------------------------------------------------------------
1447 : leunga 683 Name: Allen Leung
1448 :     Date: 2000/06/15 00:38:00
1449 :     Tag: leunga-20000704-sparc-x86
1450 :    
1451 :     1. x86 peephole improvement sp += k; sp -= k => nop [from John]
1452 :     2. fix to x86 RET bug [found by Dan Grossman]
1453 :     3. sparc assembly bug fix for ticc instructions [found by Fermin]
1454 :    
1455 :     Affects c-- and moby only
1456 :    
1457 :     ----------------------------------------------------------------------
1458 : blume 680 Name: Matthias Blume
1459 : blume 682 Date: 2000/07/04 15:26:00
1460 :     Tag: blume-20000704-trigger
1461 :     Description:
1462 :    
1463 :     1. Improvements to CM manual.
1464 :     2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
1465 :     of getting a back-trace. The function, when called, raises an
1466 :     internal exception which explicitly carries the full back-trace history,
1467 :     so it is unaffected by any intervening handle-raise pairs ("trivial"
1468 :     or not). The interactive loop will print that history once it arrives
1469 :     at top level.
1470 :     Short of having all exceptions implicitly carry the full history, the
1471 :     recommended way of using this facility is:
1472 :     - compile your program with instrumentation "on"
1473 :     - run it, when it raises an exception, look at the history
1474 :     - if the history is "cut off" because of some handler, go and modify
1475 :     your program so that it explicitly calls BTrace.trigger
1476 :     - recompile (still instrumented), and rerun; look at the full history
1477 :    
1478 :     ----------------------------------------------------------------------
1479 :     Name: Matthias Blume
1480 :     Date: 2000/07/03 15:36:00 JST
1481 : blume 680 Tag: blume-20000702-manual
1482 :     Description:
1483 :    
1484 :     Small corrections and updates to CM manual.
1485 :    
1486 :     ----------------------------------------------------------------------
1487 : blume 682 Name: Matthias Blume
1488 : blume 679 Date: 2000/06/29 16:04:00 JST
1489 :     Tag: blume-20000629-yacctool
1490 :     Description:
1491 :    
1492 :     Changes:
1493 :    
1494 :     1. Class "mlyacc" now takes separate arguments to pass options to
1495 :     generated .sml- and .sig-files independently.
1496 :     2. Corresponding CM manual updates.
1497 :     3. BTrace module now also reports call sites. (However, for loop clusters
1498 :     it only shows from where the cluster was entered.) There are associated
1499 :     modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
1500 :    
1501 :     ----------------------------------------------------------------------
1502 : blume 675 Name: Matthias Blume
1503 : blume 678 Date: 2000/06/27 16:51:00 JST
1504 :     Tag: blume-20000627-noweb
1505 :     Description:
1506 :    
1507 :     Changes:
1508 :    
1509 :     1. Implemented "subdir" and "witness" options for noweb tool.
1510 :     This caused some slight internal changes in CM's tool implementation.
1511 :     2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning
1512 :     some remaining issues from earlier path anchor changes.
1513 :     3. Updated CM manual accordingly.
1514 :    
1515 :     4. Changed implementation of back-tracing so that I now consider it
1516 :     ready for prime-time.
1517 :    
1518 :     In particular, you don't have to explicitly trigger the back-trace
1519 :     anymore. Instead, if you are running BTrace-instrumented code and
1520 :     there is an uncaught exception (regardless of whether or not it was
1521 :     raised in instrumented code), the top-level evalloop will print
1522 :     the back-trace.
1523 :    
1524 :     Features:
1525 :    
1526 :     - Instrumented and uninstrumented code work together seemlessly.
1527 :     (Of course, uninstrumented code is never mentioned in actual
1528 :     back-traces.)
1529 :    
1530 :     - Asymptotic time- and space-complexity of instrumented code is
1531 :     equal to that of uninstrumented code. (This means that
1532 :     tail-recursion is preserved by the instrumentation phase.)
1533 :    
1534 :     - Modules whose code has been instrumented in different sessions
1535 :     work together without problem.
1536 :    
1537 :     - There is no penalty whatsoever on uninstrumented code.
1538 :    
1539 :     - There is no penalty on "raise" expressions, even in
1540 :     instrumented code.
1541 :    
1542 :     A potential bug (or perhaps it is a feature, too):
1543 :    
1544 :     A back-trace reaches no further than the outermost instrumented
1545 :     non-trivial "raise". Here, a "trivial" raise is one that is the
1546 :     sole RHS of a "handle" rule. Thus, back-traces reach trough
1547 :    
1548 :     <exp> handle e => raise e
1549 :    
1550 :     and even
1551 :    
1552 :     <exp> handle Foo => raise Bar
1553 :    
1554 :     and, of course, through
1555 :    
1556 :     <exp> handle Foo => ...
1557 :    
1558 :     if the exception was not Foo.
1559 :    
1560 :     Back-traces always reach right through any un-instrumented code
1561 :     including any of its "handle" expressions, trivial or not.
1562 :    
1563 :     To try this out, do the following:
1564 :    
1565 :     - Erase all existing binfiles for your program.
1566 :     (You may keep binfiles for those modules where you think you
1567 :     definitely don't need back-tracing.)
1568 :     - Turn on back-trace instrumentation:
1569 :     SMLofNJ.Internals.BTrace.mode (SOME true);
1570 :     - Recompile your program. (I.e., run "CM.make" or "use".)
1571 :     - You may now turn instrumentation off again (if you want):
1572 :     SMLofNJ.Internals.BTrace.mode (SOME false);
1573 :     - Run your program as usual. If it raises an exception that
1574 :     reaches the interactive toplevel, then a back-trace will
1575 :     automatically be printed. After that, the toplevel loop
1576 :     will print the exception history as usual.
1577 :    
1578 :     ----------------------------------------------------------------------
1579 :     Name: Matthias Blume
1580 : blume 677 Date: 2000/06/26 09:56:46 JST
1581 :     Tag: blume-20000626-setup
1582 :     Description:
1583 :    
1584 :     CM: - setup-parameter to "sml" added; this can be used to run arbitrary
1585 :     ML code before and after compiling a file (e.g., to set compiler
1586 :     flags)
1587 :    
1588 :     Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
1589 :     - associated changes to btrace.sml (BTrace instrumentation pass)
1590 :     - cleaner implementation of btimp.sml (BTrace tracing and report
1591 :     module)
1592 :    
1593 :     CM manual: * new path encoding documented
1594 :     * description of setup-parameter to "sml" added
1595 :    
1596 :     The biggest user-visible change to back-tracing is that it is no
1597 :     longer necessary to compile all traced modules within the same
1598 :     session. (This was a real limitation.)
1599 :    
1600 :     ----------------------------------------------------------------------
1601 :     Name: Matthias Blume
1602 : blume 676 Date: 2000/06/24 12:40:00 JST
1603 :     Tag: blume-20000624-startup
1604 :     Description:
1605 :    
1606 :     Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_
1607 :     bit too often -- to put it mildly. :)
1608 :    
1609 :     ----------------------------------------------------------------------
1610 :     Name: Matthias Blume
1611 : blume 675 Date: 2000/06/23 18:20:00 JST
1612 :     Tag: blume-20000623-btrace
1613 :     Description:
1614 :    
1615 :     This updates adds a backtrace facility to aid programmers in debugging
1616 :     their programs. This involves the following changes:
1617 :    
1618 :     1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
1619 :     keeping track of the current call stack. When programs are compiled
1620 :     in a special mode, the compiler will insert calls to these hooks
1621 :     into the user program.
1622 :     "Hook" means that it is possible for different implementations of
1623 :     back-tracing to register themselves (at different times).
1624 :    
1625 :     2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
1626 :     as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off.
1627 :     It can be turned on using this call:
1628 :     SMLofNJ.Internals.BTrace.mode (SOME true);
1629 :     Turning it off again:
1630 :     SMLofNJ.Internals.BTrace.mode (SOME false);
1631 :     Querying the current status:
1632 :     SMLofNJ.Internals.BTrace.mode NONE;
1633 :     Annotated programs are about twice as big as normal ones, and they
1634 :     run a factor of 2 to 4 slower with a dummy back-trace plugin (one
1635 :     where all hooks do nothing). The slowdown with a plugin that is
1636 :     actually useful (such as the one supplied by default) is even greater,
1637 :     but in the case of the default plugin it is still only an constant
1638 :     factor (amortized).
1639 :    
1640 :     3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
1641 :     with a sub-structure BTrace for controlling back-tracing. In particular,
1642 :     the above-mentioned function "mode" controls whether the annotation
1643 :     phase is invoked by the compiler. Another important function is
1644 :     "trigger": when called it aborts the current execution and causes
1645 :     the top-level loop to print a full back-trace.
1646 :    
1647 :     4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
1648 :     for back-tracing. It keeps track of the dynamic call stack and in
1649 :     addition to that it keeps a partial history at each "level" of that
1650 :     stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls
1651 :     d and b (at separate times, dynamically), then the report will show:
1652 :    
1653 :     GOTO d
1654 :     /c
1655 :     GOTO \b
1656 :     CALL a
1657 :    
1658 :     This shows that there was an initial non-tail call of a, then a
1659 :     tail-call to b or c, looping behavior in a cluster of functions that
1660 :     consist of b and c, and then a goto from that cluster (i.e., either from
1661 :     b or from c) to d.
1662 :    
1663 :     Note that (depending on the user program) the amount of information
1664 :     that the back-trace module has to keep track of at each level is bounded
1665 :     by a constant. Thus, the whole implementation has the same asymptotical
1666 :     complexity as the original program (both in space and in time).
1667 :    
1668 :     5. compiler/TopLevel/interact/evalloop.sml has been modified to
1669 :     handle the special exception SMLofNJ.Internals.BTrace.BTrace
1670 :     which is raised by the "trigger" function mentioned above.
1671 :    
1672 :     Notes on usage:
1673 :    
1674 :     - Annotated code works well together with unannotated code:
1675 :     Unannotated calls simply do not show up at all in the backtrace.
1676 :    
1677 :     - It is not a good idea to let modules that were annotated during
1678 :     different sessions run at the same time. This is because the compiler
1679 :     chooses small integers to identify individual functions, and there
1680 :     will be clashes if different modules were compiled in separate sessions.
1681 :     (Nothing will crash, and you will even be told about the clashes, but
1682 :     back-trace information will in general not be useful.)
1683 :    
1684 :     - Back-tracing can be confused by callcc and capture.
1685 :    
1686 :     - The only way of getting a back-trace right now is to explicitly
1687 :     invoke the "trigger" function from your user program. Eventually, we
1688 :     should make every exception carry back-trace information (if
1689 :     available). But since this creates more overhead at "raise"-time
1690 :     (similar to the current exnHistory overhead), I have not yet
1691 :     implemented this. (The implementation will be rather easy.) With
1692 :     exceptions carrying back-trace information, this facility will be even
1693 :     more useful because users don't need to modify their programs...
1694 :    
1695 :     - While it is possible to compile the compiler with back-trace
1696 :     annotations turned on (I did it to get some confidence in
1697 :     correctness), you must make absolutely sure that core.sml and
1698 :     btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually
1699 :     be compiled with annotation because there is no core access yet, but
1700 :     if you compile btimp.sml with annotation, then the system will go into
1701 :     an infinite recursion and crash.)
1702 :     Since CM currently does not know about BTrace, the only way to turn
1703 :     annotations on and off for different modules of the compiler is to
1704 :     interrupt CMB.make, change the settings, and re-invoke it. Of course,
1705 :     this is awkward and clumsy.
1706 :    
1707 :     Sample sessions:
1708 :    
1709 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
1710 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
1711 :     [autoloading]
1712 :     [autoloading done]
1713 :     val it = false : bool
1714 :     - structure X = struct
1715 :     - fun main n = let
1716 :     - fun a (x, 0) = d x
1717 :     - | a (x, n) = b (x, n - 1)
1718 :     - and b (x, n) = c (x, n)
1719 :     - and c (x, n) = a (x, n)
1720 :     - and d x = e (x, 3)
1721 :     - and e (x, 0) = f x
1722 :     - | e (x, n) = e (x, n - 1)
1723 :     - and f 0 = SMLofNJ.Internals.BTrace.trigger ()
1724 :     - | f n = n * g (n - 1)
1725 :     - and g n = a (n, 3)
1726 :     - in
1727 :     - f n
1728 :     - end
1729 :     - end;
1730 :     structure X : sig val main : int -> int end
1731 :     - X.main 3;
1732 :     *** BACK-TRACE ***
1733 :     GOTO stdIn:4.2-13.20: X.main[2].f
1734 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
1735 :     GOTO stdIn:4.2-13.20: X.main[2].d
1736 :     / stdIn:4.2-13.20: X.main[2].a
1737 :     | stdIn:4.2-13.20: X.main[2].b
1738 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
1739 :     CALL stdIn:4.2-13.20: X.main[2].g
1740 :     GOTO stdIn:4.2-13.20: X.main[2].f
1741 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
1742 :     GOTO stdIn:4.2-13.20: X.main[2].d
1743 :     / stdIn:4.2-13.20: X.main[2].a
1744 :     | stdIn:4.2-13.20: X.main[2].b
1745 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
1746 :     CALL stdIn:4.2-13.20: X.main[2].g
1747 :     GOTO stdIn:4.2-13.20: X.main[2].f
1748 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
1749 :     GOTO stdIn:4.2-13.20: X.main[2].d
1750 :     / stdIn:4.2-13.20: X.main[2].a
1751 :     | stdIn:4.2-13.20: X.main[2].b
1752 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
1753 :     CALL stdIn:4.2-13.20: X.main[2].g
1754 :     GOTO stdIn:4.2-13.20: X.main[2].f
1755 :     CALL stdIn:2.15-17.4: X.main[2]
1756 :     -
1757 :    
1758 :     (Note that because of a FLINt bug the above code currently does not
1759 :     compile without BTrace turned on.)
1760 :    
1761 :     Here is another example, using my modified Tiger compiler:
1762 :    
1763 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
1764 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
1765 :     [autoloading]
1766 :     [autoloading done]
1767 :     val it = false : bool
1768 :     - CM.make "sources.cm";
1769 :     [autoloading]
1770 :     ...
1771 :     [autoloading done]
1772 :     [scanning sources.cm]
1773 :     [parsing (sources.cm):parse.sml]
1774 :     [creating directory CM/SKEL ...]
1775 :     [parsing (sources.cm):tiger.lex.sml]
1776 :     ...
1777 :     [wrote CM/sparc-unix/semant.sml]
1778 :     [compiling (sources.cm):main.sml]
1779 :     [wrote CM/sparc-unix/main.sml]
1780 :     [New bindings added.]
1781 :     val it = true : bool
1782 :     - Main.compile ("../testcases/merge.tig", "foo.out");
1783 :     *** BACK-TRACE ***
1784 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
1785 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1786 :     CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
1787 :     GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
1788 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1789 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1790 :     CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
1791 :     / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
1792 :     CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
1793 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
1794 :     CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
1795 :     CALL main.sml:1.18-118.4: Main.compile[2]
1796 :     -
1797 :    
1798 :     ----------------------------------------------------------------------
1799 : blume 673 Name: Matthias Blumen
1800 :     Date: 2000/06/21 18:00:00 JST
1801 :     Tag: blume-20000621-manual
1802 :     Description:
1803 :    
1804 :     CM manual update: Path environments documented.
1805 :    
1806 :     ----------------------------------------------------------------------
1807 : blume 666 Name: Matthias Blume
1808 : blume 672 Date: 2000/06/19 13:40:00
1809 :     Tag: blume-20000619-manual
1810 :     Description:
1811 :    
1812 :     CM manual and system/README update. This only covers the fact that
1813 :     there are no more implicit anchors. (Path environments and the "bind"
1814 :     option to "cm" have yet to be documented.)
1815 :    
1816 :     ----------------------------------------------------------------------
1817 :     Name: Matthias Blume
1818 : blume 671 Date: 2000/06/19 11:05:00 JST
1819 :     Tag: blume-20000619-chdir-bugfix
1820 :     Description:
1821 :    
1822 :     Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
1823 :    
1824 :     ----------------------------------------------------------------------
1825 :     Name: Matthias Blume
1826 : blume 670 Date: 2000/06/18 22:00:10 JST
1827 :     Tag: blume-20000618-implicit-anchors-really-gone
1828 :     Description:
1829 :    
1830 :     I updates the previous HISTORY entry where I forgot to mention that
1831 :     implicit anchors are no longer with us.
1832 :    
1833 :     The current update also gets rid of the (now useless) controller
1834 :     CM.Control.implicit_anchors.
1835 :    
1836 :     ----------------------------------------------------------------------
1837 :     Name: Matthias Blume
1838 : blume 666 Date: 2000/06/16 17:30:00 JST
1839 :     Tag: blume-20000616-anchorenv
1840 :     Description:
1841 :    
1842 :     This patch implements the long anticipated (just kidding :) "anchor
1843 :     environment" mechanism. In the course of doing this, I also
1844 :     re-implemented CM's internal "SrcPath" module from scratch. The new
1845 :     one should be more robust in certain boundary cases. In any case, it
1846 :     is a lot cleaner than its predecessor (IMHO).
1847 :    
1848 :     This time, although there is yet another boot file format change, I
1849 :     kept the unpickler backward-compatible. As a result, no new bootfiles
1850 :     are necessary and bootstrapping is straightforward. (You cannot read
1851 :     new bootfiles into an old system, but the other way around is no
1852 :     problem.)
1853 :    
1854 :     Visible changes:
1855 :    
1856 : blume 670 ** 0. Implicit path anchors (without the leading $-symbol) are no
1857 :     longer recognized at all. This means that such path names are not
1858 :     illegal either. For example, the name basis.cm simply refers to a
1859 :     local file called "basis.cm" (i.e, the name is an ordinary path
1860 :     relative to .cm-files directory). Or, to put it differently, only
1861 :     names that start with $ are anchored paths.
1862 : blume 666
1863 : blume 670 ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
1864 :     vanished.
1865 :    
1866 :     John (Reppy) had critizised this as soon as I originally proposed and
1867 : blume 666 implemented it, but at that time I did not really deeply believe
1868 :     him. :) Now I came full-circle because I need the $<singlearc> syntax
1869 :     in another place where it cannot be seen as an abbreviation for
1870 :     $/<singlearc>. To avoid the confusion, $<singlearc> now means what it
1871 :     seems to mean (i.e., it "expands" into the corresponding anchor
1872 :     value).
1873 :    
1874 :     However, when paths are used as members in CM description files, it
1875 :     continues to be true that there must be at least another arc after the
1876 :     anchor. This is now enforced separately during semantic analysis
1877 : blume 670 (i.e., from a lexical/syntactical point of view, the notation is ok.)
1878 : blume 666
1879 :     ** 2. The "cm" class now accepts an option "bind". The option's value
1880 :     is a sub-option list of precisely two items -- one labeled "anchor"
1881 :     and the other one labeled "value". As you might expect, "anchor" is
1882 :     used to specify an anchor name to be bound, and "value" specifies what
1883 :     the anchor is being bound to.
1884 :    
1885 :     The value must be a directory name and can be given in either standard
1886 :     syntax (including the possibility that it is itself an anchored path)
1887 :     or native syntax.
1888 :    
1889 :     Examples:
1890 :    
1891 :     foo.cm (bind:(anchor:bar value:$mystuff/bar))
1892 :     lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *)
1893 :    
1894 :     and so on.
1895 :    
1896 :     The meaning of this is that the .cm-file will be processed with an
1897 :     augmented anchor environment where the given anchor(s) is/are bound to
1898 :     the given values(s).
1899 :    
1900 :     The rationale for having this feature is this: Suppose you are trying
1901 :     to use two different (already stable) libraries a.cm and b.cm (that
1902 :     you perhaps didn't write yourself). Further, suppose each of these
1903 :     two libraries internally uses its own auxiliary library $aux/lib.cm.
1904 :     Normally you would now have a problem because the anchor "lib" can not
1905 :     be bound to more than one value globally. Therefore, the project that
1906 :     uses both a.cm and b.cm must locally redirect the anchor to some other
1907 :     place:
1908 :    
1909 :     a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
1910 :     b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
1911 :    
1912 :     This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
1913 :     /usr/lib/smlnj/b-stuff/aux.cm, respectively.
1914 :    
1915 :     Hard-wiring path names is a bit inflexible (and CM will verbosely warn
1916 :     you when you do so at the time of CM.stabilize). Therefore, you can
1917 :     also use an anchored path as the value:
1918 :    
1919 :     a.cm (bind:(anchor:lib value:$a-lib))
1920 :     b.cm (bind:(anchor:lib value:$b-lib))
1921 :    
1922 :     Now you can globally configure (using the usual CM.Anchor.anchor or
1923 :     pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib"
1924 :     itself is always locally bound, setting it globally is no longer
1925 :     meaningful or necessary (but it does not hurt either). In fact, "lib"
1926 :     can still be used as a global anchor for separate purposes. As a
1927 :     matter of fact, one can locally define "lib" in terms of a global
1928 :     "lib":
1929 :    
1930 :     a.cm (bind:(anchor:lib value:$lib/a))
1931 :     b.cm (bind:(anchor:lib value:$lib/b))
1932 :    
1933 :     ** 3: The encoding of path names has changed. This affects the way
1934 :     path names are shown in CM's progress report and also the internal
1935 :     protocol encoding used for parallel make.
1936 :    
1937 :     The encoding now uses one or more ':'-separated segments. Each
1938 :     segments corresponds to a file that has been specified relative to the
1939 :     file given by its preceding segment. The first segment is either
1940 :     relative to the CWD, absolute, or anchored. Each segment itself is
1941 :     basically a Unix pathname; all segments but the first are relative.
1942 :    
1943 :     Example:
1944 :    
1945 :     $foo/bar/baz.cm:a/b/c.sml
1946 :    
1947 :     This path denotes the file bar/a/b/c.sml relative to the directory
1948 :     denoted by anchor "foo". Notice that the encoding also includes
1949 :     baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such
1950 :     paths are resolved relative to the .cm-files directory, so baz.cm must
1951 :     be ignored to get the "real" pathname.
1952 :    
1953 :     To make this fact more obvious, CM puts the names of such "virtual
1954 :     arcs" into parentheses when they appear in progress reports. (No
1955 :     parentheses will appear in the internal protocol encoding.) Thus,
1956 :     what you really see is:
1957 :    
1958 :     $foo/bar/(baz.cm):a/b/c.sml
1959 :    
1960 :     I find this notation to be much more informative than before.
1961 :    
1962 :     Another new feature of the encoding is that special characters
1963 :     including parentheses, colons, (back)slashes, and white space are
1964 :     written as \ddd (where ddd is the decimal encoding of the character).
1965 :    
1966 : blume 670 *** The CM manual still needs to be updated.
1967 :    
1968 : blume 666 ----------------------------------------------------------------------
1969 : leunga 660 Name: Allen Leung
1970 :     Date: 2000/06/15 00:38:00
1971 :     Tag: leunga-20000615-x86-peephole
1972 :    
1973 :     x86 Peephole fix by Fermin. Affects c-- and moby only.
1974 :    
1975 :     ----------------------------------------------------------------------
1976 : blume 658 Name: Matthias Blume
1977 :     Date: 2000/06/12 11:40:00
1978 :     Tag: blume-20000612-parmakefix
1979 :     Description:
1980 :    
1981 :     More cleanup after changing the file naming scheme: This time I
1982 :     repaired the parallel make mechanism for CMB.make which I broke earlier.
1983 :    
1984 :     ----------------------------------------------------------------------
1985 : leunga 657 Name: Allen Leung
1986 :     Date: 2000/06/09 01:25:00
1987 :     Tag: leunga-20000609-various
1988 :    
1989 :     None of these things should affect normal SML/NJ operations
1990 :    
1991 :     1. Peephole improvements provided by Fermin (c--)
1992 :     2. New annotation DEFUSE for adding extra dependence (moby)
1993 :     3. New X86 LOCK instructions (moby)
1994 :     4. New machine description language for reservation tables (scheduling)
1995 :     5. Fixes to various optimization/analysis modules (branch chaining, dominator
1996 :     trees etc.)
1997 :     6. I've changed the CM files so that they can work with versions
1998 :     110.0.6, 110.25 and 110.28
1999 :    
2000 :     ----------------------------------------------------------------------
2001 : blume 652 Name: Matthias Blume
2002 : blume 656 Date: 2000/06/09 12:40:00
2003 :     Tag: blume-20000609-log
2004 :     Description:
2005 :    
2006 :     - Removed all(?) remaining RCS Log entries from sources.
2007 :    
2008 :     - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
2009 :     anchored paths).
2010 :    
2011 :     ----------------------------------------------------------------------
2012 :     Name: Matthias Blume
2013 : blume 653 Date: 2000/06/07 17:00:00 JST
2014 :     Tag: blume-20000607-no-implicit-anchors
2015 :     Description:
2016 :    
2017 :     1. This update changes the default setting for
2018 :     CM.Control.implicit_anchors from true to false. This means that
2019 :     implicit anchors are no longer permitted by default. I also tried to
2020 :     make sure that nothing else still relies on implicit anchors.
2021 :     (This is the next step on the schedule towards a CM that does not even
2022 :     have the notion of implicit anchors anymore.)
2023 :    
2024 :     2. More CM manual updates.
2025 :    
2026 :     3. I managed to track down and fix the pickling bug I mentioned last
2027 :     time. Because of the previously existing workaround, this entails no
2028 :     immediate practical changes.
2029 :    
2030 :     ----------------------------------------------------------------------
2031 :     Name: Matthias Blume
2032 : blume 652 Date: 2000/06/06 11:15:00 JST
2033 :     Tag: blume-20000606-lazierpickle
2034 :     Description:
2035 :    
2036 :     !!!! NEW BOOT FILES !!!!
2037 :    
2038 :     * The main purpose of this update is to make library pickles lazier in
2039 :     order to reduce the initial space penalty for autoloading a library.
2040 :     As a result, it is now possible to have $smlnj/compiler.cm
2041 :     pre-registered. This should take care of the many complaints or
2042 :     inquiries about missing structure Compiler. This required changes to
2043 :     CM's internal data structures and small tweaks to some algorithms.
2044 :    
2045 :     As a neat additional effect, it is no longer necessary (for the sake
2046 :     of lean heap image files) to distinguish between a "minimal" CM and a
2047 :     "full" CM. Now, there is only one CM (i.e., the "full" version:
2048 :     $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
2049 :     interactive top level. ($smlnj/cm/minimal.cm is gone.)
2050 :    
2051 :     To make the life of compiler-hackers easier, "makeml" now also
2052 :     pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other
2053 :     words, after you bootstrap a new sml for the first time, you will not
2054 :     have to autoload $smlnj/cmb.cm again afterwards. (The first time
2055 :     around you will still have to do it, though.)
2056 :    
2057 :     * A second change consists of major updates to the CM manual. There
2058 :     are now several appendices with summary information and also a full
2059 :     specification of the CM description file syntax.
2060 :    
2061 :     * In directory src/system I added the script "allcross". This script
2062 :     invokes sml and cross-compiles the compiler for all supported
2063 :     architectures. (Useful when providing a new set of boot files.)
2064 :    
2065 :     * There seems to be a latent bug in my "lazy pickles" mechanism. I
2066 :     added a small tweak to pickle-util.sml to work around this problem,
2067 :     but it is not a proper fix yet. I will investigate further. (The
2068 :     effect of the bug was an inflation of library pickle size.)
2069 :    
2070 :     * Version number increased to 110.28.1 (to avoid compatibility problems).
2071 :    
2072 :     ----------------------------------------------------------------------
2073 : leunga 646 Name: Allen Leung
2074 : leunga 648 Date: 2000/05/25 17:28 EDT
2075 :     Tag: leunga-20000525-ra
2076 :     Description:
2077 :    
2078 :     Fixed a bug in freezing phase of the register allocator.
2079 :    
2080 :     ----------------------------------------------------------------------
2081 :     Name: Allen Leung
2082 : leunga 647 Date: 2000/05/15 22:53 EDT
2083 : leunga 646 Tag: leunga-20000515-alpha-x86-ra
2084 :     Description:
2085 :    
2086 :     1. Alpha
2087 :    
2088 :     Slight cleanup. Removed the instruction SGNXL
2089 :    
2090 :     2. X86
2091 :    
2092 :     Added the following instructions to the instruction set:
2093 :    
2094 :     ROLx, RORx,
2095 :     BTx, BTSx, BTLx, BTRx,
2096 :     XCHGx, and variants with the LOCK prefix
2097 :    
2098 :     3. Register Allocation
2099 :    
2100 :     The module ra-rewrite-with-renaming has been improved.
2101 :    
2102 : leunga 647 These have no effect on SML/NJ.
2103 :    
2104 : leunga 646 ----------------------------------------------------------------------
2105 : blume 642 Name: Matthias Blume
2106 : blume 645 Date: 2000/05/15 16:20:00 JST
2107 :     Tag: blume-20000515-lightrebuild
2108 :     Description:
2109 :    
2110 :     1. I added an alternative to "-rebuild" to "makeml". The difference is
2111 :     that prior to calling CMB.make' the CM-variable "LIGHT" will be
2112 :     defined. In effect, the command will not build any cross-compiler
2113 :     backends and therefore finish more quickly.
2114 :    
2115 :     The "fixpt" script also takes a "-light" switch to be able to use
2116 :     this new facility while compiling for a fixpoint.
2117 :    
2118 :     2. I replaced all mentions of anchored paths in group owner specifications
2119 :     with simple relative paths (usually starting with "..").
2120 :     The rationale is that a library's internal workings should not be
2121 :     compromised by the lack of some anchor. (An anchor is necessary
2122 :     for someone who wants to refer to the library by an anchored path,
2123 :     but it should not be necessary to build the same library in the first
2124 :     place.)
2125 :    
2126 :     3. I changed the way CM's tool mechanism determines the shell command
2127 :     string used for things like ml-yacc etc. so that it does not break
2128 :     when CM.Control.implicit_anchors is turned off.
2129 :    
2130 :     ----------------------------------------------------------------------
2131 :     Name: Matthias Blume
2132 : blume 644 Date: 2000/05/12 18:20:00 JST
2133 :     Tag: blume-20000512-ml-build
2134 :     Description:
2135 :    
2136 :     Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
2137 :     getting installed properly (by config/install.sh).
2138 :    
2139 :     ----------------------------------------------------------------------
2140 :     Name: Matthias Blume
2141 : blume 643 Date: 2000/05/12 17:30:00 JST
2142 :     Tag: blume-20000512-anchors
2143 :     Description:
2144 :    
2145 :     !!! NEW BOOT FILES !!!
2146 :    
2147 :     This change is in preparation of fading out support for "implicitly
2148 :     anchored path names". I went through all sources and used the
2149 :     explicit (and relatively new) $-notation. See system/README and the
2150 :     CM manual for more info on this.
2151 :    
2152 :     I also modified the anchoring scheme for some things such as "smlnj",
2153 :     "MLRISC", "cm", etc. to take advantage of the fact that explicit
2154 :     anchors are more expressive: anchor name and first arc do not have to
2155 :     coincide. This entails the following user-visible change:
2156 :    
2157 :     You have to write $smlnj/foo/bar instead of smlnj/foo/bar. In
2158 :     particular, when you fire up sml with a command-line argument, say,
2159 :     e.g.:
2160 :    
2161 :     sml '$smlnj/cmb.cm'
2162 :    
2163 :     At the ML toplevel prompt:
2164 :    
2165 :     CM.autoload "$smlnj/cmb.cm";
2166 :    
2167 :     There is also a new controller in CM.Control that can be used to turn
2168 :     off all remaining support for implicit anchors by saying:
2169 :    
2170 :     CM.autoload "$smlnj/
2171 :     #set CM.Control.implicit_anchors false;
2172 :    
2173 :     This causes CM to reject implicitly anchored paths. This is (for the
2174 :     time being) less permissive than the "final" version where there will
2175 :     be no more such implicit anchors and relative paths will be just that:
2176 :     relative.
2177 :    
2178 :     The next step (version after next version?) will be to make the
2179 :     default for CM.Control.implicit_anchors false. After the dust has
2180 :     settled, I can then produce the "final" version of this...
2181 :    
2182 :     Note: Since bootstrapping is a bit tricky, I provided new boot files.
2183 :    
2184 :     ----------------------------------------------------------------------
2185 :     Name: Matthias Blume
2186 : blume 642 Date: 2000/05/11 16:30:00 JST
2187 :     Tag: blume-20000511-sources
2188 :     Description:
2189 :    
2190 :     The main change is that I added function CM.sources as a generalized
2191 :     version of the earlier CM.makedepend. This entails the following
2192 :     additional changes:
2193 :    
2194 :     - CM.makedepend has been dropped.
2195 :    
2196 :     - CM manual has been updated.
2197 :    
2198 :     - TOOLS signature and API have been changed.
2199 :    
2200 :     ----------------------------------------------------------------------
2201 : leunga 640 Name: Allen Leung
2202 : leunga 641 Date: 2000/05/10 21:17 EDT
2203 :     Tag: leunga-20000510-moby-c--ssa
2204 :     Description:
2205 :    
2206 :     Various bug fixes and new features for C--, Moby and MLRISC optimizations.
2207 :     None of these affect SML/NJ.
2208 :    
2209 :     1. Register Allocation
2210 :    
2211 :     a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
2212 :     This module tries to remove local (i.e. basic block level) redundancies
2213 :     during spilling.
2214 :    
2215 :     b. A new framework for performing region based register allocation.
2216 :     Not yet entirely functional.
2217 :    
2218 :     2. X86
2219 :    
2220 :     a. DefUse for POP was missing the stack pointer [found by Lal]
2221 :     b. Reload for CALL was incorrect in X86Spill [found by John]
2222 :     c. Various fixes in X86Spill so that it can be used correctly for
2223 :     the new spilling module.
2224 :    
2225 :     3. SSA/IR
2226 :    
2227 :     a. New module ir/dj-dataflow.sml implements elimination based
2228 :     data flow analysis.
2229 :    
2230 :     4. MLRiscGen
2231 :    
2232 :     a. Fix for gc type annotation
2233 :    
2234 :     5. MDGen
2235 :    
2236 :     Various fixes for machine description -> ml code translation. For ssa
2237 :     only.
2238 :    
2239 :     ----------------------------------------------------------------------
2240 :     Name: Allen Leung
2241 : leunga 640 Date: 2000/05/08 22:17 EDT
2242 :     Tag: leunga-20000508-labexp
2243 :     Description:
2244 :    
2245 :     Fermin has found a few assembly problems with constant expressions
2246 :     generated in LabelExp. Mostly, the problems involve extra parentheses,
2247 :     which choke on dumb assemblers. This is his fix.
2248 :    
2249 :     ----------------------------------------------------------------------
2250 : dbm 635 Name: Dave MacQueen
2251 :     Date: 2000/04/09 14:00 EDT
2252 :     Tag: dbm-20000502-Version_110_28
2253 :     Description:
2254 :    
2255 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
2256 :    
2257 :     2. Updated config/version to 110.28
2258 :    
2259 :     3. Updated config/srcarchiveurl
2260 :    
2261 :     3. New boot files!
2262 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
2263 :    
2264 :     ----------------------------------------------------------------------
2265 : blume 634 Name: Matthias Blume
2266 :     Date: 2000/05/01 19:05:00 JST
2267 :     Tag: blume-20000501-noweb
2268 :     Description:
2269 :    
2270 :     A new noweb tool has been added. The existing system is entirely
2271 :     unaffected by this, but some CM users have asked for renewed noweb
2272 :     support. Everything is documented in the CM manual.
2273 :    
2274 :     New (plugin) libraries:
2275 :    
2276 :     noweb-tool.cm
2277 :     nw-ext.cm
2278 :    
2279 :     ----------------------------------------------------------------------
2280 : dbm 633 Name: Dave MacQueen
2281 :     Date: 2000/04/30 12:40PM EDT
2282 :     Tag: dbm-20000430-bug_fixes
2283 :     Description:
2284 :    
2285 :     1. Fix for bug 1498
2286 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sig
2287 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sml
2288 :     added toRealArray function
2289 :     smlnj/src/compiler/MiscUtil/print/ppobj.sml
2290 :     added check for tag Obj.RealArray to array printing case in ppObj
2291 :    
2292 :     2. Fix for bug 1510
2293 :     smlnj/src/compiler/Semant/types/typesutil.sml
2294 :     fixed definition of dummyargs (used by equalTycon) so that
2295 :     dummy args are distinct types
2296 :    
2297 :     ----------------------------------------------------------------------
2298 : blume 629 Name: Matthias Blume
2299 : blume 632 Date: 2000/04/30 01:00:00 JST
2300 :     Tag: blume-20000430-versions
2301 :     Description:
2302 :    
2303 :     1. CM version numbering added. This is an implementation of Lal's
2304 :     proposal for adding version numbers and version checking to .cm
2305 :     files. Lal said that his proposal was just that -- a proposal.
2306 :     For the time being I went ahead and implemented it so that people
2307 :     can comment on it. Everything is completely backward-compatible
2308 :     (except for the stable library format, i.e., new bootfiles!).
2309 :    
2310 :     As usual, see the CM manual for details.
2311 :    
2312 :     2. An alternative syntax for anchored paths has been implemented.
2313 :     Dave has recently voiced the same concerns that I had when I did
2314 :     this, so there should be some support. My take is that eventually
2315 :     I will let support for the current syntax (where anchors are
2316 :     "implicit") fade out in favor of the new, explicit syntax.
2317 :     In order to be backward-compatible, both old and new syntax are
2318 :     currently supported.
2319 :    
2320 :     Again, see the CM manual for details.
2321 :    
2322 :     3. Parallel make is trying to be slightly smarter: When the master
2323 :     process finds a "bottleneck", i.e., when there is only one
2324 :     compilation unit that can be compiled and everybody else is
2325 :     waiting on it, then it will simply compile it directly instead
2326 :     of clumsily telling one of the slaves to do it.
2327 :    
2328 :     4. Support for "unsharing" added. This is necessary in order to be
2329 :     able to have two different versions of the same library running
2330 :     at the same time (e.g., for trying out a new MLRISC while still
2331 :     having the old MLRISC linked into the current compiler, etc.)
2332 :     See the CM manual.
2333 :    
2334 :     5. Simple "makedepend" functionality added for generating Makefile
2335 :     dependency information. (This is rather crude at the moment.
2336 :     Expect some changes here in the future.)
2337 :    
2338 :     6. ".fun" added as a recognized suffix for ML files. Also documented
2339 :     explicitly in the manual that the fallback behavior (unknown suffix
2340 :     -> ML file) is not an official feature!
2341 :    
2342 :     7. Small changes to the pickler for stable libraries.
2343 :    
2344 :     8. Several internal changes to CM (for cleanup/improvement).
2345 :    
2346 :    
2347 :     !!!! NEW BINFILES !!!!
2348 :    
2349 :     ----------------------------------------------------------------------
2350 :     Name: Matthias Blume
2351 : blume 631 Date: 2000/04/28 17:30:00 JST
2352 :     Tag: blume-20000428-pathconfig
2353 :     Description:
2354 :    
2355 :     1. I changed config/install.sh to remove duplicate entries from the
2356 :     lib/pathconfig file at the end. Moreover, the final version of
2357 :     lib/pathconfig is sorted alphabetically. The same (sorting) is done
2358 :     in src/system/installml.
2359 :    
2360 :     2. The config/install.sh script now consistently uses relative
2361 :     pathnames in lib/pathconfig whenever the anchor is in the lib
2362 :     directory. (So far this was true for the libraries that come
2363 :     pre-compiled and bundled as part of the bootfiles but not for
2364 :     libraries that are compiled by the script itself.)
2365 :    
2366 :     ----------------------------------------------------------------------
2367 :     Name: Matthias Blume
2368 : blume 629 Date: 2000/04/26 13:10:00 JST
2369 :     Tag: blume-20000426-fun_suffix
2370 :     Description:
2371 :    
2372 :     Added ".fun" as a recognized file name suffix (for ML code).
2373 :    
2374 :     ----------------------------------------------------------------------
2375 : leunga 628 Name: Allen Leung
2376 :     Date: 2000/04/25 17:00:00 EST
2377 :     Tag: leunga-20000425-alpha-ra
2378 :     Description:
2379 :    
2380 :     1. Alpha
2381 :    
2382 :     PSEUDOARITH was missing in AlphaRewrite. This causes an endless loop
2383 :     in C--.
2384 :    
2385 :     2. RA
2386 :    
2387 :     Added a flag "ra-dump-size" to print out the size of the flowgraph
2388 :     and the interference graph.
2389 :    
2390 :     ----------------------------------------------------------------------
2391 : dbm 627 Name: Dave MacQueen
2392 :     Date: 2000/04/25/
2393 :     Tag: dbm-20000425-mlyacc_doc_examples
2394 :     Description:
2395 :     Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
2396 :     Updated all three examples in src/ml-yacc/examples to run
2397 :     under 110.* using CM.make.
2398 :    
2399 :     ----------------------------------------------------------------------
2400 : leunga 624 Name: Allen Leung
2401 :     Date: 2000/04/20 23:04:00 EST
2402 :     Tag: leunga-20000420-ssa-c---stuff
2403 :     Description:
2404 :    
2405 :     This update synchronizes my repository with Yale's. Most of these
2406 :     changes, however, do not affect SML/NJ at all (the RA is an exception).
2407 :    
2408 :     1. Register Allocator
2409 :    
2410 :     a. An improvement in the interference graph construction:
2411 :     Given a copy
2412 :    
2413 :     s <- t
2414 :    
2415 : leunga 628 no interference edge between s and t is added for this definition of s.
2416 : leunga 624
2417 :     b. I've added two new spill heuristic modules that Fermin and I developed
2418 :     (in the new library RA.cm). These are unused in SML/NJ but maybe
2419 :     useful for others (Moby?)
2420 :    
2421 :     2. X86
2422 :    
2423 :     a. Various fixes in the backend provided by Fermin [C--] and Lal.
2424 :    
2425 :     3. Alpha
2426 :    
2427 :     a. Added the BSR instruction and code generation that goes with it [C--]
2428 :     b. Other fixes too numerous to recount provided by Fermin [C--]
2429 :    
2430 :     4. Regmaps
2431 :    
2432 :     a. The regmaps are not initialized with the identity physical bindings
2433 :     at creation time. This is unneeded.
2434 :    
2435 :     5. MLRISC Optimizations
2436 :    
2437 :     a. The DJ-Graph module can now compute the iterated dominance frontiers
2438 :     intersects with liveness incrementally in linear time! Woohoo!
2439 :     This is now used in my new SSA construction algorithm.
2440 :    
2441 :     b. THe branch reorganization module is now smarter about linear chains of
2442 :     basic blocks.
2443 :    
2444 :    
2445 :     ----------------------------------------------------------------------
2446 : blume 615 Name: Matthias Blume
2447 :     Date: 2000/04/12 13:52:00 JST
2448 :     Tag: blume_main_v110p27_1
2449 :     Description:
2450 :    
2451 :     Changed install.sh script to handle archive files without version number
2452 :     and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
2453 :     name of the boot file archive.
2454 :    
2455 :     ----------------------------------------------------------------------
2456 : dbm 607 Name: Dave MacQueen
2457 :     Date: 2000/04/09 14:00 EDT
2458 :     Tag: dbm-20000410-Version_110_27
2459 :     Description:
2460 :    
2461 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
2462 :    
2463 :     2. Updated src/config/version to 110.27
2464 :    
2465 :     3. New boot files!
2466 :    
2467 :     ----------------------------------------------------------------------
2468 : leunga 606 Name: Allen Leung
2469 :     Date: 2000/04/09 19:09:00 EST
2470 :     Tag: leunga-20000409-misc
2471 :     Description:
2472 :    
2473 :     1. Yet another fix for x86 assembly for idivl, imull, mull and friends.
2474 :    
2475 :     2. Miscellaneous improvements to MLRISC (unused in sml/nj)
2476 :    
2477 :     ----------------------------------------------------------------------
2478 : monnier 605 Name: Stefan
2479 :     Date: 2000/04/07 10:00:00 EDT
2480 :     Tag: monnier-20000406-branch-handling
2481 :     Description:
2482 :    
2483 :     Improved handling of branches (mostly those generated from
2484 :     polymorphic equality), removed switchoff and changed the
2485 :     default optimization settings (more cpsopt and less flintopt).
2486 :    
2487 :     ----------------------------------------------------------------------
2488 : leunga 601 Name: Allen Leung
2489 : leunga 602 Date: 2000/04/06 01:30:00 EST
2490 :     Tag: leunga-20000406-peephole-x86-SSA-2
2491 :     Description:
2492 :    
2493 :     Forgot a few files.
2494 :    
2495 :     ----------------------------------------------------------------------
2496 :     Name: Allen Leung
2497 : leunga 601 Date: 2000/04/06 00:36:00 EST
2498 :     Tag: leunga-20000406-peephole-x86-SSA
2499 :     Description:
2500 :    
2501 :     1. New Peephole code
2502 :    
2503 :     2. Minor improvement to X86 instruction selection
2504 :    
2505 :     3. Various fixes to SSA and machine description -> code translator
2506 :    
2507 :     ----------------------------------------------------------------------
2508 : blume 595 Name: Matthias Blume
2509 :     Date: 2000/04/05 12:30:00 JST
2510 :     Tag: blume_main_v110p26p2_3
2511 :     Description:
2512 :    
2513 :     This update just merges three minor cosmetic updates to CM's sources
2514 :     to get ready for the 110.27 code freeze on Friday. No functionality
2515 :     has changed.
2516 :    
2517 :     ----------------------------------------------------------------------
2518 : leunga 593 Name: Allen Leung
2519 : leunga 594 Date: 2000/04/04 19:39:00 EST
2520 :     Tag: leunga-20000404-x86-asm
2521 :     Description:
2522 :    
2523 :     1. Fixed a problem in X86 assembly.
2524 :    
2525 :     Things like
2526 :    
2527 :     jmp %eax
2528 :     jmp (%eax)
2529 :    
2530 :     should be output as
2531 :    
2532 :     jmp *%eax
2533 :     jmp *(%eax)
2534 :    
2535 :     2. Assembly output
2536 :    
2537 :     Added a new flag
2538 :    
2539 :     "asm-indent-copies" (default to false)
2540 :    
2541 :     When this flag is on, parallel copies will be indented an extra level.
2542 :    
2543 :     ----------------------------------------------------------------------
2544 :     Name: Allen Leung
2545 : leunga 593 Date: 2000/04/04 03:18:00 EST
2546 :     Tag: leunga-20000404-C--Moby
2547 :     Description:
2548 :    
2549 :     All of these fixes are related to C--, Moby, and my own optimization
2550 :     stuff; so they shouldn't affect SML/NJ.
2551 :    
2552 :     1. X86
2553 :    
2554 :     Various fixes related floating point, and extensions.
2555 :    
2556 :     2. Alpha
2557 :    
2558 :     Some extra patterns related to loads with signed/zero extension
2559 :     provided by Fermin.
2560 :    
2561 :     3. Assembly
2562 :    
2563 : monnier 659 When generating assembly, resolve the value of client defined constants,
2564 : leunga 593 instead of generating symbolic values. This is controlled by the
2565 :     new flag "asm-resolve-constants", which is default to true.
2566 :    
2567 :     4. Machine Descriptions
2568 :    
2569 :     a. The precedence parser was slightly broken when parsing infixr symbols.
2570 :     b. The type generalizing code had the bound variables reversed, resulting
2571 :     in a problem during arity raising.
2572 :     c. Various fixes in machine descriptions.
2573 :    
2574 :     ----------------------------------------------------------------------
2575 : blume 592 Name: Matthias Blume
2576 :     Date: 2000/04/03 16:05:00 JST
2577 :     Tag: blume_main_v110p26p2_2
2578 :     Description:
2579 :    
2580 :     I eliminated coreEnv from compInfo. Access to the "Core" structure is
2581 :     now done via the ordinary static environment that is context to each
2582 :     compilation unit.
2583 :    
2584 :     To this end, I arranged that instead of "structure Core" as "structure
2585 :     _Core" is bound in the pervasive environment. Core access is done via
2586 : monnier 659 _Core (which can never be accidentally rebound because _Core is not a
2587 : blume 592 legal surface-syntax symbol).
2588 :    
2589 :     The current solution is much cleaner because the core environment is
2590 :     now simply part of the pervasive environment which is part of every
2591 :     compilation unit's context anyway. In particular, this eliminates all
2592 :     special-case handling that was necessary until now in order to deal
2593 :     with dynamic and symbolic parts of the core environment.
2594 :    
2595 :     Remaining hackery (to bind the "magic" symbol _Core) is localized in the
2596 : monnier 659 compilation manager's bootstrap compiler (actually: in the "init group"
2597 : blume 592 handling). See the comments in src/system/smlnj/init/init.cmi for
2598 :     more details.
2599 :    
2600 :     I also tried to track down all mentions of "Core" (as string argument
2601 :     to Symbol.strSymbol) in the compiler and replaced them with a
2602 :     reference to the new CoreSym.coreSym. Seems cleaner since the actual
2603 :     name appears in one place only.
2604 :    
2605 :     Binfile and bootfile format have not changed, but the switchover from
2606 :     the old "init.cmi" to the new one is a bit tricky, so I supplied new
2607 :     bootfiles anyway.
2608 :    
2609 :     ----------------------------------------------------------------------
2610 : leunga 591 Name: Allen Leung
2611 :     Date: 2000/04/02 21:17:00 EST
2612 :     Tag: leunga-20000402-mltree
2613 :     Description:
2614 : leunga 585
2615 : leunga 591 1. Renamed the constructor CALL in MLTREE by popular demand.
2616 :     2. Added a bunch of files from my repository. These are currently
2617 :     used by other non-SMLNJ backends.
2618 :    
2619 : leunga 576 ----------------------------------------------------------------------
2620 : leunga 590 Name: Allen Leung
2621 :     Date: 2000/03/31 21:15:00 EST
2622 :     Tag: leunga-20000331-aliasing
2623 :     Description:
2624 :    
2625 :     This update contains a rewritten (and hopefully more correct) module
2626 :     for extracting aliasing information from CPS.
2627 :    
2628 :     To turn on this feature:
2629 :    
2630 :     Compiler.Control.CG.memDisambiguate := true
2631 :    
2632 :     To pretty print the region information with assembly
2633 :    
2634 :     Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
2635 :    
2636 :     To control how many levels of aliasing information are printed, use:
2637 :    
2638 :     Compiler.Control.MLRISC.getInt "points-to-show-level" := n
2639 :    
2640 :     The default of n is 3.
2641 :    
2642 :     ----------------------------------------------------------------------
2643 : dbm 589 Name: David MacQueen
2644 :     Date: 2000/03/31 11:15:00 EST
2645 :     Tag: dbm-20000331-runtime_fix
2646 :     Description:
2647 :    
2648 :     This update contains:
2649 :    
2650 :     1. runtime/c-lib/c-libraries.c
2651 :     includes added in revision 1.2 caused compilation errors on hppa-hpux
2652 :    
2653 :     2. fix for bug 1556
2654 :     system/Basis/Implementation/NJ/internal-signals.sml
2655 :    
2656 :     ----------------------------------------------------------------------
2657 : blume 587 Name: Matthias Blume
2658 : blume 588 Date: 2000/03/31 18:00:00 JST
2659 :     Tag: blume_main_v110p26p2_1
2660 :     Description:
2661 :    
2662 :     This update contains:
2663 :    
2664 :     1. A small change to CM's handling of stable libraries:
2665 :     CM now maintains one "global" modmap that is used for all stable
2666 :     libraries. The use of such a global modmap maximizes sharing and
2667 :     minimizes the need for re-traversing parts of environments during
2668 :     modmap construction. (However, this has minor impact since modmap
2669 :     construction seems to account for just one percent or less of total
2670 :     compile time.)
2671 :    
2672 :     2. I added a "genmap" phase to the statistics. This is where I got the
2673 :     "one percent" number (see above).
2674 :    
2675 :     3. CM's new tool parameter mechanism just became _even_ better. :)
2676 :     - The parser understands named parameters and recursive options.
2677 :     - The "make" and "shell" tools use these new features.
2678 :     (This makes it a lot easier to cascade these tools.)
2679 :     - There is a small syntax change: named parameters use a
2680 :    
2681 :     <name> : ( <option> ... ) or
2682 :     <name> : <string>
2683 :    
2684 :     syntax. Previously, named parameters were implemented in an
2685 :     ad-hoc fashion by each tool individually (by parsing strings)
2686 :     and had the form
2687 :    
2688 :     <name>=<string>
2689 :    
2690 :     See the CM manual for a full description of these issues.
2691 :    
2692 :     ----------------------------------------------------------------------
2693 :     Name: Matthias Blume
2694 : blume 587 Date: 2000/03/30 18:00:00 JST
2695 :     Tag: blume_main_v110p26p2_0
2696 :     Description:
2697 :    
2698 :     !!!!! WARNING !!!!!!
2699 :     !! New binfiles !!
2700 :     !!!!!!!!!!!!!!!!!!!!
2701 :    
2702 :     This update contains:
2703 :    
2704 :     1. Moderate changes to CM:
2705 :    
2706 :     - Changes to CM's tools mechanism. In particular, it is now possible
2707 :     to have tools that accept additional "command line" parameters
2708 :     (specified in the .cm file at each instance where the tool's class is
2709 :     used).
2710 :    
2711 : monnier 659 This was done to accommodate the new "make" and "shell" tools which
2712 :     facilitate fairly seamless hookup to portions of code managed using
2713 : blume 587 Makefiles or Shell scripts.
2714 :    
2715 :     There are no classes "shared" or "private" anymore. Instead, the
2716 :     sharing annotation is now a parameter to the "sml" class.
2717 :    
2718 :     There is a bit of generic machinery for implementing one's own
2719 :     tools that accept command-line parameters. However, I am not yet fully
2720 :     satisfied with that part, so expect changes here in the future.
2721 :    
2722 :     All existing tools are described in the CM manual.
2723 :    
2724 : monnier 659 - Slightly better error handling. (CM now suppresses many followup
2725 : blume 587 error messages that tended to be more annoying than helpful.)
2726 :    
2727 :     2. Major changes to the compiler's static environment data structures.
2728 :    
2729 :     - no CMStaticEnv anymore.
2730 :     - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
2731 :     but it is called Environment), no conversions between different
2732 :     kinds of static environments
2733 :    
2734 :     - There is still a notion of a "modmap", but such modmaps are generated
2735 :     on demand at the time when they are needed. This sounds slow, but I
2736 :     sped up the code that generates modmaps enough for this not to lead to
2737 :     a slowdown of the compiler (at least I didn't detect any).
2738 :    
2739 :     - To facilitate rapid modmap generation, static environments now
2740 :     contain an (optional) "modtree" structure. Modtree annotations are
2741 :     constructed by the unpickler during unpickling. (This means that
2742 :     the elaborator does not have to worry about modtrees at all.)
2743 :     Modtrees have the advantage that they are compositional in the same
2744 :     way as the environment data structure itself is compositional.
2745 :     As a result, modtrees never hang on to parts of an environment that
2746 :     has already been rendered "stale" by filtering or rebinding.
2747 :    
2748 :     - I went through many, many trials and errors before arriving at the
2749 :     current solution. (The initial idea of "linkpaths" did not work.)
2750 :     But the result of all this is that I have touched a lot of files that
2751 :     depend on the "modules" and "types" data structures (most of the
2752 :     elaborator). There were a lot of changes during my "linkpath" trials
2753 :     that could have been reverted to their original state but weren't.
2754 :     Please, don't be too harsh on me for messing with this code a bit more
2755 :     than what was strictly necessary... (I _did_ resist the tempation
2756 :     of doing any "global reformatting" to avoid an untimely death at
2757 :     Dave's hands. :)
2758 :    
2759 :     - One positive aspect of the previous point: At least I made sure that
2760 :     all files that I touched now compile without warnings (other than
2761 :     "polyEqual").
2762 :    
2763 :     - compiler now tends to run "leaner" (i.e., ties up less memory in
2764 :     redundant modmaps)
2765 :    
2766 :     ----------------------------------------------------------------------
2767 : leunga 580 Name: Allen Leung
2768 : leunga 585 Date: 2000/03/29 18:00:00
2769 :     Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
2770 : leunga 586 Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
2771 : leunga 585 Description:
2772 :    
2773 :     This update contains *MAJOR* changes to the way code is generated from CPS
2774 :     in the module mlriscGen, and in various backend modules.
2775 :    
2776 :     CHANGES
2777 :     =======
2778 :    
2779 :     1. MLRiscGen: forward propagation fix.
2780 :    
2781 :     There was a bug in forward propagation introduced at about the same time
2782 :     as the MLRISC x86 backend, which prohibits coalescing to be
2783 :     performed effectively in loops.
2784 :    
2785 :     Effect: speed up of loops in RISC architectures.
2786 :     By itself, this actually slowed down certain benchmarks on the x86.
2787 :    
2788 :     2. MLRiscGen: forward propagating addresses from consing.
2789 :    
2790 :     I've changed the way consing code is generated. Basically I separated
2791 :     out the initialization part:
2792 :    
2793 :     store tag, offset(allocptr)
2794 :     store elem1, offset+4(allocptr)
2795 :     store elem2, offset+8(allocptr)
2796 :     ...
2797 :     store elemn, offset+4n(allocptr)
2798 :    
2799 :     and the address computation part:
2800 :    
2801 :     celladdr <- offset+4+alloctpr
2802 :    
2803 :     and move the address computation part
2804 :    
2805 :     Effect: register pressure is generally lower as a result. This
2806 :     makes compilation of certain expressions much faster, such as
2807 :     long lists with non-trivial elements.
2808 :    
2809 :     [(0,0), (0,0), .... (0,0)]
2810 :    
2811 :     3. MLRiscGen: base pointer elimination.
2812 :    
2813 :     As part of the linkage mechanism, we generate the sequence:
2814 :    
2815 :     L: ... <- start of the code fragment
2816 :    
2817 :     L1:
2818 :     base pointer <- linkreg - L1 + L
2819 :    
2820 :     The base pointer was then used for computing relocatable addresses
2821 :     in the code fragment. Frequently (such as in lots of continuations)
2822 :     this is not needed. We now eliminate this sequence whenever possible.
2823 :    
2824 :     For compile time efficiency, I'm using a very stupid local heuristic.
2825 :     But in general, this should be done as a control flow analysis.
2826 :    
2827 :     Effect: Smaller code size. Speed up of most programs.
2828 :    
2829 :     4. Hppa back end
2830 :    
2831 :     Long jumps in span dependence resolution used to depend on the existence
2832 :     of the base pointer.
2833 :    
2834 :     A jump to a long label L was expanded into the following sequence:
2835 :    
2836 :     LDIL %hi(L-8192), %r29
2837 :     LDO %lo(L-8192)(%r29), %r29
2838 :     ADD %r29, baseptr, %r29
2839 :     BV,n %r0(%r29)
2840 :    
2841 :     In the presence of change (3) above, this will not work. I've changed
2842 :     it so that the following sequence of instructions are generated, which
2843 :     doesn't mention the base pointer at all:
2844 :    
2845 :     BL,n L', %r29 /* branch and link, L' + 4 -> %r29 */
2846 :     L': ADDIL L-(L'+4), %r29 /* Compute address of L */
2847 :     BV,n %r0(%r29) /* Jump */
2848 :    
2849 :     5. Alpha back end
2850 :    
2851 :     New alpha instructions LDB/LDW have been added, as per Fermin's
2852 :     suggestions. This is unrelated to all other changes.
2853 :    
2854 :     6. X86 back end
2855 :    
2856 :     I've changed andl to testl in the floating point test sequence
2857 :     whenever appropriate. The Intel optimization guide states that
2858 : monnier 659 testl is preferable to andl.
2859 : leunga 585
2860 :     7. RA (x86 only)
2861 :    
2862 :     I've improved the spill propagation algorithm, using an approximation
2863 :     of maximal weighted independent sets. This seems to be necessary to
2864 :     alleviate the negative effect in light of the slow down in (1).
2865 :    
2866 :     I'll write down the algorithm one of these days.
2867 :    
2868 :     8. MLRiscGen: frequencies
2869 :    
2870 :     I've added an annotation that states that all call gc blocks have zero
2871 :     execution frequencies. This improves register allocation on the x86.
2872 :    
2873 :     BENCHMARKS
2874 :     ==========
2875 :    
2876 :     I've only perform the comparison on 110.25.
2877 :    
2878 :     The platforms are:
2879 :    
2880 :     HPPA A four processor HP machine (E9000) with 5G of memory.
2881 :     X86 A 300Hhz Pentium II with 128M of memory, and
2882 :     SPARC An Ultra sparc 2 with 512M of memory.
2883 :    
2884 :     I used the following parameters for the SML benchmarks:
2885 :    
2886 :     @SMLalloc
2887 :     HPPA 256k
2888 :     SPARC 512k
2889 :     X86 256k
2890 :    
2891 :     COMPILATION TIME
2892 :     ----------------
2893 :     Here are the numbers comparing the compilation times of the compilers.
2894 :     I've only compared 110.25 compiling the new sources versus
2895 :     a fixpoint version of the new compiler compiling the same.
2896 :    
2897 :     110.25 New
2898 :     Total Time in RA Spill+Reload Total Time In RA Spill+Reload
2899 :     HPPA 627s 116s 2684+3584 599s 95s 1003+1879
2900 :     SPARC 892s 173s 2891+3870 708s 116s 1004+1880
2901 :     X86 999s 315s 94006+130691 987s 296s 108877+141957
2902 :    
2903 :     110.25 New
2904 :     Code Size Code Size
2905 :     HPPA 8596736 8561421
2906 :     SPARC 8974299 8785143
2907 :     X86 9029180 8716783
2908 :    
2909 :     So in summary, things are at least as good as before. Dramatic
2910 :     reduction in compilation is obtained on the Sparc; I can't explain it,
2911 :     but it is reproducible. Perhaps someone should try to reproduce this
2912 :     on their own machines.
2913 :    
2914 :     SML BENCHMARKS
2915 :     --------------
2916 :    
2917 :     On the average, all benchmarks perform at least as well as before.
2918 :    
2919 :     HPPA Compilation Time Spill+Reload Run Time
2920 :     110.25 New 110.25 New 110.25 New
2921 :    
2922 :     barnesHut 3.158 3.015 4.75% 1+1 0+0 2.980 2.922 2.00%
2923 :     boyer 6.152 5.708 7.77% 0+0 0+0 0.218 0.213 2.34%
2924 :     count-graphs 1.168 1.120 4.32% 0+0 0+0 22.705 23.073 -1.60%
2925 :     fft 0.877 0.792 10.74% 1+3 1+3 0.602 0.587 2.56%
2926 :     knuthBendix 3.180 2.857 11.32% 0+0 0+0 0.675 0.662 2.02%
2927 :     lexgen 6.190 5.290 17.01% 0+0 0+0 0.913 0.788 15.86%
2928 :     life 0.803 0.703 14.22% 25+25 0+0 0.153 0.140 9.52%
2929 :     logic 2.048 2.007 2.08% 6+6 1+1 4.133 4.008 3.12%
2930 :     mandelbrot 0.077 0.080 -4.17% 0+0 0+0 0.765 0.712 7.49%
2931 :     mlyacc 22.932 20.937 9.53% 154+181 32+57 0.468 0.430 8.91%
2932 :     nucleic 5.183 5.060 2.44% 2+2 0+0 0.125 0.120 4.17%
2933 :     ratio-regions 3.357 3.142 6.84% 0+0 0+0 116.225 113.173 2.70%
2934 :     ray 1.283 1.290 -0.52% 0+0 0+0 2.887 2.855 1.11%
2935 :     simple 6.307 6.032 4.56% 28+30 5+7 3.705 3.658 1.28%
2936 :     tsp 0.888 0.862 3.09% 0+0 0+0 7.040 6.893 2.13%
2937 :     vliw 24.378 23.455 3.94% 106+127 25+45 2.758 2.707 1.91%
2938 :     --------------------------------------------------------------------------
2939 :     Average 6.12% 4.09%
2940 :    
2941 :     SPARC Compilation Time Spill+Reload Run Time
2942 :     110.25 New 110.25 New 110.25 New
2943 :    
2944 :     barnesHut 3.778 3.592 5.20% 2+2 0+0 3.648 3.453 5.65%
2945 :     boyer 6.632 6.110 8.54% 0+0 0+0 0.258 0.242 6.90%
2946 :     count-graphs 1.435 1.325 8.30% 0+0 0+0 33.672 34.737 -3.07%
2947 :     fft 0.980 0.940 4.26% 3+9 2+6 0.838 0.827 1.41%
2948 :     knuthBendix 3.590 3.138 14.39% 0+0 0+0 0.962 0.967 -0.52%
2949 :     lexgen 6.593 6.072 8.59% 1+1 0+0 1.077 1.078 -0.15%
2950 :     life 0.972 0.868 11.90% 26+26 0+0 0.143 0.140 2.38%
2951 :     logic 2.525 2.387 5.80% 7+7 1+1 5.625 5.158 9.05%
2952 :     mandelbrot 0.090 0.093 -3.57% 0+0 0+0 0.855 0.728 17.39%
2953 :     mlyacc 26.732 23.827 12.19% 162+189 32+57 0.550 0.560 -1.79%
2954 :     nucleic 6.233 6.197 0.59% 3+3 0+0 0.163 0.173 -5.77%
2955 :     ratio-regions 3.780 3.507 7.79% 0+0 0+0 133.993 131.035 2.26%
2956 :     ray 1.595 1.550 2.90% 1+1 0+0 3.440 3.418 0.63%
2957 :     simple 6.972 6.487 7.48% 29+32 5+7 3.523 3.525 -0.05%
2958 :     tsp 1.115 1.063 4.86% 0+0 0+0 7.393 7.265 1.77%
2959 :     vliw 27.765 24.818 11.87% 110+135 25+45 2.265 2.135 6.09%
2960 :     ----------------------------------------------------------------------------
2961 :     Average 6.94% 2.64%
2962 :    
2963 :     X86 Compilation Time Spill+Reload Run Time
2964 :     110.25 New 110.25 New 110.25 New
2965 :    
2966 :     barnesHut 5.530 5.420 2.03% 593+893 597+915 3.532 3.440 2.66%
2967 :     boyer 8.768 7.747 13.19% 493+199 301+289 0.327 0.297 10.11%
2968 :     count-graphs 2.040 2.010 1.49% 298+394 315+457 26.578 28.660 -7.26%
2969 :     fft 1.327 1.302 1.92% 112+209 115+210 1.055 0.962 9.71%
2970 :     knuthBendix 5.218 5.475 -4.69% 451+598 510+650 0.928 0.932 -0.36%
2971 :     lexgen 9.970 9.623 3.60% 1014+841 1157+885 0.947 0.928 1.97%
2972 :     life 1.183 1.183 0.00% 162+182 145+148 0.127 0.103 22.58%
2973 :     logic 3.285 3.512 -6.45% 514+684 591+836 5.682 5.577 1.88%
2974 :     mandelbrot 0.147 0.143 2.33% 38+41 33+54 0.703 0.690 1.93%
2975 :     mlyacc 35.457 32.763 8.22% 3496+4564 3611+4860 0.552 0.550 0.30%
2976 :     nucleic 7.100 6.888 3.07% 239+168 201+158 0.175 0.173 0.96%
2977 :     ratio-regions 6.388 6.843 -6.65% 1182+257 981+300 120.142 120.345 -0.17%
2978 :     ray 2.332 2.338 -0.29% 346+398 402+494 3.593 3.540 1.51%
2979 :     simple 9.912 9.903 0.08% 1475+941 1579+1168 3.057 3.178 -3.83%
2980 :     tsp 1.623 1.532 5.98% 266+200 250+211 8.045 7.878 2.12%
2981 :     vliw 33.947 35.470 -4.29% 2629+2774 2877+3171 2.072 1.890 9.61%
2982 :     ----------------------------------------------------------------------------
2983 :     Average 1.22% 3.36%
2984 :    
2985 :     ----------------------------------------------------------------------
2986 :     Name: Allen Leung
2987 : leunga 583 Date: 2000/03/23 16:25:00
2988 :     Tag: leunga-20000323-fix_x86_alpha
2989 :     Description:
2990 :    
2991 :     1. X86 fixes/changes
2992 :    
2993 :     a. The old code generated for SETcc was completely wrong.
2994 :     The Intel optimization guide is VERY misleading.
2995 :    
2996 :     2. ALPHA fixes/changes
2997 :    
2998 :     a. Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
2999 :     b. Added a new mode byteWordLoadStores to the functor parameter to Alpha()
3000 :     c. Added reassociation code for address computation.
3001 :    
3002 :     ----------------------------------------------------------------------
3003 :     Name: Allen Leung
3004 : leunga 580 Date: 2000/03/22 01:23:00
3005 :     Tag: leunga-20000322-fix_x86_hppa_ra
3006 :     Description:
3007 :    
3008 :     1. X86 fixes/changes
3009 :    
3010 :     a. x86Rewrite bug with MUL3 (found by Lal)
3011 :     b. Added the instructions FSTS, FSTL
3012 :    
3013 :     2. PA-RISC fixes/changes
3014 :    
3015 :     a. B label should not be a delay slot candidate! Why did this work?
3016 :     b. ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
3017 :     as it should be.
3018 :     c. The assembly syntax for fstds and fstdd was wrong.
3019 :     d. Added the composite instruction COMICLR/LDO, which is the immediate
3020 :     operand variant of COMCLR/LDO.
3021 :    
3022 :     3. Generic MLRISC
3023 :    
3024 :     a. shuffle.sml rewritten to be slightly more efficient
3025 :     b. DIV bug in mltree-simplify fixed (found by Fermin)
3026 :    
3027 :     4. Register Allocator
3028 :    
3029 :     a. I now release the interference graph earlier during spilling.
3030 :     May improve memory usage.
3031 :    
3032 :     ----------------------------------------------------------------------
3033 : blume 577 Name: Matthias Blume
3034 : blume 578 Date: 2000/03/14 14:15:32
3035 :     Tag: blume_main_v110p26p1_2
3036 :     Description:
3037 :    
3038 :     1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
3039 :     additional argument called "template" which is an optional string that
3040 : monnier 659 specifies the layout of the tool command line. See the CM manual for
3041 : blume 578 explanation.
3042 :    
3043 : monnier 659 2. A special-purpose tool can be "registered" by simply dropping the
3044 : blume 578 corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
3045 :     directory where the .cm file lives that uses this tool. (The
3046 :     behavior/misfeature until now was to look for the tool description
3047 :     files in the current working directory.) As before, tool description
3048 :     files could also be anchored -- in which case they can live anywhere
3049 :     they like. Following the recent e-mail discussion, this change should
3050 :     make it easier to have special-purpose tools that are shipped together
3051 :     with the sources of the program that uses them.
3052 :    
3053 :     ----------------------------------------------------------------------
3054 :     Name: Matthias Blume
3055 : blume 577 Date: 2000/03/10 07:48:34
3056 :     Tag: blume_main_v110p26p1_1
3057 :     Description:
3058 :    
3059 :     I added a re-written version of Dave's fixpt script to src/system.
3060 :     Changes relative to the original version:
3061 :     - sh-ified (not everybody has ksh)
3062 :     - automatically figures out which architecture it runs on
3063 :     - uses ./makeml a bit more cleverly
3064 :     - never invokes ./installml (and, thus, does not clobber your
3065 :     good and working installation of sml in case something goes wrong)
3066 :     - accepts max iteration count using option "-iter <n>"
3067 :     - accepts a "base" name using option "-base <base>"
3068 :    
3069 :     It does not build any extraneous heap images but directly rebuilds
3070 :     bin- and boot-hierarchies using makeml's "-rebuild" switch. Finally,
3071 :     it can incorporate existing bin- and boot- hierarchies. For example,
3072 :     suppose the base is set to "sml" (which is the default). Then it
3073 :     successively builds
3074 :    
3075 :     sml.bin.<arch>-unix and sml.boot.<arch>-unix
3076 :     then sml1.bin.<arch>-unix and sml1.boot.<arch>-unix
3077 :     then sml2.bin.<arch>-unix and sml2.boot.<arch>-unix
3078 :     ...
3079 :     then sml<n>.bin.<arch>-unix and sml<n>.boot.<arch>-unix
3080 :    
3081 :     and so on. If any of these already exist, it will just use what's
3082 :     there. In particular, many people will have the initial set of bin
3083 :     and boot files around, so this saves time for at least one full
3084 :     rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
3085 :     <k>=1,2,... is normally not a good idea when invoking fixpt. However,
3086 :     they might be the result of an earlier partial run of fixpt (which
3087 : monnier 659 perhaps got accidentally killed). In this case, fixpt will quickly
3088 : blume 577 move through what exists before continuing where it left off earlier,
3089 :     and, thus, saves a lot of time.
3090 :    
3091 :     ----------------------------------------------------------------------
3092 : leunga 576 Name: Allen Leung
3093 :     Date: 00/03/10 02:20:00
3094 :     Tag: leunga-20000310-fix_x86_asm_ra
3095 :     Description:
3096 : dbm 570
3097 : leunga 576 More assembly output problems involving the indexed addressing mode
3098 :     on the x86 have been found and corrected. Thanks to Fermin Reig for the
3099 :     fix.
3100 :    
3101 :     The interface and implementation of the register allocator have been changed
3102 :     slightly to accommodate the possibility to skip the register allocation
3103 :     phases completely and go directly to memory allocation. This is needed
3104 :     for C-- use.
3105 :    
3106 : dbm 570 ----------------------------------------------------------------------
3107 : blume 572 Name: Matthias Blume
3108 : blume 575 Date: 00/03/09 10:23:53
3109 :     Tag: blume_main_v110p26p1_0
3110 :     Description:
3111 :    
3112 :     * Complete re-organization of library names. Many libraries have been
3113 :     consolidated so that they share the same path anchor. For example,
3114 :     all MLRISC-related libraries are anchored at MLRISC, most libraries that
3115 :     are SML/NJ-specific are under "smlnj". Notice that names like
3116 :     host-cmb.cm or host-compiler.cm no longer exist. See system/README
3117 :     for a complete description of the new naming scheme. Quick reference:
3118 :    
3119 :     host-cmb.cm -> smlnj/cmb.cm
3120 :     host-compiler.cm -> smlnj/compiler.cm
3121 :     full-cm.cm -> smlnj/cm.cm
3122 :     <arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm
3123 :     <arch>-compiler.cm -> smlnj/compiler/<arch>.cm
3124 :    
3125 :     * Bug fixes in CM.
3126 :     - exceptions in user code are being passed through (i.e., reach top level)
3127 :     - more bugs in paranoia mode fixed
3128 :     - bug related to checking group owners fixed
3129 :    
3130 :     * New install.sh script that automagically fetches archive files:
3131 :     The new file config/srcarchiveurl must contain the URL of the
3132 :     (remote) directory that contains bin files (or other source archives).
3133 :     If install.sh does not find the archive locally, it tries to get
3134 :     it from that remote directory.
3135 :     This should simplify installation further: For machines that have
3136 :     access to the internet, just fetch <version>-config.tgz, unpack it,
3137 : monnier 659 edit config/targets, and go (run config/install.sh). The script will
3138 : blume 575 fetch everything else that it might need all by itself.
3139 :    
3140 :     For CVS users, this mechanism is not relevant for source archives, but
3141 :     it is convenient for getting new sets of binfiles.
3142 :    
3143 :     Archives should be tar files compressed with either gzip, compress, or
3144 :     bzip2. The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2.
3145 :    
3146 :     ----------------------------------------------------------------------
3147 :     Name: Matthias Blume
3148 : blume 572 Date: 2000/03/07 04:01:04
3149 :     Tag: blume_main_v110_26_2
3150 : dbm 570 Description:
3151 : blume 572 - size info in BOOTLIST
3152 :     * no fixed upper limits for number of bootfiles or length of
3153 :     bootfile names in runtime
3154 :     * falling back to old behavior if no BOOTLIST size info found
3155 :     - allocation size heuristics in .run-sml
3156 :     * tries to read cache size from /proc/cpuinfo (this is important for
3157 :     small-cache Celeron systems!)
3158 :     - install.sh robustified
3159 :     - CM manual updates
3160 :     - paranoid mode
3161 :     * no more CMB.deliver() (i.e., all done by CMB.make())
3162 :     * can re-use existing sml.boot.* files
3163 :     * init.cmi now treated as library
3164 :     * library stamps for consistency checks
3165 :     - sml.boot.<arch>-<os>/PIDMAP file
3166 :     * This file is read by the CM startup code. This is used to minimize
3167 :     the amount of dynamic state that needs to be stowed away for the
3168 :     purpose of sharing between interactive system and user code.
3169 :     - CM.Anchor.anchor instead of CM.Anchor.{set,cancel}
3170 :     * Upon request by Elsa. Anchors now controlled by get-set-pair
3171 :     like most other CM state variables.
3172 :     - Compiler.CMSA eliminated
3173 :     * No longer supported by CM anyway.
3174 :     - fixed bugs in pickler that kept biting Stefan
3175 :     * past refs to past refs (was caused by the possibility that
3176 :     ad-hoc sharing is more discriminating than hash-cons sharing)
3177 :     * integer overflow on LargeInt.minInt
3178 :     - ml-{lex,yacc} build scripts now use new mechanism
3179 :     for building standalone programs
3180 :     - fixed several gcc -Wall warnings that were caused by missing header
3181 :     files, missing initializations, etc., in runtime (not all warnings
3182 :     eliminated, though)

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