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

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