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/trunk/HISTORY
ViewVC logotype

Annotation of /sml/trunk/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log


Revision 735 - (view) (download)

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 705
15 : leunga 591 ----------------------------------------------------------------------
16 : blume 733 Name: Matthias Blume
17 : blume 735 Date: 2000/11/21 21:20:00 JST
18 :     Tag: blume-20001121-tools
19 :     Description:
20 :    
21 :     Continued hacking on autoloading problem -- with success this time.
22 :     Also changed tool-plugin mechanism. See new CM manual.
23 :    
24 :     ----------------------------------------------------------------------
25 :     Name: Matthias Blume
26 : blume 734 Date: 2000/11/19 14:30:00 JST
27 :     Tag: blume-20001119-autoload
28 :     Description:
29 :    
30 :     Some hacking to make autoloading faster. Success for CMB, no success
31 :     so far for CM. There is a reduced structure CM' that autoloads faster.
32 :     (This is a temporary, non-documented hack to be eliminated again when
33 :     the general problem is solved.)
34 :    
35 :     ----------------------------------------------------------------------
36 :     Name: Matthias Blume
37 : blume 733 Date: 2000/11/17 14:10:00 JST
38 :     Tag: blume-20001117-pickle-lib
39 :     Description:
40 :    
41 :     1. Eliminated comp-lib.cm
42 :     2. Made pickle-lib.cm
43 :     3. Eliminated all uses of intset.sml (from comp-lib.cm)
44 :     4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with
45 :     equivalent constructs from smlnj-lib.cm (INtHashTable).
46 :     5. Point 4. also goes for those uses of intmap.* in MLRISC.
47 :     Duplicated intmap modules thrown out.
48 :     6. Hunted down all duplicated SCC code and replaced it with
49 :     equivalent stuff (GraphSCCFn from smlnj-lib.cm).
50 :     7. Rewrote Feedback module.
51 :     8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it
52 :     should be thrown out and equivalent modules from smlnj-lib.cm
53 :     should be used (IntRedBlackSet, IntListSet, ...).
54 :    
55 :     Confirmed that compiler compiles to fixpoint.
56 :    
57 :     ----------------------------------------------------------------------
58 : leunga 731 Name: Allen Leung
59 :     Date: 2000/11/10 18:00:00
60 :     Tag: leunga-20001110-new-x86-fp
61 :    
62 :     A new x86 floating point code generator has been added.
63 :     By default this is turned off. To turn this on, do:
64 :    
65 :     CM.autoload "$smlnj/compiler.cm";
66 :     Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true;
67 :    
68 :     Changes:
69 :    
70 :     1. Changed FTAN to FPTAN so that the assembly output is correct.
71 :     2. Changed the extension callback for FTANGENT to generate:
72 :    
73 :     fptan
74 :     fstp %st(0)
75 :     instead of
76 :     fptan
77 :     fstpl ftempmem
78 :    
79 :     3. Numerous assembly fixes for x86.
80 :    
81 :     5. Cleaned up the machine code output module x86/x86MC.sml and added
82 :     support for a whole bunch of instructions and addressing modes:
83 :    
84 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n)
85 :     faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n)
86 :     fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st
87 :     fiadd/fisub/fisubr/fimul/fidiv/fidivr mem
88 :     fxch %st(n)
89 :     fld %st(n)
90 :     fst %st(n)
91 :     fst mem
92 :     fstp %st(n)
93 :     fucom %st(n)
94 :     fucomp %st(n)
95 :    
96 :     All these are now generated when the fast fp mode is turned on.
97 :    
98 :     6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs
99 :    
100 :     ----------------------------------------------------------------------
101 : blume 729 Name: Matthias Blume
102 :     Date: 2000/11/09 11:20:00 JST
103 :     Tag: blume-20001109-scc
104 :     Description:
105 :    
106 :     Eliminated some code duplication:
107 :    
108 :     1. Added "where" clause to GraphSCCFn in SML/NJ Library.
109 :     (Otherwise the functor is useless.)
110 :     2. Used GraphSCCFn where SCCUtilFun was used previously.
111 :     3. Got rid of SCCUtilFun (in comp-lib.cm).
112 :    
113 :     ----------------------------------------------------------------------
114 : george 721 Name: Lal George
115 :     Date: 2000/11/06 09:02:21 EST 2000
116 :     Tag: Release_110_30
117 :     Description:
118 :    
119 :     - Version 110.30
120 :     ----------------------------------------------------------------------
121 : blume 715 Name: Matthias Blume
122 : blume 716 Date: 2000/11/04 14:45:00
123 :     Tag: blume-20001104-mlbuild
124 :     Description:
125 :    
126 :     - Made ml-build faster on startup.
127 :     - Documentation fixes.
128 :    
129 :     ----------------------------------------------------------------------
130 :     Name: Matthias Blume
131 : blume 715 Date: 2000/11/02 17:00:00 JST
132 :     Tag: blume-20001102-condcomp
133 :     Description:
134 :    
135 :     - Small tweaks to pickler -- new BOOTFILES!
136 :     - Version bumped to 110.29.2.
137 :     - Added conditional compilation facility to init.cmi (see comment there).
138 :     ----------------------------------------------------------------------
139 : leunga 713 Name: Allen Leung
140 :     Date: 2000/10/23 19:31:00
141 :     Tag: leunga-20001023-demo-ra
142 :    
143 :     1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only)
144 :     2. Test programs for the graph library updated
145 :     3. Some new MLRISC demo programs added
146 :    
147 :     ----------------------------------------------------------------------
148 : blume 710 Name: Matthias Blume
149 : blume 711 Date: 2000/08/31 22:15:00 JST
150 :     Tag: blume-20001017-errmsg
151 :     Description:
152 :    
153 :     More error message grief: Where there used to be no messages, there
154 :     now were some that had bogus error regions. Fixed.
155 :    
156 :     ----------------------------------------------------------------------
157 :     Name: Matthias Blume
158 : blume 710 Date: 2000/08/31 17:30:00 JST
159 :     Tag: blume-20001017-v110p29p1
160 :     Description:
161 :    
162 :     I made a version 110.29.1 with new bootfiles.
163 :    
164 :     Changes: Modified pickler/unpickler for faster and leaner unpickling.
165 :     CM documentation changes and a small bugfix in CM's error reporting.
166 :    
167 :     ----------------------------------------------------------------------
168 : george 705 Name: Lal George
169 :     Date: 2000/09/27 14:42:35 EDT
170 :     Tag: george-20000927-nodestatus
171 :     Description:
172 :    
173 :     Changed the type of the nodestatus, so that:
174 :    
175 :     SPILLED(~1) is now SPILLED
176 :     SPILLED(m) where m>=0 is now MEMREG(m)
177 :     SPILLED(s) where s<~1 is now SPILL_LOC(~s)
178 :    
179 :     ----------------------------------------------------------------------
180 : blume 697 Name: Matthias Blume
181 : blume 703 Date: 2000/09/07 14:45:00 JST
182 :     Tag: blume-20000907-cmerrmsg
183 :     Description:
184 :    
185 :     Small tweak to CM to avoid getting ML syntax error messages twice.
186 :    
187 :     ----------------------------------------------------------------------
188 :     Name: Matthias Blume
189 : blume 701 Date: 2000/08/31 18:00:00 JST
190 :     Tag: blume-20000831-cvsbootfiles
191 :     Description:
192 :    
193 :     New URL for boot files (because the 110.29 files on the BL server do
194 :     now work correctly with my updated install scripts for yacc and lex).
195 :    
196 :     ----------------------------------------------------------------------
197 :     Name: Matthias Blume
198 : blume 697 Date: 2000/08/08 12:33:00 JST
199 :     Tag: blume-20000808-manual
200 :     Description:
201 :    
202 :     Tiny update to CM manual.
203 :    
204 :     ----------------------------------------------------------------------
205 : leunga 695 Name: Allen Leung
206 :     Date: 2000/08/7 19:31:00
207 :     Tag: leunga-20000807-a-whole-bunch-of-stuff
208 :    
209 :     Moby, C--, SSA, x86, machine descriptions etc. Should only affect C--
210 :     and Mobdy.
211 :    
212 :     1. x86
213 :    
214 :     a. Fixes to peephole module by John and Dan.
215 :     b. Assembly fix to SETcc by Allen.
216 :     c. Fix to c-call by John.
217 :     d. Fix to spilling by John. (This one deals with the missing FSTPT case)
218 :     e. Instruction selection optimization to SETcc as suggested by John.
219 :    
220 :     For example,
221 :    
222 :     MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0))
223 :    
224 :     should generate:
225 :    
226 :     MOVL a, x
227 :     SUBL b, x
228 :     SHRL 31, x
229 :    
230 :     2. IR stuff
231 :    
232 :     A bunch of new DJ-graph related algorithms added. These
233 :     speed up SSA construction.
234 :    
235 :     3. SSA + Scheduling
236 :    
237 :     Added code for SSA and scheduling to the repository
238 :    
239 :     ----------------------------------------------------------------------
240 : george 694 Name: Lal George
241 :     Date: 2000/07/27 11:53:14 EDT
242 :    
243 :     Tag: lal-20000727-linux-ppc
244 :     Description:
245 :    
246 :     Made changes to support Linux PPC.
247 :     p.s. I have confirmation that the 110.29 boot files work fine.
248 :    
249 :     ----------------------------------------------------------------------
250 : blume 684 Name: Matthias Blume
251 : blume 692 Date: 2000/07/27 17:40:00 JST
252 :     Tag: blume-20000727-scripts
253 :     Description:
254 :    
255 :     !!!! WARNING !!!!
256 :     You must recompile the runtime system!
257 :     !!!! WARNING !!!!
258 :    
259 :     This is basically another round of script-enhancements:
260 :    
261 :     1. sml, ml-build, and ml-makedepend accept options -D and -U to define
262 :     and undefine CM preprocessor symbols.
263 :    
264 :     2. ml-build avoids generating a new heap image if it finds that the
265 :     existing one is still ok. (The condition is that no ML file had to
266 :     be recompiled and all ML files are found to be older that the heap
267 :     file.)
268 :    
269 :     To make this work smoothly, I also hacked the runtime system as
270 :     well as SMLofNJ.SysInfo to get access to the heap image suffix
271 :     (.sparc-solaris, ...) that is currently being used.
272 :    
273 :     Moreover, the signature of CM.mk_standalone has changed. See the
274 :     CM manual.
275 :    
276 :     3. ml-makedepend accepts additional options -n, -a, and -o. (See the
277 :     CM manual for details.)
278 :    
279 :     4. More CM manual updates:
280 :     - all of the above has been documented.
281 :     - there is now a section describing the (CM-related) command line
282 :     arguments that are accepted by the "sml" command
283 :    
284 :     ----------------------------------------------------------------------
285 :     Name: Matthias Blume
286 : blume 691 Date: 2000/07/25 16:20:00 JST
287 :     Tag: blume-20000725-makedepend
288 :     Description:
289 :    
290 :     Added a script called ml-makedepend. This can be used in makefiles
291 :     for Unix' make in a way very similar to the "makedepend" command for
292 :     C.
293 :    
294 :     The script internally uses function CM.sources.
295 :    
296 :     Synopsis:
297 :    
298 :     ml-makedepend [-f makefile] cmfile targetname
299 :    
300 :     The default for the makefile is "makefile" (or "Makefile" should
301 :     "makefile" not exist).
302 :    
303 :     ml-makedepend adds a cmfile/targetname-specific section to this
304 :     makefile (after removing the previous version of this section). The
305 :     section contains a single dependency specification with targetname on
306 :     the LHS (targetname is an arbitrary name), and a list of files derived
307 :     from the cmfile on the RHS. Some of the files on the RHS are
308 :     ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to
309 :     "make" variables $(ARCH) and $(OPSYS) in place of the corresponding
310 :     path names. The makefile writer is responsible for making sure that
311 :     these variables have correct at the time "make" is invoked.
312 :    
313 :     ----------------------------------------------------------------------
314 :     Name: Matthias Blume
315 : blume 690 Date: 2000/07/22 23:30:00 JST
316 :     Tag: blume-20000722-urlupdate
317 :     Description:
318 :    
319 :     Changed BOOT and config/srcarchiveurl to point to BL server:
320 :    
321 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
322 :    
323 :     ----------------------------------------------------------------------
324 :     Name: Matthias Blume
325 : blume 686 Date: 2000/07/18 18:00:00 JST
326 :     Tag: blume-20000718-Version_110_29
327 :     Description:
328 :    
329 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
330 :    
331 :     2. Updated config/version to 110.29
332 :    
333 :     3. Updated config/srcarchiveurl
334 :    
335 :     3. New boot files!
336 :     ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
337 :    
338 :     ----------------------------------------------------------------------
339 :     Name: Matthias Blume
340 : blume 684 Date: 2000/07/11 13:58:00 JST
341 :     Tag: blume-20000711-doctypo
342 :     Description:
343 :    
344 :     Fixed a few typos in CM manual.
345 :    
346 :     ----------------------------------------------------------------------
347 : leunga 683 Name: Allen Leung
348 :     Date: 2000/06/15 00:38:00
349 :     Tag: leunga-20000704-sparc-x86
350 :    
351 :     1. x86 peephole improvement sp += k; sp -= k => nop [from John]
352 :     2. fix to x86 RET bug [found by Dan Grossman]
353 :     3. sparc assembly bug fix for ticc instructions [found by Fermin]
354 :    
355 :     Affects c-- and moby only
356 :    
357 :     ----------------------------------------------------------------------
358 : blume 680 Name: Matthias Blume
359 : blume 682 Date: 2000/07/04 15:26:00
360 :     Tag: blume-20000704-trigger
361 :     Description:
362 :    
363 :     1. Improvements to CM manual.
364 :     2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
365 :     of getting a back-trace. The function, when called, raises an
366 :     internal exception which explicitly carries the full back-trace history,
367 :     so it is unaffected by any intervening handle-raise pairs ("trivial"
368 :     or not). The interactive loop will print that history once it arrives
369 :     at top level.
370 :     Short of having all exceptions implicitly carry the full history, the
371 :     recommended way of using this facility is:
372 :     - compile your program with instrumentation "on"
373 :     - run it, when it raises an exception, look at the history
374 :     - if the history is "cut off" because of some handler, go and modify
375 :     your program so that it explicitly calls BTrace.trigger
376 :     - recompile (still instrumented), and rerun; look at the full history
377 :    
378 :     ----------------------------------------------------------------------
379 :     Name: Matthias Blume
380 :     Date: 2000/07/03 15:36:00 JST
381 : blume 680 Tag: blume-20000702-manual
382 :     Description:
383 :    
384 :     Small corrections and updates to CM manual.
385 :    
386 :     ----------------------------------------------------------------------
387 : blume 682 Name: Matthias Blume
388 : blume 679 Date: 2000/06/29 16:04:00 JST
389 :     Tag: blume-20000629-yacctool
390 :     Description:
391 :    
392 :     Changes:
393 :    
394 :     1. Class "mlyacc" now takes separate arguments to pass options to
395 :     generated .sml- and .sig-files independently.
396 :     2. Corresponding CM manual updates.
397 :     3. BTrace module now also reports call sites. (However, for loop clusters
398 :     it only shows from where the cluster was entered.) There are associated
399 :     modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
400 :    
401 :     ----------------------------------------------------------------------
402 : blume 675 Name: Matthias Blume
403 : blume 678 Date: 2000/06/27 16:51:00 JST
404 :     Tag: blume-20000627-noweb
405 :     Description:
406 :    
407 :     Changes:
408 :    
409 :     1. Implemented "subdir" and "witness" options for noweb tool.
410 :     This caused some slight internal changes in CM's tool implementation.
411 :     2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning
412 :     some remaining issues from earlier path anchor changes.
413 :     3. Updated CM manual accordingly.
414 :    
415 :     4. Changed implementation of back-tracing so that I now consider it
416 :     ready for prime-time.
417 :    
418 :     In particular, you don't have to explicitly trigger the back-trace
419 :     anymore. Instead, if you are running BTrace-instrumented code and
420 :     there is an uncaught exception (regardless of whether or not it was
421 :     raised in instrumented code), the top-level evalloop will print
422 :     the back-trace.
423 :    
424 :     Features:
425 :    
426 :     - Instrumented and uninstrumented code work together seemlessly.
427 :     (Of course, uninstrumented code is never mentioned in actual
428 :     back-traces.)
429 :    
430 :     - Asymptotic time- and space-complexity of instrumented code is
431 :     equal to that of uninstrumented code. (This means that
432 :     tail-recursion is preserved by the instrumentation phase.)
433 :    
434 :     - Modules whose code has been instrumented in different sessions
435 :     work together without problem.
436 :    
437 :     - There is no penalty whatsoever on uninstrumented code.
438 :    
439 :     - There is no penalty on "raise" expressions, even in
440 :     instrumented code.
441 :    
442 :     A potential bug (or perhaps it is a feature, too):
443 :    
444 :     A back-trace reaches no further than the outermost instrumented
445 :     non-trivial "raise". Here, a "trivial" raise is one that is the
446 :     sole RHS of a "handle" rule. Thus, back-traces reach trough
447 :    
448 :     <exp> handle e => raise e
449 :    
450 :     and even
451 :    
452 :     <exp> handle Foo => raise Bar
453 :    
454 :     and, of course, through
455 :    
456 :     <exp> handle Foo => ...
457 :    
458 :     if the exception was not Foo.
459 :    
460 :     Back-traces always reach right through any un-instrumented code
461 :     including any of its "handle" expressions, trivial or not.
462 :    
463 :     To try this out, do the following:
464 :    
465 :     - Erase all existing binfiles for your program.
466 :     (You may keep binfiles for those modules where you think you
467 :     definitely don't need back-tracing.)
468 :     - Turn on back-trace instrumentation:
469 :     SMLofNJ.Internals.BTrace.mode (SOME true);
470 :     - Recompile your program. (I.e., run "CM.make" or "use".)
471 :     - You may now turn instrumentation off again (if you want):
472 :     SMLofNJ.Internals.BTrace.mode (SOME false);
473 :     - Run your program as usual. If it raises an exception that
474 :     reaches the interactive toplevel, then a back-trace will
475 :     automatically be printed. After that, the toplevel loop
476 :     will print the exception history as usual.
477 :    
478 :     ----------------------------------------------------------------------
479 :     Name: Matthias Blume
480 : blume 677 Date: 2000/06/26 09:56:46 JST
481 :     Tag: blume-20000626-setup
482 :     Description:
483 :    
484 :     CM: - setup-parameter to "sml" added; this can be used to run arbitrary
485 :     ML code before and after compiling a file (e.g., to set compiler
486 :     flags)
487 :    
488 :     Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
489 :     - associated changes to btrace.sml (BTrace instrumentation pass)
490 :     - cleaner implementation of btimp.sml (BTrace tracing and report
491 :     module)
492 :    
493 :     CM manual: * new path encoding documented
494 :     * description of setup-parameter to "sml" added
495 :    
496 :     The biggest user-visible change to back-tracing is that it is no
497 :     longer necessary to compile all traced modules within the same
498 :     session. (This was a real limitation.)
499 :    
500 :     ----------------------------------------------------------------------
501 :     Name: Matthias Blume
502 : blume 676 Date: 2000/06/24 12:40:00 JST
503 :     Tag: blume-20000624-startup
504 :     Description:
505 :    
506 :     Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_
507 :     bit too often -- to put it mildly. :)
508 :    
509 :     ----------------------------------------------------------------------
510 :     Name: Matthias Blume
511 : blume 675 Date: 2000/06/23 18:20:00 JST
512 :     Tag: blume-20000623-btrace
513 :     Description:
514 :    
515 :     This updates adds a backtrace facility to aid programmers in debugging
516 :     their programs. This involves the following changes:
517 :    
518 :     1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
519 :     keeping track of the current call stack. When programs are compiled
520 :     in a special mode, the compiler will insert calls to these hooks
521 :     into the user program.
522 :     "Hook" means that it is possible for different implementations of
523 :     back-tracing to register themselves (at different times).
524 :    
525 :     2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
526 :     as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off.
527 :     It can be turned on using this call:
528 :     SMLofNJ.Internals.BTrace.mode (SOME true);
529 :     Turning it off again:
530 :     SMLofNJ.Internals.BTrace.mode (SOME false);
531 :     Querying the current status:
532 :     SMLofNJ.Internals.BTrace.mode NONE;
533 :     Annotated programs are about twice as big as normal ones, and they
534 :     run a factor of 2 to 4 slower with a dummy back-trace plugin (one
535 :     where all hooks do nothing). The slowdown with a plugin that is
536 :     actually useful (such as the one supplied by default) is even greater,
537 :     but in the case of the default plugin it is still only an constant
538 :     factor (amortized).
539 :    
540 :     3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
541 :     with a sub-structure BTrace for controlling back-tracing. In particular,
542 :     the above-mentioned function "mode" controls whether the annotation
543 :     phase is invoked by the compiler. Another important function is
544 :     "trigger": when called it aborts the current execution and causes
545 :     the top-level loop to print a full back-trace.
546 :    
547 :     4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
548 :     for back-tracing. It keeps track of the dynamic call stack and in
549 :     addition to that it keeps a partial history at each "level" of that
550 :     stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls
551 :     d and b (at separate times, dynamically), then the report will show:
552 :    
553 :     GOTO d
554 :     /c
555 :     GOTO \b
556 :     CALL a
557 :    
558 :     This shows that there was an initial non-tail call of a, then a
559 :     tail-call to b or c, looping behavior in a cluster of functions that
560 :     consist of b and c, and then a goto from that cluster (i.e., either from
561 :     b or from c) to d.
562 :    
563 :     Note that (depending on the user program) the amount of information
564 :     that the back-trace module has to keep track of at each level is bounded
565 :     by a constant. Thus, the whole implementation has the same asymptotical
566 :     complexity as the original program (both in space and in time).
567 :    
568 :     5. compiler/TopLevel/interact/evalloop.sml has been modified to
569 :     handle the special exception SMLofNJ.Internals.BTrace.BTrace
570 :     which is raised by the "trigger" function mentioned above.
571 :    
572 :     Notes on usage:
573 :    
574 :     - Annotated code works well together with unannotated code:
575 :     Unannotated calls simply do not show up at all in the backtrace.
576 :    
577 :     - It is not a good idea to let modules that were annotated during
578 :     different sessions run at the same time. This is because the compiler
579 :     chooses small integers to identify individual functions, and there
580 :     will be clashes if different modules were compiled in separate sessions.
581 :     (Nothing will crash, and you will even be told about the clashes, but
582 :     back-trace information will in general not be useful.)
583 :    
584 :     - Back-tracing can be confused by callcc and capture.
585 :    
586 :     - The only way of getting a back-trace right now is to explicitly
587 :     invoke the "trigger" function from your user program. Eventually, we
588 :     should make every exception carry back-trace information (if
589 :     available). But since this creates more overhead at "raise"-time
590 :     (similar to the current exnHistory overhead), I have not yet
591 :     implemented this. (The implementation will be rather easy.) With
592 :     exceptions carrying back-trace information, this facility will be even
593 :     more useful because users don't need to modify their programs...
594 :    
595 :     - While it is possible to compile the compiler with back-trace
596 :     annotations turned on (I did it to get some confidence in
597 :     correctness), you must make absolutely sure that core.sml and
598 :     btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually
599 :     be compiled with annotation because there is no core access yet, but
600 :     if you compile btimp.sml with annotation, then the system will go into
601 :     an infinite recursion and crash.)
602 :     Since CM currently does not know about BTrace, the only way to turn
603 :     annotations on and off for different modules of the compiler is to
604 :     interrupt CMB.make, change the settings, and re-invoke it. Of course,
605 :     this is awkward and clumsy.
606 :    
607 :     Sample sessions:
608 :    
609 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
610 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
611 :     [autoloading]
612 :     [autoloading done]
613 :     val it = false : bool
614 :     - structure X = struct
615 :     - fun main n = let
616 :     - fun a (x, 0) = d x
617 :     - | a (x, n) = b (x, n - 1)
618 :     - and b (x, n) = c (x, n)
619 :     - and c (x, n) = a (x, n)
620 :     - and d x = e (x, 3)
621 :     - and e (x, 0) = f x
622 :     - | e (x, n) = e (x, n - 1)
623 :     - and f 0 = SMLofNJ.Internals.BTrace.trigger ()
624 :     - | f n = n * g (n - 1)
625 :     - and g n = a (n, 3)
626 :     - in
627 :     - f n
628 :     - end
629 :     - end;
630 :     structure X : sig val main : int -> int end
631 :     - X.main 3;
632 :     *** BACK-TRACE ***
633 :     GOTO stdIn:4.2-13.20: X.main[2].f
634 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
635 :     GOTO stdIn:4.2-13.20: X.main[2].d
636 :     / stdIn:4.2-13.20: X.main[2].a
637 :     | stdIn:4.2-13.20: X.main[2].b
638 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
639 :     CALL stdIn:4.2-13.20: X.main[2].g
640 :     GOTO stdIn:4.2-13.20: X.main[2].f
641 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
642 :     GOTO stdIn:4.2-13.20: X.main[2].d
643 :     / stdIn:4.2-13.20: X.main[2].a
644 :     | stdIn:4.2-13.20: X.main[2].b
645 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
646 :     CALL stdIn:4.2-13.20: X.main[2].g
647 :     GOTO stdIn:4.2-13.20: X.main[2].f
648 :     GOTO-( stdIn:4.2-13.20: X.main[2].e
649 :     GOTO stdIn:4.2-13.20: X.main[2].d
650 :     / stdIn:4.2-13.20: X.main[2].a
651 :     | stdIn:4.2-13.20: X.main[2].b
652 :     GOTO-\ stdIn:4.2-13.20: X.main[2].c
653 :     CALL stdIn:4.2-13.20: X.main[2].g
654 :     GOTO stdIn:4.2-13.20: X.main[2].f
655 :     CALL stdIn:2.15-17.4: X.main[2]
656 :     -
657 :    
658 :     (Note that because of a FLINt bug the above code currently does not
659 :     compile without BTrace turned on.)
660 :    
661 :     Here is another example, using my modified Tiger compiler:
662 :    
663 :     Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
664 :     - SMLofNJ.Internals.BTrace.mode (SOME true);
665 :     [autoloading]
666 :     [autoloading done]
667 :     val it = false : bool
668 :     - CM.make "sources.cm";
669 :     [autoloading]
670 :     ...
671 :     [autoloading done]
672 :     [scanning sources.cm]
673 :     [parsing (sources.cm):parse.sml]
674 :     [creating directory CM/SKEL ...]
675 :     [parsing (sources.cm):tiger.lex.sml]
676 :     ...
677 :     [wrote CM/sparc-unix/semant.sml]
678 :     [compiling (sources.cm):main.sml]
679 :     [wrote CM/sparc-unix/main.sml]
680 :     [New bindings added.]
681 :     val it = true : bool
682 :     - Main.compile ("../testcases/merge.tig", "foo.out");
683 :     *** BACK-TRACE ***
684 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
685 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
686 :     CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
687 :     GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
688 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
689 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
690 :     CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
691 :     / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
692 :     CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
693 :     CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
694 :     CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
695 :     CALL main.sml:1.18-118.4: Main.compile[2]
696 :     -
697 :    
698 :     ----------------------------------------------------------------------
699 : blume 673 Name: Matthias Blumen
700 :     Date: 2000/06/21 18:00:00 JST
701 :     Tag: blume-20000621-manual
702 :     Description:
703 :    
704 :     CM manual update: Path environments documented.
705 :    
706 :     ----------------------------------------------------------------------
707 : blume 666 Name: Matthias Blume
708 : blume 672 Date: 2000/06/19 13:40:00
709 :     Tag: blume-20000619-manual
710 :     Description:
711 :    
712 :     CM manual and system/README update. This only covers the fact that
713 :     there are no more implicit anchors. (Path environments and the "bind"
714 :     option to "cm" have yet to be documented.)
715 :    
716 :     ----------------------------------------------------------------------
717 :     Name: Matthias Blume
718 : blume 671 Date: 2000/06/19 11:05:00 JST
719 :     Tag: blume-20000619-chdir-bugfix
720 :     Description:
721 :    
722 :     Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
723 :    
724 :     ----------------------------------------------------------------------
725 :     Name: Matthias Blume
726 : blume 670 Date: 2000/06/18 22:00:10 JST
727 :     Tag: blume-20000618-implicit-anchors-really-gone
728 :     Description:
729 :    
730 :     I updates the previous HISTORY entry where I forgot to mention that
731 :     implicit anchors are no longer with us.
732 :    
733 :     The current update also gets rid of the (now useless) controller
734 :     CM.Control.implicit_anchors.
735 :    
736 :     ----------------------------------------------------------------------
737 :     Name: Matthias Blume
738 : blume 666 Date: 2000/06/16 17:30:00 JST
739 :     Tag: blume-20000616-anchorenv
740 :     Description:
741 :    
742 :     This patch implements the long anticipated (just kidding :) "anchor
743 :     environment" mechanism. In the course of doing this, I also
744 :     re-implemented CM's internal "SrcPath" module from scratch. The new
745 :     one should be more robust in certain boundary cases. In any case, it
746 :     is a lot cleaner than its predecessor (IMHO).
747 :    
748 :     This time, although there is yet another boot file format change, I
749 :     kept the unpickler backward-compatible. As a result, no new bootfiles
750 :     are necessary and bootstrapping is straightforward. (You cannot read
751 :     new bootfiles into an old system, but the other way around is no
752 :     problem.)
753 :    
754 :     Visible changes:
755 :    
756 : blume 670 ** 0. Implicit path anchors (without the leading $-symbol) are no
757 :     longer recognized at all. This means that such path names are not
758 :     illegal either. For example, the name basis.cm simply refers to a
759 :     local file called "basis.cm" (i.e, the name is an ordinary path
760 :     relative to .cm-files directory). Or, to put it differently, only
761 :     names that start with $ are anchored paths.
762 : blume 666
763 : blume 670 ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
764 :     vanished.
765 :    
766 :     John (Reppy) had critizised this as soon as I originally proposed and
767 : blume 666 implemented it, but at that time I did not really deeply believe
768 :     him. :) Now I came full-circle because I need the $<singlearc> syntax
769 :     in another place where it cannot be seen as an abbreviation for
770 :     $/<singlearc>. To avoid the confusion, $<singlearc> now means what it
771 :     seems to mean (i.e., it "expands" into the corresponding anchor
772 :     value).
773 :    
774 :     However, when paths are used as members in CM description files, it
775 :     continues to be true that there must be at least another arc after the
776 :     anchor. This is now enforced separately during semantic analysis
777 : blume 670 (i.e., from a lexical/syntactical point of view, the notation is ok.)
778 : blume 666
779 :     ** 2. The "cm" class now accepts an option "bind". The option's value
780 :     is a sub-option list of precisely two items -- one labeled "anchor"
781 :     and the other one labeled "value". As you might expect, "anchor" is
782 :     used to specify an anchor name to be bound, and "value" specifies what
783 :     the anchor is being bound to.
784 :    
785 :     The value must be a directory name and can be given in either standard
786 :     syntax (including the possibility that it is itself an anchored path)
787 :     or native syntax.
788 :    
789 :     Examples:
790 :    
791 :     foo.cm (bind:(anchor:bar value:$mystuff/bar))
792 :     lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *)
793 :    
794 :     and so on.
795 :    
796 :     The meaning of this is that the .cm-file will be processed with an
797 :     augmented anchor environment where the given anchor(s) is/are bound to
798 :     the given values(s).
799 :    
800 :     The rationale for having this feature is this: Suppose you are trying
801 :     to use two different (already stable) libraries a.cm and b.cm (that
802 :     you perhaps didn't write yourself). Further, suppose each of these
803 :     two libraries internally uses its own auxiliary library $aux/lib.cm.
804 :     Normally you would now have a problem because the anchor "lib" can not
805 :     be bound to more than one value globally. Therefore, the project that
806 :     uses both a.cm and b.cm must locally redirect the anchor to some other
807 :     place:
808 :    
809 :     a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
810 :     b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
811 :    
812 :     This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
813 :     /usr/lib/smlnj/b-stuff/aux.cm, respectively.
814 :    
815 :     Hard-wiring path names is a bit inflexible (and CM will verbosely warn
816 :     you when you do so at the time of CM.stabilize). Therefore, you can
817 :     also use an anchored path as the value:
818 :    
819 :     a.cm (bind:(anchor:lib value:$a-lib))
820 :     b.cm (bind:(anchor:lib value:$b-lib))
821 :    
822 :     Now you can globally configure (using the usual CM.Anchor.anchor or
823 :     pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib"
824 :     itself is always locally bound, setting it globally is no longer
825 :     meaningful or necessary (but it does not hurt either). In fact, "lib"
826 :     can still be used as a global anchor for separate purposes. As a
827 :     matter of fact, one can locally define "lib" in terms of a global
828 :     "lib":
829 :    
830 :     a.cm (bind:(anchor:lib value:$lib/a))
831 :     b.cm (bind:(anchor:lib value:$lib/b))
832 :    
833 :     ** 3: The encoding of path names has changed. This affects the way
834 :     path names are shown in CM's progress report and also the internal
835 :     protocol encoding used for parallel make.
836 :    
837 :     The encoding now uses one or more ':'-separated segments. Each
838 :     segments corresponds to a file that has been specified relative to the
839 :     file given by its preceding segment. The first segment is either
840 :     relative to the CWD, absolute, or anchored. Each segment itself is
841 :     basically a Unix pathname; all segments but the first are relative.
842 :    
843 :     Example:
844 :    
845 :     $foo/bar/baz.cm:a/b/c.sml
846 :    
847 :     This path denotes the file bar/a/b/c.sml relative to the directory
848 :     denoted by anchor "foo". Notice that the encoding also includes
849 :     baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such
850 :     paths are resolved relative to the .cm-files directory, so baz.cm must
851 :     be ignored to get the "real" pathname.
852 :    
853 :     To make this fact more obvious, CM puts the names of such "virtual
854 :     arcs" into parentheses when they appear in progress reports. (No
855 :     parentheses will appear in the internal protocol encoding.) Thus,
856 :     what you really see is:
857 :    
858 :     $foo/bar/(baz.cm):a/b/c.sml
859 :    
860 :     I find this notation to be much more informative than before.
861 :    
862 :     Another new feature of the encoding is that special characters
863 :     including parentheses, colons, (back)slashes, and white space are
864 :     written as \ddd (where ddd is the decimal encoding of the character).
865 :    
866 : blume 670 *** The CM manual still needs to be updated.
867 :    
868 : blume 666 ----------------------------------------------------------------------
869 : leunga 660 Name: Allen Leung
870 :     Date: 2000/06/15 00:38:00
871 :     Tag: leunga-20000615-x86-peephole
872 :    
873 :     x86 Peephole fix by Fermin. Affects c-- and moby only.
874 :    
875 :     ----------------------------------------------------------------------
876 : blume 658 Name: Matthias Blume
877 :     Date: 2000/06/12 11:40:00
878 :     Tag: blume-20000612-parmakefix
879 :     Description:
880 :    
881 :     More cleanup after changing the file naming scheme: This time I
882 :     repaired the parallel make mechanism for CMB.make which I broke earlier.
883 :    
884 :     ----------------------------------------------------------------------
885 : leunga 657 Name: Allen Leung
886 :     Date: 2000/06/09 01:25:00
887 :     Tag: leunga-20000609-various
888 :    
889 :     None of these things should affect normal SML/NJ operations
890 :    
891 :     1. Peephole improvements provided by Fermin (c--)
892 :     2. New annotation DEFUSE for adding extra dependence (moby)
893 :     3. New X86 LOCK instructions (moby)
894 :     4. New machine description language for reservation tables (scheduling)
895 :     5. Fixes to various optimization/analysis modules (branch chaining, dominator
896 :     trees etc.)
897 :     6. I've changed the CM files so that they can work with versions
898 :     110.0.6, 110.25 and 110.28
899 :    
900 :     ----------------------------------------------------------------------
901 : blume 652 Name: Matthias Blume
902 : blume 656 Date: 2000/06/09 12:40:00
903 :     Tag: blume-20000609-log
904 :     Description:
905 :    
906 :     - Removed all(?) remaining RCS Log entries from sources.
907 :    
908 :     - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for
909 :     anchored paths).
910 :    
911 :     ----------------------------------------------------------------------
912 :     Name: Matthias Blume
913 : blume 653 Date: 2000/06/07 17:00:00 JST
914 :     Tag: blume-20000607-no-implicit-anchors
915 :     Description:
916 :    
917 :     1. This update changes the default setting for
918 :     CM.Control.implicit_anchors from true to false. This means that
919 :     implicit anchors are no longer permitted by default. I also tried to
920 :     make sure that nothing else still relies on implicit anchors.
921 :     (This is the next step on the schedule towards a CM that does not even
922 :     have the notion of implicit anchors anymore.)
923 :    
924 :     2. More CM manual updates.
925 :    
926 :     3. I managed to track down and fix the pickling bug I mentioned last
927 :     time. Because of the previously existing workaround, this entails no
928 :     immediate practical changes.
929 :    
930 :     ----------------------------------------------------------------------
931 :     Name: Matthias Blume
932 : blume 652 Date: 2000/06/06 11:15:00 JST
933 :     Tag: blume-20000606-lazierpickle
934 :     Description:
935 :    
936 :     !!!! NEW BOOT FILES !!!!
937 :    
938 :     * The main purpose of this update is to make library pickles lazier in
939 :     order to reduce the initial space penalty for autoloading a library.
940 :     As a result, it is now possible to have $smlnj/compiler.cm
941 :     pre-registered. This should take care of the many complaints or
942 :     inquiries about missing structure Compiler. This required changes to
943 :     CM's internal data structures and small tweaks to some algorithms.
944 :    
945 :     As a neat additional effect, it is no longer necessary (for the sake
946 :     of lean heap image files) to distinguish between a "minimal" CM and a
947 :     "full" CM. Now, there is only one CM (i.e., the "full" version:
948 :     $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the
949 :     interactive top level. ($smlnj/cm/minimal.cm is gone.)
950 :    
951 :     To make the life of compiler-hackers easier, "makeml" now also
952 :     pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other
953 :     words, after you bootstrap a new sml for the first time, you will not
954 :     have to autoload $smlnj/cmb.cm again afterwards. (The first time
955 :     around you will still have to do it, though.)
956 :    
957 :     * A second change consists of major updates to the CM manual. There
958 :     are now several appendices with summary information and also a full
959 :     specification of the CM description file syntax.
960 :    
961 :     * In directory src/system I added the script "allcross". This script
962 :     invokes sml and cross-compiles the compiler for all supported
963 :     architectures. (Useful when providing a new set of boot files.)
964 :    
965 :     * There seems to be a latent bug in my "lazy pickles" mechanism. I
966 :     added a small tweak to pickle-util.sml to work around this problem,
967 :     but it is not a proper fix yet. I will investigate further. (The
968 :     effect of the bug was an inflation of library pickle size.)
969 :    
970 :     * Version number increased to 110.28.1 (to avoid compatibility problems).
971 :    
972 :     ----------------------------------------------------------------------
973 : leunga 646 Name: Allen Leung
974 : leunga 648 Date: 2000/05/25 17:28 EDT
975 :     Tag: leunga-20000525-ra
976 :     Description:
977 :    
978 :     Fixed a bug in freezing phase of the register allocator.
979 :    
980 :     ----------------------------------------------------------------------
981 :     Name: Allen Leung
982 : leunga 647 Date: 2000/05/15 22:53 EDT
983 : leunga 646 Tag: leunga-20000515-alpha-x86-ra
984 :     Description:
985 :    
986 :     1. Alpha
987 :    
988 :     Slight cleanup. Removed the instruction SGNXL
989 :    
990 :     2. X86
991 :    
992 :     Added the following instructions to the instruction set:
993 :    
994 :     ROLx, RORx,
995 :     BTx, BTSx, BTLx, BTRx,
996 :     XCHGx, and variants with the LOCK prefix
997 :    
998 :     3. Register Allocation
999 :    
1000 :     The module ra-rewrite-with-renaming has been improved.
1001 :    
1002 : leunga 647 These have no effect on SML/NJ.
1003 :    
1004 : leunga 646 ----------------------------------------------------------------------
1005 : blume 642 Name: Matthias Blume
1006 : blume 645 Date: 2000/05/15 16:20:00 JST
1007 :     Tag: blume-20000515-lightrebuild
1008 :     Description:
1009 :    
1010 :     1. I added an alternative to "-rebuild" to "makeml". The difference is
1011 :     that prior to calling CMB.make' the CM-variable "LIGHT" will be
1012 :     defined. In effect, the command will not build any cross-compiler
1013 :     backends and therefore finish more quickly.
1014 :    
1015 :     The "fixpt" script also takes a "-light" switch to be able to use
1016 :     this new facility while compiling for a fixpoint.
1017 :    
1018 :     2. I replaced all mentions of anchored paths in group owner specifications
1019 :     with simple relative paths (usually starting with "..").
1020 :     The rationale is that a library's internal workings should not be
1021 :     compromised by the lack of some anchor. (An anchor is necessary
1022 :     for someone who wants to refer to the library by an anchored path,
1023 :     but it should not be necessary to build the same library in the first
1024 :     place.)
1025 :    
1026 :     3. I changed the way CM's tool mechanism determines the shell command
1027 :     string used for things like ml-yacc etc. so that it does not break
1028 :     when CM.Control.implicit_anchors is turned off.
1029 :    
1030 :     ----------------------------------------------------------------------
1031 :     Name: Matthias Blume
1032 : blume 644 Date: 2000/05/12 18:20:00 JST
1033 :     Tag: blume-20000512-ml-build
1034 :     Description:
1035 :    
1036 :     Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from
1037 :     getting installed properly (by config/install.sh).
1038 :    
1039 :     ----------------------------------------------------------------------
1040 :     Name: Matthias Blume
1041 : blume 643 Date: 2000/05/12 17:30:00 JST
1042 :     Tag: blume-20000512-anchors
1043 :     Description:
1044 :    
1045 :     !!! NEW BOOT FILES !!!
1046 :    
1047 :     This change is in preparation of fading out support for "implicitly
1048 :     anchored path names". I went through all sources and used the
1049 :     explicit (and relatively new) $-notation. See system/README and the
1050 :     CM manual for more info on this.
1051 :    
1052 :     I also modified the anchoring scheme for some things such as "smlnj",
1053 :     "MLRISC", "cm", etc. to take advantage of the fact that explicit
1054 :     anchors are more expressive: anchor name and first arc do not have to
1055 :     coincide. This entails the following user-visible change:
1056 :    
1057 :     You have to write $smlnj/foo/bar instead of smlnj/foo/bar. In
1058 :     particular, when you fire up sml with a command-line argument, say,
1059 :     e.g.:
1060 :    
1061 :     sml '$smlnj/cmb.cm'
1062 :    
1063 :     At the ML toplevel prompt:
1064 :    
1065 :     CM.autoload "$smlnj/cmb.cm";
1066 :    
1067 :     There is also a new controller in CM.Control that can be used to turn
1068 :     off all remaining support for implicit anchors by saying:
1069 :    
1070 :     CM.autoload "$smlnj/
1071 :     #set CM.Control.implicit_anchors false;
1072 :    
1073 :     This causes CM to reject implicitly anchored paths. This is (for the
1074 :     time being) less permissive than the "final" version where there will
1075 :     be no more such implicit anchors and relative paths will be just that:
1076 :     relative.
1077 :    
1078 :     The next step (version after next version?) will be to make the
1079 :     default for CM.Control.implicit_anchors false. After the dust has
1080 :     settled, I can then produce the "final" version of this...
1081 :    
1082 :     Note: Since bootstrapping is a bit tricky, I provided new boot files.
1083 :    
1084 :     ----------------------------------------------------------------------
1085 :     Name: Matthias Blume
1086 : blume 642 Date: 2000/05/11 16:30:00 JST
1087 :     Tag: blume-20000511-sources
1088 :     Description:
1089 :    
1090 :     The main change is that I added function CM.sources as a generalized
1091 :     version of the earlier CM.makedepend. This entails the following
1092 :     additional changes:
1093 :    
1094 :     - CM.makedepend has been dropped.
1095 :    
1096 :     - CM manual has been updated.
1097 :    
1098 :     - TOOLS signature and API have been changed.
1099 :    
1100 :     ----------------------------------------------------------------------
1101 : leunga 640 Name: Allen Leung
1102 : leunga 641 Date: 2000/05/10 21:17 EDT
1103 :     Tag: leunga-20000510-moby-c--ssa
1104 :     Description:
1105 :    
1106 :     Various bug fixes and new features for C--, Moby and MLRISC optimizations.
1107 :     None of these affect SML/NJ.
1108 :    
1109 :     1. Register Allocation
1110 :    
1111 :     a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented.
1112 :     This module tries to remove local (i.e. basic block level) redundancies
1113 :     during spilling.
1114 :    
1115 :     b. A new framework for performing region based register allocation.
1116 :     Not yet entirely functional.
1117 :    
1118 :     2. X86
1119 :    
1120 :     a. DefUse for POP was missing the stack pointer [found by Lal]
1121 :     b. Reload for CALL was incorrect in X86Spill [found by John]
1122 :     c. Various fixes in X86Spill so that it can be used correctly for
1123 :     the new spilling module.
1124 :    
1125 :     3. SSA/IR
1126 :    
1127 :     a. New module ir/dj-dataflow.sml implements elimination based
1128 :     data flow analysis.
1129 :    
1130 :     4. MLRiscGen
1131 :    
1132 :     a. Fix for gc type annotation
1133 :    
1134 :     5. MDGen
1135 :    
1136 :     Various fixes for machine description -> ml code translation. For ssa
1137 :     only.
1138 :    
1139 :     ----------------------------------------------------------------------
1140 :     Name: Allen Leung
1141 : leunga 640 Date: 2000/05/08 22:17 EDT
1142 :     Tag: leunga-20000508-labexp
1143 :     Description:
1144 :    
1145 :     Fermin has found a few assembly problems with constant expressions
1146 :     generated in LabelExp. Mostly, the problems involve extra parentheses,
1147 :     which choke on dumb assemblers. This is his fix.
1148 :    
1149 :     ----------------------------------------------------------------------
1150 : dbm 635 Name: Dave MacQueen
1151 :     Date: 2000/04/09 14:00 EDT
1152 :     Tag: dbm-20000502-Version_110_28
1153 :     Description:
1154 :    
1155 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.28
1156 :    
1157 :     2. Updated config/version to 110.28
1158 :    
1159 :     3. Updated config/srcarchiveurl
1160 :    
1161 :     3. New boot files!
1162 :     ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/
1163 :    
1164 :     ----------------------------------------------------------------------
1165 : blume 634 Name: Matthias Blume
1166 :     Date: 2000/05/01 19:05:00 JST
1167 :     Tag: blume-20000501-noweb
1168 :     Description:
1169 :    
1170 :     A new noweb tool has been added. The existing system is entirely
1171 :     unaffected by this, but some CM users have asked for renewed noweb
1172 :     support. Everything is documented in the CM manual.
1173 :    
1174 :     New (plugin) libraries:
1175 :    
1176 :     noweb-tool.cm
1177 :     nw-ext.cm
1178 :    
1179 :     ----------------------------------------------------------------------
1180 : dbm 633 Name: Dave MacQueen
1181 :     Date: 2000/04/30 12:40PM EDT
1182 :     Tag: dbm-20000430-bug_fixes
1183 :     Description:
1184 :    
1185 :     1. Fix for bug 1498
1186 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sig
1187 :     smlnj/src/system/Basis/Implementation/Unsafe/object.sml
1188 :     added toRealArray function
1189 :     smlnj/src/compiler/MiscUtil/print/ppobj.sml
1190 :     added check for tag Obj.RealArray to array printing case in ppObj
1191 :    
1192 :     2. Fix for bug 1510
1193 :     smlnj/src/compiler/Semant/types/typesutil.sml
1194 :     fixed definition of dummyargs (used by equalTycon) so that
1195 :     dummy args are distinct types
1196 :    
1197 :     ----------------------------------------------------------------------
1198 : blume 629 Name: Matthias Blume
1199 : blume 632 Date: 2000/04/30 01:00:00 JST
1200 :     Tag: blume-20000430-versions
1201 :     Description:
1202 :    
1203 :     1. CM version numbering added. This is an implementation of Lal's
1204 :     proposal for adding version numbers and version checking to .cm
1205 :     files. Lal said that his proposal was just that -- a proposal.
1206 :     For the time being I went ahead and implemented it so that people
1207 :     can comment on it. Everything is completely backward-compatible
1208 :     (except for the stable library format, i.e., new bootfiles!).
1209 :    
1210 :     As usual, see the CM manual for details.
1211 :    
1212 :     2. An alternative syntax for anchored paths has been implemented.
1213 :     Dave has recently voiced the same concerns that I had when I did
1214 :     this, so there should be some support. My take is that eventually
1215 :     I will let support for the current syntax (where anchors are
1216 :     "implicit") fade out in favor of the new, explicit syntax.
1217 :     In order to be backward-compatible, both old and new syntax are
1218 :     currently supported.
1219 :    
1220 :     Again, see the CM manual for details.
1221 :    
1222 :     3. Parallel make is trying to be slightly smarter: When the master
1223 :     process finds a "bottleneck", i.e., when there is only one
1224 :     compilation unit that can be compiled and everybody else is
1225 :     waiting on it, then it will simply compile it directly instead
1226 :     of clumsily telling one of the slaves to do it.
1227 :    
1228 :     4. Support for "unsharing" added. This is necessary in order to be
1229 :     able to have two different versions of the same library running
1230 :     at the same time (e.g., for trying out a new MLRISC while still
1231 :     having the old MLRISC linked into the current compiler, etc.)
1232 :     See the CM manual.
1233 :    
1234 :     5. Simple "makedepend" functionality added for generating Makefile
1235 :     dependency information. (This is rather crude at the moment.
1236 :     Expect some changes here in the future.)
1237 :    
1238 :     6. ".fun" added as a recognized suffix for ML files. Also documented
1239 :     explicitly in the manual that the fallback behavior (unknown suffix
1240 :     -> ML file) is not an official feature!
1241 :    
1242 :     7. Small changes to the pickler for stable libraries.
1243 :    
1244 :     8. Several internal changes to CM (for cleanup/improvement).
1245 :    
1246 :    
1247 :     !!!! NEW BINFILES !!!!
1248 :    
1249 :     ----------------------------------------------------------------------
1250 :     Name: Matthias Blume
1251 : blume 631 Date: 2000/04/28 17:30:00 JST
1252 :     Tag: blume-20000428-pathconfig
1253 :     Description:
1254 :    
1255 :     1. I changed config/install.sh to remove duplicate entries from the
1256 :     lib/pathconfig file at the end. Moreover, the final version of
1257 :     lib/pathconfig is sorted alphabetically. The same (sorting) is done
1258 :     in src/system/installml.
1259 :    
1260 :     2. The config/install.sh script now consistently uses relative
1261 :     pathnames in lib/pathconfig whenever the anchor is in the lib
1262 :     directory. (So far this was true for the libraries that come
1263 :     pre-compiled and bundled as part of the bootfiles but not for
1264 :     libraries that are compiled by the script itself.)
1265 :    
1266 :     ----------------------------------------------------------------------
1267 :     Name: Matthias Blume
1268 : blume 629 Date: 2000/04/26 13:10:00 JST
1269 :     Tag: blume-20000426-fun_suffix
1270 :     Description:
1271 :    
1272 :     Added ".fun" as a recognized file name suffix (for ML code).
1273 :    
1274 :     ----------------------------------------------------------------------
1275 : leunga 628 Name: Allen Leung
1276 :     Date: 2000/04/25 17:00:00 EST
1277 :     Tag: leunga-20000425-alpha-ra
1278 :     Description:
1279 :    
1280 :     1. Alpha
1281 :    
1282 :     PSEUDOARITH was missing in AlphaRewrite. This causes an endless loop
1283 :     in C--.
1284 :    
1285 :     2. RA
1286 :    
1287 :     Added a flag "ra-dump-size" to print out the size of the flowgraph
1288 :     and the interference graph.
1289 :    
1290 :     ----------------------------------------------------------------------
1291 : dbm 627 Name: Dave MacQueen
1292 :     Date: 2000/04/25/
1293 :     Tag: dbm-20000425-mlyacc_doc_examples
1294 :     Description:
1295 :     Updated mlyacc.tex sections 5 and 7 for SML '97 and CM.
1296 :     Updated all three examples in src/ml-yacc/examples to run
1297 :     under 110.* using CM.make.
1298 :    
1299 :     ----------------------------------------------------------------------
1300 : leunga 624 Name: Allen Leung
1301 :     Date: 2000/04/20 23:04:00 EST
1302 :     Tag: leunga-20000420-ssa-c---stuff
1303 :     Description:
1304 :    
1305 :     This update synchronizes my repository with Yale's. Most of these
1306 :     changes, however, do not affect SML/NJ at all (the RA is an exception).
1307 :    
1308 :     1. Register Allocator
1309 :    
1310 :     a. An improvement in the interference graph construction:
1311 :     Given a copy
1312 :    
1313 :     s <- t
1314 :    
1315 : leunga 628 no interference edge between s and t is added for this definition of s.
1316 : leunga 624
1317 :     b. I've added two new spill heuristic modules that Fermin and I developed
1318 :     (in the new library RA.cm). These are unused in SML/NJ but maybe
1319 :     useful for others (Moby?)
1320 :    
1321 :     2. X86
1322 :    
1323 :     a. Various fixes in the backend provided by Fermin [C--] and Lal.
1324 :    
1325 :     3. Alpha
1326 :    
1327 :     a. Added the BSR instruction and code generation that goes with it [C--]
1328 :     b. Other fixes too numerous to recount provided by Fermin [C--]
1329 :    
1330 :     4. Regmaps
1331 :    
1332 :     a. The regmaps are not initialized with the identity physical bindings
1333 :     at creation time. This is unneeded.
1334 :    
1335 :     5. MLRISC Optimizations
1336 :    
1337 :     a. The DJ-Graph module can now compute the iterated dominance frontiers
1338 :     intersects with liveness incrementally in linear time! Woohoo!
1339 :     This is now used in my new SSA construction algorithm.
1340 :    
1341 :     b. THe branch reorganization module is now smarter about linear chains of
1342 :     basic blocks.
1343 :    
1344 :    
1345 :     ----------------------------------------------------------------------
1346 : blume 615 Name: Matthias Blume
1347 :     Date: 2000/04/12 13:52:00 JST
1348 :     Tag: blume_main_v110p27_1
1349 :     Description:
1350 :    
1351 :     Changed install.sh script to handle archive files without version number
1352 :     and to use "boot.<arch>-<os>" instead of "sml.boot.<arch>-<os>" for the
1353 :     name of the boot file archive.
1354 :    
1355 :     ----------------------------------------------------------------------
1356 : dbm 607 Name: Dave MacQueen
1357 :     Date: 2000/04/09 14:00 EDT
1358 :     Tag: dbm-20000410-Version_110_27
1359 :     Description:
1360 :    
1361 :     1. Updated src/compiler/TopLevel/main/version.sml to version 110.27
1362 :    
1363 :     2. Updated src/config/version to 110.27
1364 :    
1365 :     3. New boot files!
1366 :    
1367 :     ----------------------------------------------------------------------
1368 : leunga 606 Name: Allen Leung
1369 :     Date: 2000/04/09 19:09:00 EST
1370 :     Tag: leunga-20000409-misc
1371 :     Description:
1372 :    
1373 :     1. Yet another fix for x86 assembly for idivl, imull, mull and friends.
1374 :    
1375 :     2. Miscellaneous improvements to MLRISC (unused in sml/nj)
1376 :    
1377 :     ----------------------------------------------------------------------
1378 : monnier 605 Name: Stefan
1379 :     Date: 2000/04/07 10:00:00 EDT
1380 :     Tag: monnier-20000406-branch-handling
1381 :     Description:
1382 :    
1383 :     Improved handling of branches (mostly those generated from
1384 :     polymorphic equality), removed switchoff and changed the
1385 :     default optimization settings (more cpsopt and less flintopt).
1386 :    
1387 :     ----------------------------------------------------------------------
1388 : leunga 601 Name: Allen Leung
1389 : leunga 602 Date: 2000/04/06 01:30:00 EST
1390 :     Tag: leunga-20000406-peephole-x86-SSA-2
1391 :     Description:
1392 :    
1393 :     Forgot a few files.
1394 :    
1395 :     ----------------------------------------------------------------------
1396 :     Name: Allen Leung
1397 : leunga 601 Date: 2000/04/06 00:36:00 EST
1398 :     Tag: leunga-20000406-peephole-x86-SSA
1399 :     Description:
1400 :    
1401 :     1. New Peephole code
1402 :    
1403 :     2. Minor improvement to X86 instruction selection
1404 :    
1405 :     3. Various fixes to SSA and machine description -> code translator
1406 :    
1407 :     ----------------------------------------------------------------------
1408 : blume 595 Name: Matthias Blume
1409 :     Date: 2000/04/05 12:30:00 JST
1410 :     Tag: blume_main_v110p26p2_3
1411 :     Description:
1412 :    
1413 :     This update just merges three minor cosmetic updates to CM's sources
1414 :     to get ready for the 110.27 code freeze on Friday. No functionality
1415 :     has changed.
1416 :    
1417 :     ----------------------------------------------------------------------
1418 : leunga 593 Name: Allen Leung
1419 : leunga 594 Date: 2000/04/04 19:39:00 EST
1420 :     Tag: leunga-20000404-x86-asm
1421 :     Description:
1422 :    
1423 :     1. Fixed a problem in X86 assembly.
1424 :    
1425 :     Things like
1426 :    
1427 :     jmp %eax
1428 :     jmp (%eax)
1429 :    
1430 :     should be output as
1431 :    
1432 :     jmp *%eax
1433 :     jmp *(%eax)
1434 :    
1435 :     2. Assembly output
1436 :    
1437 :     Added a new flag
1438 :    
1439 :     "asm-indent-copies" (default to false)
1440 :    
1441 :     When this flag is on, parallel copies will be indented an extra level.
1442 :    
1443 :     ----------------------------------------------------------------------
1444 :     Name: Allen Leung
1445 : leunga 593 Date: 2000/04/04 03:18:00 EST
1446 :     Tag: leunga-20000404-C--Moby
1447 :     Description:
1448 :    
1449 :     All of these fixes are related to C--, Moby, and my own optimization
1450 :     stuff; so they shouldn't affect SML/NJ.
1451 :    
1452 :     1. X86
1453 :    
1454 :     Various fixes related floating point, and extensions.
1455 :    
1456 :     2. Alpha
1457 :    
1458 :     Some extra patterns related to loads with signed/zero extension
1459 :     provided by Fermin.
1460 :    
1461 :     3. Assembly
1462 :    
1463 : monnier 659 When generating assembly, resolve the value of client defined constants,
1464 : leunga 593 instead of generating symbolic values. This is controlled by the
1465 :     new flag "asm-resolve-constants", which is default to true.
1466 :    
1467 :     4. Machine Descriptions
1468 :    
1469 :     a. The precedence parser was slightly broken when parsing infixr symbols.
1470 :     b. The type generalizing code had the bound variables reversed, resulting
1471 :     in a problem during arity raising.
1472 :     c. Various fixes in machine descriptions.
1473 :    
1474 :     ----------------------------------------------------------------------
1475 : blume 592 Name: Matthias Blume
1476 :     Date: 2000/04/03 16:05:00 JST
1477 :     Tag: blume_main_v110p26p2_2
1478 :     Description:
1479 :    
1480 :     I eliminated coreEnv from compInfo. Access to the "Core" structure is
1481 :     now done via the ordinary static environment that is context to each
1482 :     compilation unit.
1483 :    
1484 :     To this end, I arranged that instead of "structure Core" as "structure
1485 :     _Core" is bound in the pervasive environment. Core access is done via
1486 : monnier 659 _Core (which can never be accidentally rebound because _Core is not a
1487 : blume 592 legal surface-syntax symbol).
1488 :    
1489 :     The current solution is much cleaner because the core environment is
1490 :     now simply part of the pervasive environment which is part of every
1491 :     compilation unit's context anyway. In particular, this eliminates all
1492 :     special-case handling that was necessary until now in order to deal
1493 :     with dynamic and symbolic parts of the core environment.
1494 :    
1495 :     Remaining hackery (to bind the "magic" symbol _Core) is localized in the
1496 : monnier 659 compilation manager's bootstrap compiler (actually: in the "init group"
1497 : blume 592 handling). See the comments in src/system/smlnj/init/init.cmi for
1498 :     more details.
1499 :    
1500 :     I also tried to track down all mentions of "Core" (as string argument
1501 :     to Symbol.strSymbol) in the compiler and replaced them with a
1502 :     reference to the new CoreSym.coreSym. Seems cleaner since the actual
1503 :     name appears in one place only.
1504 :    
1505 :     Binfile and bootfile format have not changed, but the switchover from
1506 :     the old "init.cmi" to the new one is a bit tricky, so I supplied new
1507 :     bootfiles anyway.
1508 :    
1509 :     ----------------------------------------------------------------------
1510 : leunga 591 Name: Allen Leung
1511 :     Date: 2000/04/02 21:17:00 EST
1512 :     Tag: leunga-20000402-mltree
1513 :     Description:
1514 : leunga 585
1515 : leunga 591 1. Renamed the constructor CALL in MLTREE by popular demand.
1516 :     2. Added a bunch of files from my repository. These are currently
1517 :     used by other non-SMLNJ backends.
1518 :    
1519 : leunga 576 ----------------------------------------------------------------------
1520 : leunga 590 Name: Allen Leung
1521 :     Date: 2000/03/31 21:15:00 EST
1522 :     Tag: leunga-20000331-aliasing
1523 :     Description:
1524 :    
1525 :     This update contains a rewritten (and hopefully more correct) module
1526 :     for extracting aliasing information from CPS.
1527 :    
1528 :     To turn on this feature:
1529 :    
1530 :     Compiler.Control.CG.memDisambiguate := true
1531 :    
1532 :     To pretty print the region information with assembly
1533 :    
1534 :     Compiler.Control.MLRISC.getFlag "asm-show-region" := true;
1535 :    
1536 :     To control how many levels of aliasing information are printed, use:
1537 :    
1538 :     Compiler.Control.MLRISC.getInt "points-to-show-level" := n
1539 :    
1540 :     The default of n is 3.
1541 :    
1542 :     ----------------------------------------------------------------------
1543 : dbm 589 Name: David MacQueen
1544 :     Date: 2000/03/31 11:15:00 EST
1545 :     Tag: dbm-20000331-runtime_fix
1546 :     Description:
1547 :    
1548 :     This update contains:
1549 :    
1550 :     1. runtime/c-lib/c-libraries.c
1551 :     includes added in revision 1.2 caused compilation errors on hppa-hpux
1552 :    
1553 :     2. fix for bug 1556
1554 :     system/Basis/Implementation/NJ/internal-signals.sml
1555 :    
1556 :     ----------------------------------------------------------------------
1557 : blume 587 Name: Matthias Blume
1558 : blume 588 Date: 2000/03/31 18:00:00 JST
1559 :     Tag: blume_main_v110p26p2_1
1560 :     Description:
1561 :    
1562 :     This update contains:
1563 :    
1564 :     1. A small change to CM's handling of stable libraries:
1565 :     CM now maintains one "global" modmap that is used for all stable
1566 :     libraries. The use of such a global modmap maximizes sharing and
1567 :     minimizes the need for re-traversing parts of environments during
1568 :     modmap construction. (However, this has minor impact since modmap
1569 :     construction seems to account for just one percent or less of total
1570 :     compile time.)
1571 :    
1572 :     2. I added a "genmap" phase to the statistics. This is where I got the
1573 :     "one percent" number (see above).
1574 :    
1575 :     3. CM's new tool parameter mechanism just became _even_ better. :)
1576 :     - The parser understands named parameters and recursive options.
1577 :     - The "make" and "shell" tools use these new features.
1578 :     (This makes it a lot easier to cascade these tools.)
1579 :     - There is a small syntax change: named parameters use a
1580 :    
1581 :     <name> : ( <option> ... ) or
1582 :     <name> : <string>
1583 :    
1584 :     syntax. Previously, named parameters were implemented in an
1585 :     ad-hoc fashion by each tool individually (by parsing strings)
1586 :     and had the form
1587 :    
1588 :     <name>=<string>
1589 :    
1590 :     See the CM manual for a full description of these issues.
1591 :    
1592 :     ----------------------------------------------------------------------
1593 :     Name: Matthias Blume
1594 : blume 587 Date: 2000/03/30 18:00:00 JST
1595 :     Tag: blume_main_v110p26p2_0
1596 :     Description:
1597 :    
1598 :     !!!!! WARNING !!!!!!
1599 :     !! New binfiles !!
1600 :     !!!!!!!!!!!!!!!!!!!!
1601 :    
1602 :     This update contains:
1603 :    
1604 :     1. Moderate changes to CM:
1605 :    
1606 :     - Changes to CM's tools mechanism. In particular, it is now possible
1607 :     to have tools that accept additional "command line" parameters
1608 :     (specified in the .cm file at each instance where the tool's class is
1609 :     used).
1610 :    
1611 : monnier 659 This was done to accommodate the new "make" and "shell" tools which
1612 :     facilitate fairly seamless hookup to portions of code managed using
1613 : blume 587 Makefiles or Shell scripts.
1614 :    
1615 :     There are no classes "shared" or "private" anymore. Instead, the
1616 :     sharing annotation is now a parameter to the "sml" class.
1617 :    
1618 :     There is a bit of generic machinery for implementing one's own
1619 :     tools that accept command-line parameters. However, I am not yet fully
1620 :     satisfied with that part, so expect changes here in the future.
1621 :    
1622 :     All existing tools are described in the CM manual.
1623 :    
1624 : monnier 659 - Slightly better error handling. (CM now suppresses many followup
1625 : blume 587 error messages that tended to be more annoying than helpful.)
1626 :    
1627 :     2. Major changes to the compiler's static environment data structures.
1628 :    
1629 :     - no CMStaticEnv anymore.
1630 :     - no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment,
1631 :     but it is called Environment), no conversions between different
1632 :     kinds of static environments
1633 :    
1634 :     - There is still a notion of a "modmap", but such modmaps are generated
1635 :     on demand at the time when they are needed. This sounds slow, but I
1636 :     sped up the code that generates modmaps enough for this not to lead to
1637 :     a slowdown of the compiler (at least I didn't detect any).
1638 :    
1639 :     - To facilitate rapid modmap generation, static environments now
1640 :     contain an (optional) "modtree" structure. Modtree annotations are
1641 :     constructed by the unpickler during unpickling. (This means that
1642 :     the elaborator does not have to worry about modtrees at all.)
1643 :     Modtrees have the advantage that they are compositional in the same
1644 :     way as the environment data structure itself is compositional.
1645 :     As a result, modtrees never hang on to parts of an environment that
1646 :     has already been rendered "stale" by filtering or rebinding.
1647 :    
1648 :     - I went through many, many trials and errors before arriving at the
1649 :     current solution. (The initial idea of "linkpaths" did not work.)
1650 :     But the result of all this is that I have touched a lot of files that
1651 :     depend on the "modules" and "types" data structures (most of the
1652 :     elaborator). There were a lot of changes during my "linkpath" trials
1653 :     that could have been reverted to their original state but weren't.
1654 :     Please, don't be too harsh on me for messing with this code a bit more
1655 :     than what was strictly necessary... (I _did_ resist the tempation
1656 :     of doing any "global reformatting" to avoid an untimely death at
1657 :     Dave's hands. :)
1658 :    
1659 :     - One positive aspect of the previous point: At least I made sure that
1660 :     all files that I touched now compile without warnings (other than
1661 :     "polyEqual").
1662 :    
1663 :     - compiler now tends to run "leaner" (i.e., ties up less memory in
1664 :     redundant modmaps)
1665 :    
1666 :     ----------------------------------------------------------------------
1667 : leunga 580 Name: Allen Leung
1668 : leunga 585 Date: 2000/03/29 18:00:00
1669 :     Tag: leunga-20000327-mlriscGen_hppa_alpha_x86
1670 : leunga 586 Boot files (optional): ftp://react-ilp.cs.nyu.edu/leunga/110.26.1-sml.boot.x86-unix-20000330.tar.gz
1671 : leunga 585 Description:
1672 :    
1673 :     This update contains *MAJOR* changes to the way code is generated from CPS
1674 :     in the module mlriscGen, and in various backend modules.
1675 :    
1676 :     CHANGES
1677 :     =======
1678 :    
1679 :     1. MLRiscGen: forward propagation fix.
1680 :    
1681 :     There was a bug in forward propagation introduced at about the same time
1682 :     as the MLRISC x86 backend, which prohibits coalescing to be
1683 :     performed effectively in loops.
1684 :    
1685 :     Effect: speed up of loops in RISC architectures.
1686 :     By itself, this actually slowed down certain benchmarks on the x86.
1687 :    
1688 :     2. MLRiscGen: forward propagating addresses from consing.
1689 :    
1690 :     I've changed the way consing code is generated. Basically I separated
1691 :     out the initialization part:
1692 :    
1693 :     store tag, offset(allocptr)
1694 :     store elem1, offset+4(allocptr)
1695 :     store elem2, offset+8(allocptr)
1696 :     ...
1697 :     store elemn, offset+4n(allocptr)
1698 :    
1699 :     and the address computation part:
1700 :    
1701 :     celladdr <- offset+4+alloctpr
1702 :    
1703 :     and move the address computation part
1704 :    
1705 :     Effect: register pressure is generally lower as a result. This
1706 :     makes compilation of certain expressions much faster, such as
1707 :     long lists with non-trivial elements.
1708 :    
1709 :     [(0,0), (0,0), .... (0,0)]
1710 :    
1711 :     3. MLRiscGen: base pointer elimination.
1712 :    
1713 :     As part of the linkage mechanism, we generate the sequence:
1714 :    
1715 :     L: ... <- start of the code fragment
1716 :    
1717 :     L1:
1718 :     base pointer <- linkreg - L1 + L
1719 :    
1720 :     The base pointer was then used for computing relocatable addresses
1721 :     in the code fragment. Frequently (such as in lots of continuations)
1722 :     this is not needed. We now eliminate this sequence whenever possible.
1723 :    
1724 :     For compile time efficiency, I'm using a very stupid local heuristic.
1725 :     But in general, this should be done as a control flow analysis.
1726 :    
1727 :     Effect: Smaller code size. Speed up of most programs.
1728 :    
1729 :     4. Hppa back end
1730 :    
1731 :     Long jumps in span dependence resolution used to depend on the existence
1732 :     of the base pointer.
1733 :    
1734 :     A jump to a long label L was expanded into the following sequence:
1735 :    
1736 :     LDIL %hi(L-8192), %r29
1737 :     LDO %lo(L-8192)(%r29), %r29
1738 :     ADD %r29, baseptr, %r29
1739 :     BV,n %r0(%r29)
1740 :    
1741 :     In the presence of change (3) above, this will not work. I've changed
1742 :     it so that the following sequence of instructions are generated, which
1743 :     doesn't mention the base pointer at all:
1744 :    
1745 :     BL,n L', %r29 /* branch and link, L' + 4 -> %r29 */
1746 :     L': ADDIL L-(L'+4), %r29 /* Compute address of L */
1747 :     BV,n %r0(%r29) /* Jump */
1748 :    
1749 :     5. Alpha back end
1750 :    
1751 :     New alpha instructions LDB/LDW have been added, as per Fermin's
1752 :     suggestions. This is unrelated to all other changes.
1753 :    
1754 :     6. X86 back end
1755 :    
1756 :     I've changed andl to testl in the floating point test sequence
1757 :     whenever appropriate. The Intel optimization guide states that
1758 : monnier 659 testl is preferable to andl.
1759 : leunga 585
1760 :     7. RA (x86 only)
1761 :    
1762 :     I've improved the spill propagation algorithm, using an approximation
1763 :     of maximal weighted independent sets. This seems to be necessary to
1764 :     alleviate the negative effect in light of the slow down in (1).
1765 :    
1766 :     I'll write down the algorithm one of these days.
1767 :    
1768 :     8. MLRiscGen: frequencies
1769 :    
1770 :     I've added an annotation that states that all call gc blocks have zero
1771 :     execution frequencies. This improves register allocation on the x86.
1772 :    
1773 :     BENCHMARKS
1774 :     ==========
1775 :    
1776 :     I've only perform the comparison on 110.25.
1777 :    
1778 :     The platforms are:
1779 :    
1780 :     HPPA A four processor HP machine (E9000) with 5G of memory.
1781 :     X86 A 300Hhz Pentium II with 128M of memory, and
1782 :     SPARC An Ultra sparc 2 with 512M of memory.
1783 :    
1784 :     I used the following parameters for the SML benchmarks:
1785 :    
1786 :     @SMLalloc
1787 :     HPPA 256k
1788 :     SPARC 512k
1789 :     X86 256k
1790 :    
1791 :     COMPILATION TIME
1792 :     ----------------
1793 :     Here are the numbers comparing the compilation times of the compilers.
1794 :     I've only compared 110.25 compiling the new sources versus
1795 :     a fixpoint version of the new compiler compiling the same.
1796 :    
1797 :     110.25 New
1798 :     Total Time in RA Spill+Reload Total Time In RA Spill+Reload
1799 :     HPPA 627s 116s 2684+3584 599s 95s 1003+1879
1800 :     SPARC 892s 173s 2891+3870 708s 116s 1004+1880
1801 :     X86 999s 315s 94006+130691 987s 296s 108877+141957
1802 :    
1803 :     110.25 New
1804 :     Code Size Code Size
1805 :     HPPA 8596736 8561421
1806 :     SPARC 8974299 8785143
1807 :     X86 9029180 8716783
1808 :    
1809 :     So in summary, things are at least as good as before. Dramatic
1810 :     reduction in compilation is obtained on the Sparc; I can't explain it,
1811 :     but it is reproducible. Perhaps someone should try to reproduce this
1812 :     on their own machines.
1813 :    
1814 :     SML BENCHMARKS
1815 :     --------------
1816 :    
1817 :     On the average, all benchmarks perform at least as well as before.
1818 :    
1819 :     HPPA Compilation Time Spill+Reload Run Time
1820 :     110.25 New 110.25 New 110.25 New
1821 :    
1822 :     barnesHut 3.158 3.015 4.75% 1+1 0+0 2.980 2.922 2.00%
1823 :     boyer 6.152 5.708 7.77% 0+0 0+0 0.218 0.213 2.34%
1824 :     count-graphs 1.168 1.120 4.32% 0+0 0+0 22.705 23.073 -1.60%
1825 :     fft 0.877 0.792 10.74% 1+3 1+3 0.602 0.587 2.56%
1826 :     knuthBendix 3.180 2.857 11.32% 0+0 0+0 0.675 0.662 2.02%
1827 :     lexgen 6.190 5.290 17.01% 0+0 0+0 0.913 0.788 15.86%
1828 :     life 0.803 0.703 14.22% 25+25 0+0 0.153 0.140 9.52%
1829 :     logic 2.048 2.007 2.08% 6+6 1+1 4.133 4.008 3.12%
1830 :     mandelbrot 0.077 0.080 -4.17% 0+0 0+0 0.765 0.712 7.49%
1831 :     mlyacc 22.932 20.937 9.53% 154+181 32+57 0.468 0.430 8.91%
1832 :     nucleic 5.183 5.060 2.44% 2+2 0+0 0.125 0.120 4.17%
1833 :     ratio-regions 3.357 3.142 6.84% 0+0 0+0 116.225 113.173 2.70%
1834 :     ray 1.283 1.290 -0.52% 0+0 0+0 2.887 2.855 1.11%
1835 :     simple 6.307 6.032 4.56% 28+30 5+7 3.705 3.658 1.28%
1836 :     tsp 0.888 0.862 3.09% 0+0 0+0 7.040 6.893 2.13%
1837 :     vliw 24.378 23.455 3.94% 106+127 25+45 2.758 2.707 1.91%
1838 :     --------------------------------------------------------------------------
1839 :     Average 6.12% 4.09%
1840 :    
1841 :     SPARC Compilation Time Spill+Reload Run Time
1842 :     110.25 New 110.25 New 110.25 New
1843 :    
1844 :     barnesHut 3.778 3.592 5.20% 2+2 0+0 3.648 3.453 5.65%
1845 :     boyer 6.632 6.110 8.54% 0+0 0+0 0.258 0.242 6.90%
1846 :     count-graphs 1.435 1.325 8.30% 0+0 0+0 33.672 34.737 -3.07%
1847 :     fft 0.980 0.940 4.26% 3+9 2+6 0.838 0.827 1.41%
1848 :     knuthBendix 3.590 3.138 14.39% 0+0 0+0 0.962 0.967 -0.52%
1849 :     lexgen 6.593 6.072 8.59% 1+1 0+0 1.077 1.078 -0.15%
1850 :     life 0.972 0.868 11.90% 26+26 0+0 0.143 0.140 2.38%
1851 :     logic 2.525 2.387 5.80% 7+7 1+1 5.625 5.158 9.05%
1852 :     mandelbrot 0.090 0.093 -3.57% 0+0 0+0 0.855 0.728 17.39%
1853 :     mlyacc 26.732 23.827 12.19% 162+189 32+57 0.550 0.560 -1.79%
1854 :     nucleic 6.233 6.197 0.59% 3+3 0+0 0.163 0.173 -5.77%
1855 :     ratio-regions 3.780 3.507 7.79% 0+0 0+0 133.993 131.035 2.26%
1856 :     ray 1.595 1.550 2.90% 1+1 0+0 3.440 3.418 0.63%
1857 :     simple 6.972 6.487 7.48% 29+32 5+7 3.523 3.525 -0.05%
1858 :     tsp 1.115 1.063 4.86% 0+0 0+0 7.393 7.265 1.77%
1859 :     vliw 27.765 24.818 11.87% 110+135 25+45 2.265 2.135 6.09%
1860 :     ----------------------------------------------------------------------------
1861 :     Average 6.94% 2.64%
1862 :    
1863 :     X86 Compilation Time Spill+Reload Run Time
1864 :     110.25 New 110.25 New 110.25 New
1865 :    
1866 :     barnesHut 5.530 5.420 2.03% 593+893 597+915 3.532 3.440 2.66%
1867 :     boyer 8.768 7.747 13.19% 493+199 301+289 0.327 0.297 10.11%
1868 :     count-graphs 2.040 2.010 1.49% 298+394 315+457 26.578 28.660 -7.26%
1869 :     fft 1.327 1.302 1.92% 112+209 115+210 1.055 0.962 9.71%
1870 :     knuthBendix 5.218 5.475 -4.69% 451+598 510+650 0.928 0.932 -0.36%
1871 :     lexgen 9.970 9.623 3.60% 1014+841 1157+885 0.947 0.928 1.97%
1872 :     life 1.183 1.183 0.00% 162+182 145+148 0.127 0.103 22.58%
1873 :     logic 3.285 3.512 -6.45% 514+684 591+836 5.682 5.577 1.88%
1874 :     mandelbrot 0.147 0.143 2.33% 38+41 33+54 0.703 0.690 1.93%
1875 :     mlyacc 35.457 32.763 8.22% 3496+4564 3611+4860 0.552 0.550 0.30%
1876 :     nucleic 7.100 6.888 3.07% 239+168 201+158 0.175 0.173 0.96%
1877 :     ratio-regions 6.388 6.843 -6.65% 1182+257 981+300 120.142 120.345 -0.17%
1878 :     ray 2.332 2.338 -0.29% 346+398 402+494 3.593 3.540 1.51%
1879 :     simple 9.912 9.903 0.08% 1475+941 1579+1168 3.057 3.178 -3.83%
1880 :     tsp 1.623 1.532 5.98% 266+200 250+211 8.045 7.878 2.12%
1881 :     vliw 33.947 35.470 -4.29% 2629+2774 2877+3171 2.072 1.890 9.61%
1882 :     ----------------------------------------------------------------------------
1883 :     Average 1.22% 3.36%
1884 :    
1885 :     ----------------------------------------------------------------------
1886 :     Name: Allen Leung
1887 : leunga 583 Date: 2000/03/23 16:25:00
1888 :     Tag: leunga-20000323-fix_x86_alpha
1889 :     Description:
1890 :    
1891 :     1. X86 fixes/changes
1892 :    
1893 :     a. The old code generated for SETcc was completely wrong.
1894 :     The Intel optimization guide is VERY misleading.
1895 :    
1896 :     2. ALPHA fixes/changes
1897 :    
1898 :     a. Added the instructions LDBU, LDWU, STB, STW as per Fermin's suggestion.
1899 :     b. Added a new mode byteWordLoadStores to the functor parameter to Alpha()
1900 :     c. Added reassociation code for address computation.
1901 :    
1902 :     ----------------------------------------------------------------------
1903 :     Name: Allen Leung
1904 : leunga 580 Date: 2000/03/22 01:23:00
1905 :     Tag: leunga-20000322-fix_x86_hppa_ra
1906 :     Description:
1907 :    
1908 :     1. X86 fixes/changes
1909 :    
1910 :     a. x86Rewrite bug with MUL3 (found by Lal)
1911 :     b. Added the instructions FSTS, FSTL
1912 :    
1913 :     2. PA-RISC fixes/changes
1914 :    
1915 :     a. B label should not be a delay slot candidate! Why did this work?
1916 :     b. ADDT(32, REG(32, r), LI n) now generates one instruction instead of two,
1917 :     as it should be.
1918 :     c. The assembly syntax for fstds and fstdd was wrong.
1919 :     d. Added the composite instruction COMICLR/LDO, which is the immediate
1920 :     operand variant of COMCLR/LDO.
1921 :    
1922 :     3. Generic MLRISC
1923 :    
1924 :     a. shuffle.sml rewritten to be slightly more efficient
1925 :     b. DIV bug in mltree-simplify fixed (found by Fermin)
1926 :    
1927 :     4. Register Allocator
1928 :    
1929 :     a. I now release the interference graph earlier during spilling.
1930 :     May improve memory usage.
1931 :    
1932 :     ----------------------------------------------------------------------
1933 : blume 577 Name: Matthias Blume
1934 : blume 578 Date: 2000/03/14 14:15:32
1935 :     Tag: blume_main_v110p26p1_2
1936 :     Description:
1937 :    
1938 :     1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an
1939 :     additional argument called "template" which is an optional string that
1940 : monnier 659 specifies the layout of the tool command line. See the CM manual for
1941 : blume 578 explanation.
1942 :    
1943 : monnier 659 2. A special-purpose tool can be "registered" by simply dropping the
1944 : blume 578 corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same
1945 :     directory where the .cm file lives that uses this tool. (The
1946 :     behavior/misfeature until now was to look for the tool description
1947 :     files in the current working directory.) As before, tool description
1948 :     files could also be anchored -- in which case they can live anywhere
1949 :     they like. Following the recent e-mail discussion, this change should
1950 :     make it easier to have special-purpose tools that are shipped together
1951 :     with the sources of the program that uses them.
1952 :    
1953 :     ----------------------------------------------------------------------
1954 :     Name: Matthias Blume
1955 : blume 577 Date: 2000/03/10 07:48:34
1956 :     Tag: blume_main_v110p26p1_1
1957 :     Description:
1958 :    
1959 :     I added a re-written version of Dave's fixpt script to src/system.
1960 :     Changes relative to the original version:
1961 :     - sh-ified (not everybody has ksh)
1962 :     - automatically figures out which architecture it runs on
1963 :     - uses ./makeml a bit more cleverly
1964 :     - never invokes ./installml (and, thus, does not clobber your
1965 :     good and working installation of sml in case something goes wrong)
1966 :     - accepts max iteration count using option "-iter <n>"
1967 :     - accepts a "base" name using option "-base <base>"
1968 :    
1969 :     It does not build any extraneous heap images but directly rebuilds
1970 :     bin- and boot-hierarchies using makeml's "-rebuild" switch. Finally,
1971 :     it can incorporate existing bin- and boot- hierarchies. For example,
1972 :     suppose the base is set to "sml" (which is the default). Then it
1973 :     successively builds
1974 :    
1975 :     sml.bin.<arch>-unix and sml.boot.<arch>-unix
1976 :     then sml1.bin.<arch>-unix and sml1.boot.<arch>-unix
1977 :     then sml2.bin.<arch>-unix and sml2.boot.<arch>-unix
1978 :     ...
1979 :     then sml<n>.bin.<arch>-unix and sml<n>.boot.<arch>-unix
1980 :    
1981 :     and so on. If any of these already exist, it will just use what's
1982 :     there. In particular, many people will have the initial set of bin
1983 :     and boot files around, so this saves time for at least one full
1984 :     rebuild. Having sets of the form <base><k>.{bin,boot}.<arch>-unix for
1985 :     <k>=1,2,... is normally not a good idea when invoking fixpt. However,
1986 :     they might be the result of an earlier partial run of fixpt (which
1987 : monnier 659 perhaps got accidentally killed). In this case, fixpt will quickly
1988 : blume 577 move through what exists before continuing where it left off earlier,
1989 :     and, thus, saves a lot of time.
1990 :    
1991 :     ----------------------------------------------------------------------
1992 : leunga 576 Name: Allen Leung
1993 :     Date: 00/03/10 02:20:00
1994 :     Tag: leunga-20000310-fix_x86_asm_ra
1995 :     Description:
1996 : dbm 570
1997 : leunga 576 More assembly output problems involving the indexed addressing mode
1998 :     on the x86 have been found and corrected. Thanks to Fermin Reig for the
1999 :     fix.
2000 :    
2001 :     The interface and implementation of the register allocator have been changed
2002 :     slightly to accommodate the possibility to skip the register allocation
2003 :     phases completely and go directly to memory allocation. This is needed
2004 :     for C-- use.
2005 :    
2006 : dbm 570 ----------------------------------------------------------------------
2007 : blume 572 Name: Matthias Blume
2008 : blume 575 Date: 00/03/09 10:23:53
2009 :     Tag: blume_main_v110p26p1_0
2010 :     Description:
2011 :    
2012 :     * Complete re-organization of library names. Many libraries have been
2013 :     consolidated so that they share the same path anchor. For example,
2014 :     all MLRISC-related libraries are anchored at MLRISC, most libraries that
2015 :     are SML/NJ-specific are under "smlnj". Notice that names like
2016 :     host-cmb.cm or host-compiler.cm no longer exist. See system/README
2017 :     for a complete description of the new naming scheme. Quick reference:
2018 :    
2019 :     host-cmb.cm -> smlnj/cmb.cm
2020 :     host-compiler.cm -> smlnj/compiler.cm
2021 :     full-cm.cm -> smlnj/cm.cm
2022 :     <arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm
2023 :     <arch>-compiler.cm -> smlnj/compiler/<arch>.cm
2024 :    
2025 :     * Bug fixes in CM.
2026 :     - exceptions in user code are being passed through (i.e., reach top level)
2027 :     - more bugs in paranoia mode fixed
2028 :     - bug related to checking group owners fixed
2029 :    
2030 :     * New install.sh script that automagically fetches archive files:
2031 :     The new file config/srcarchiveurl must contain the URL of the
2032 :     (remote) directory that contains bin files (or other source archives).
2033 :     If install.sh does not find the archive locally, it tries to get
2034 :     it from that remote directory.
2035 :     This should simplify installation further: For machines that have
2036 :     access to the internet, just fetch <version>-config.tgz, unpack it,
2037 : monnier 659 edit config/targets, and go (run config/install.sh). The script will
2038 : blume 575 fetch everything else that it might need all by itself.
2039 :    
2040 :     For CVS users, this mechanism is not relevant for source archives, but
2041 :     it is convenient for getting new sets of binfiles.
2042 :    
2043 :     Archives should be tar files compressed with either gzip, compress, or
2044 :     bzip2. The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2.
2045 :    
2046 :     ----------------------------------------------------------------------
2047 :     Name: Matthias Blume
2048 : blume 572 Date: 2000/03/07 04:01:04
2049 :     Tag: blume_main_v110_26_2
2050 : dbm 570 Description:
2051 : blume 572 - size info in BOOTLIST
2052 :     * no fixed upper limits for number of bootfiles or length of
2053 :     bootfile names in runtime
2054 :     * falling back to old behavior if no BOOTLIST size info found
2055 :     - allocation size heuristics in .run-sml
2056 :     * tries to read cache size from /proc/cpuinfo (this is important for
2057 :     small-cache Celeron systems!)
2058 :     - install.sh robustified
2059 :     - CM manual updates
2060 :     - paranoid mode
2061 :     * no more CMB.deliver() (i.e., all done by CMB.make())
2062 :     * can re-use existing sml.boot.* files
2063 :     * init.cmi now treated as library
2064 :     * library stamps for consistency checks
2065 :     - sml.boot.<arch>-<os>/PIDMAP file
2066 :     * This file is read by the CM startup code. This is used to minimize
2067 :     the amount of dynamic state that needs to be stowed away for the
2068 :     purpose of sharing between interactive system and user code.
2069 :     - CM.Anchor.anchor instead of CM.Anchor.{set,cancel}
2070 :     * Upon request by Elsa. Anchors now controlled by get-set-pair
2071 :     like most other CM state variables.
2072 :     - Compiler.CMSA eliminated
2073 :     * No longer supported by CM anyway.
2074 :     - fixed bugs in pickler that kept biting Stefan
2075 :     * past refs to past refs (was caused by the possibility that
2076 :     ad-hoc sharing is more discriminating than hash-cons sharing)
2077 :     * integer overflow on LargeInt.minInt
2078 :     - ml-{lex,yacc} build scripts now use new mechanism
2079 :     for building standalone programs
2080 :     - fixed several gcc -Wall warnings that were caused by missing header
2081 :     files, missing initializations, etc., in runtime (not all warnings
2082 :     eliminated, though)

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