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

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