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