11 |
Date: yyyy/mm/dd |
Date: yyyy/mm/dd |
12 |
Tag: <post-commit CVS tag> |
Tag: <post-commit CVS tag> |
13 |
Description: |
Description: |
14 |
|
|
15 |
|
---------------------------------------------------------------------- |
16 |
|
Name: Matthias Blume |
17 |
|
Date: 2002/07/05 16:00 EDT |
18 |
|
Tag: Release_110_41 |
19 |
|
Description: |
20 |
|
|
21 |
|
New working release. New bootfiles. |
22 |
|
|
23 |
|
---------------------------------------------------------------------- |
24 |
|
Name: Matthias Blume |
25 |
|
Date: 2002/07/05 10:25:00 EDT |
26 |
|
Tag: blume-20020705-btimp |
27 |
|
Description: |
28 |
|
|
29 |
|
Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that |
30 |
|
other clients can set up backtracing support. |
31 |
|
|
32 |
|
---------------------------------------------------------------------- |
33 |
|
Name: Matthias Blume |
34 |
|
Date: 2002/06/25 17:23:00 EDT |
35 |
|
Tag: blume-20020625-fpmax |
36 |
|
Description: |
37 |
|
|
38 |
|
Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point |
39 |
|
case. (The sense of the isNaN test was reversed -- which made min and |
40 |
|
max always return their first argument.) |
41 |
|
|
42 |
|
---------------------------------------------------------------------- |
43 |
|
Name: Matthias Blume |
44 |
|
Date: 2002/06/11 |
45 |
|
Tag: blume-20020611-unixpath |
46 |
|
Description: |
47 |
|
|
48 |
|
Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch. |
49 |
|
|
50 |
|
---------------------------------------------------------------------- |
51 |
|
Name: Matthias Blume |
52 |
|
Date: 2002/06/10 16:35:00 EDT |
53 |
|
Tag: blume-20020610-ieeereal |
54 |
|
Description: |
55 |
|
|
56 |
|
I back-ported my implementation of IEEEReal.fromString from the |
57 |
|
idlbasis-devel branch so that we can test it. |
58 |
|
|
59 |
|
Another small change is that ppDec tries to give more information |
60 |
|
than just "<sig>" in the case of functors. However, this code is |
61 |
|
broken in some mysterious way if the functor's body's signature |
62 |
|
has not been declared by ascription but gets inferred from the |
63 |
|
implementation. This needs fixing... |
64 |
|
|
65 |
|
---------------------------------------------------------------------- |
66 |
|
Name: Matthias Blume |
67 |
|
Date: 2002/05/31 |
68 |
|
Tag: blume-20020531-btrace-mode |
69 |
|
Description: |
70 |
|
|
71 |
|
Resurrected SMLofNJ.Internals.BTrace.mode. (It accidentally fell by |
72 |
|
the wayside when I switched over to using Controls everywhere.) |
73 |
|
|
74 |
|
---------------------------------------------------------------------- |
75 |
|
Name: Lal George |
76 |
|
Date: 2002/05/23 12:21:40 EDT |
77 |
|
Tag: george-20020523-visual-labels |
78 |
|
Description: |
79 |
|
|
80 |
|
Labels are now displayed in the graphical output to make |
81 |
|
the fall-through and target blocks obvious. |
82 |
|
|
83 |
|
---------------------------------------------------------------------- |
84 |
|
Name: Matthias Blume |
85 |
|
Date: 2002/05/22 11:03:00 EDT |
86 |
|
Tag: blume-20020522-shrink |
87 |
|
Description: |
88 |
|
|
89 |
|
John tweaked yesterday's fix for 1131 to handle an out-of-memory |
90 |
|
situation that comes up when allocating huge arrays. |
91 |
|
|
92 |
|
---------------------------------------------------------------------- |
93 |
|
Name: Matthias Blume |
94 |
|
Date: 2002/05/21 16:00:00 EDT |
95 |
|
Tag: Release_110_40 |
96 |
|
Description: |
97 |
|
|
98 |
|
New working release (110.40). New bootfiles. |
99 |
|
|
100 |
|
[Also: John Reppy fixed GC bug 1131.] |
101 |
|
|
102 |
|
---------------------------------------------------------------------- |
103 |
|
Name: Matthias Blume |
104 |
|
Date: 2002/05/21 12:35:00 EDT |
105 |
|
Tag: blume-20020521-cmdoc |
106 |
|
Description: |
107 |
|
|
108 |
|
CM documentation update. |
109 |
|
|
110 |
|
---------------------------------------------------------------------- |
111 |
|
Name: Matthias Blume |
112 |
|
Date: 2002/05/21 10:55:00 EDT |
113 |
|
Tag: blume-20020521-misc |
114 |
|
Description: |
115 |
|
|
116 |
|
- John tweaked runtime to be silent on heap export (except when |
117 |
|
GC messages are on). |
118 |
|
- I added a few more things (cross-compiling versions of CMB) to |
119 |
|
config/preloads (as suggestions). |
120 |
|
|
121 |
|
---------------------------------------------------------------------- |
122 |
|
Name: Matthias Blume |
123 |
|
Date: 2002/05/20 22:25:00 EDT |
124 |
|
Tag: blume-20020520-controls |
125 |
|
Description: |
126 |
|
|
127 |
|
- Added ControlUtil structure to control-lib.cm. |
128 |
|
- Use it throughout. |
129 |
|
- Used Controls facility to define MLRISC controls (as opposed to |
130 |
|
registering MLRISC control ref cells with Controls after the fact) |
131 |
|
- Fixed messed-up controls priorities. |
132 |
|
|
133 |
|
* Removed again all the stuff from config/preloads that one wouldn't |
134 |
|
be able to preload at the time the initial heap image is built. |
135 |
|
(Many libraries, e.g., CML, do not exist yet at this time. The |
136 |
|
only libraries that can be preloaded via config/preloads are those |
137 |
|
that come bundled with the bootfiles.) |
138 |
|
|
139 |
|
---------------------------------------------------------------------- |
140 |
|
Name: Matthias Blume |
141 |
|
Date: 2002/05/20 10:59:00 EDT |
142 |
|
Tag: blume-20020520-preloads |
143 |
|
Description: |
144 |
|
|
145 |
|
Added a lot of commented-out suggestions for things to be included |
146 |
|
in config/preloads. |
147 |
|
|
148 |
|
---------------------------------------------------------------------- |
149 |
|
Name: Allen Leung |
150 |
|
Date: 2002/05/18 14:20:00 EDT |
151 |
|
Tag: leunga-20020518-mdl |
152 |
|
Description: |
153 |
|
|
154 |
|
o Made the mdl tool stuff compile and run again. |
155 |
|
o I've disabled all the stuff that depends on RTL specifications; they |
156 |
|
are all badly broken anyway. |
157 |
|
|
158 |
|
---------------------------------------------------------------------- |
159 |
|
Name: Matthias Blume |
160 |
|
Date: 2002/05/17 16:49:00 EDT |
161 |
|
Tag: blume-20020517-controls |
162 |
|
Description: |
163 |
|
|
164 |
|
0. John Reppy made several modifications to the SML/NJ library. |
165 |
|
In particular, there is a shiny new controls-lib.cm. |
166 |
|
|
167 |
|
1. Pushed new controls interface through compiler so that everything |
168 |
|
compiles again. |
169 |
|
|
170 |
|
2. Added FormatComb and FORMAT_COMB to the CML version of the |
171 |
|
SML/NJ library (so that CML compiles again). |
172 |
|
|
173 |
|
3. Modified init scripts because XXX_DEFAULT environment variables |
174 |
|
are no longer with us. (Boot-time initialization is now done |
175 |
|
using the same environment variables that are also used for |
176 |
|
startup-time initialization of controls.) |
177 |
|
|
178 |
|
---------------------------------------------------------------------- |
179 |
|
Name: Lal George |
180 |
|
Date: 2002/05/15 09:20:10 EDT |
181 |
|
Tag: george-20020515-pseudo-op-decls |
182 |
|
Description: |
183 |
|
|
184 |
|
All pseudo-ops emitted before the first segment declaration |
185 |
|
such as TEXT, DATA, and BSS directives are assumed to be global |
186 |
|
declarations and are emitted first in the assembly file. This is |
187 |
|
useful in a number of situations where one has pseudo-ops that are not |
188 |
|
specific to any segment, and also works around the constraint that one |
189 |
|
cannot have client pseudo-ops in the TEXT segment. |
190 |
|
|
191 |
|
Because no segment is associated with these declarations it is |
192 |
|
an error to allocate any space or objects before the first segment |
193 |
|
directive and an exception will be raised. However, we cannot make |
194 |
|
this check for client pseudo-ops. |
195 |
|
|
196 |
|
These top level declarations are a field in the CFG graph_info. |
197 |
|
In theory you can continue to add to this field after the CFG has been |
198 |
|
built -- provided you know what you are doing;-) |
199 |
|
|
200 |
|
---------------------------------------------------------------------- |
201 |
|
Name: Matthias Blume |
202 |
|
Date: 2002/05/13 16:40:00 EDT |
203 |
|
Tag: blume-20020513-pp-etc |
204 |
|
Description: |
205 |
|
|
206 |
|
A few minor bugfixes: |
207 |
|
|
208 |
|
- Stopgap measure for bug recently reported by Elsa Gunter (ppDec). |
209 |
|
(Bogus printouts for redefined bindings still occur. Compiler |
210 |
|
bug should no longer occur now. We need to redo the prettyprinter |
211 |
|
from scratch.) |
212 |
|
|
213 |
|
- CM pathname printer now also adds escape sequences for ( and ) |
214 |
|
|
215 |
|
- commend and docu fixes for ml-nlffi |
216 |
|
|
217 |
|
---------------------------------------------------------------------- |
218 |
|
Name: Matthias Blume |
219 |
|
Date: 2002/05/10 16:40:00 EDT |
220 |
|
Tag: blume-20020510-erg-textio |
221 |
|
Description: |
222 |
|
|
223 |
|
Applied the following bugfix provided by Emden Gansner: |
224 |
|
|
225 |
|
Output is corrupted when outputSubstr is used rather than output. |
226 |
|
|
227 |
|
The problem occurs when a substring |
228 |
|
|
229 |
|
ss = (s, dataStart, dataLen) |
230 |
|
|
231 |
|
where dataStart > 0, fills a stream buffer with avail bytes left. |
232 |
|
avail bytes of s, starting at index dataStart, are copied into the |
233 |
|
buffer, the buffer is flushed, and then the remaining dataLen-avail |
234 |
|
bytes of ss are copied into the beginning of the buffer. Instead of |
235 |
|
starting this copy at index dataStart+avail in s, the current code |
236 |
|
starts the copy at index avail. |
237 |
|
|
238 |
|
Fix: |
239 |
|
In text-io-fn.sml, change line 695 from |
240 |
|
val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0) |
241 |
|
to |
242 |
|
val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0) |
243 |
|
|
244 |
|
---------------------------------------------------------------------- |
245 |
|
Name: Matthias Blume |
246 |
|
Date: 2002/04/12 13:55:00 EDT |
247 |
|
Tag: blume-20020412-assyntax |
248 |
|
Description: |
249 |
|
|
250 |
|
1. Grabbed newer assyntax.h from the XFree86 project. |
251 |
|
2. Fiddled with how to compile X86.prim.asm without warnings. |
252 |
|
3. (Very) Minor cleanup in CM. |
253 |
|
|
254 |
|
---------------------------------------------------------------------- |
255 |
|
Name: Matthias Blume |
256 |
|
Date: 2002/04/01 (no joke!) 17:07:00 EST |
257 |
|
Tag: blume-20020401-x86div |
258 |
|
Description: |
259 |
|
|
260 |
|
Added full support for div/mod/rem/quot on the x86, using the machine |
261 |
|
instruction's two results (without clumsily recomputing the remainder) |
262 |
|
directly where appropriate. |
263 |
|
|
264 |
|
Some more extensive power-of-two support was added to the x86 instruction |
265 |
|
selector (avoiding expensive divs, mods, and muls where they can be |
266 |
|
replaced with cheaper shifts and masks). However, this sort of thing |
267 |
|
ought to be done earlier, e.g., within the CPS optimizer so that |
268 |
|
all architectures benefit from it. |
269 |
|
|
270 |
|
The compiler compiles to a fixed point, but changes might be somewhat |
271 |
|
fragile nevertheless. Please, report any strange things that you might |
272 |
|
see wrt. div/mod/quot/rem... |
273 |
|
|
274 |
|
---------------------------------------------------------------------- |
275 |
|
Name: Matthias Blume |
276 |
|
Date: 2002/03/29 17:22:00 |
277 |
|
Tag: blume-20020329-div |
278 |
|
Description: |
279 |
|
|
280 |
|
Fixed my broken div/mod logic. Unfortunately, this means that the |
281 |
|
inline code for div/mod now has one more comparison than before. |
282 |
|
Fast paths (quotient > 0 or remainder = 0) are not affected, though. |
283 |
|
The problem was with quotient = 0, because that alone does not tell |
284 |
|
us which way the rounding went. One then has to look at whether |
285 |
|
remainder and divisor have the same sign... :( |
286 |
|
|
287 |
|
Anyway, I replaced the bootfiles with fresh ones... |
288 |
|
|
289 |
|
---------------------------------------------------------------------- |
290 |
|
Name: Matthias Blume |
291 |
|
Date: 2002/03/29 14:10:00 EST |
292 |
|
Tag: blume-20020329-inlprims |
293 |
|
Description: |
294 |
|
|
295 |
|
NEW BOOTFILES!!! Version number bumped to 110.39.3. |
296 |
|
|
297 |
|
Primops have changed. This means that the bin/boot-file formats have |
298 |
|
changed as well. |
299 |
|
|
300 |
|
To make sure that there is no confusion, I made a new version. |
301 |
|
|
302 |
|
|
303 |
|
CHANGES: |
304 |
|
|
305 |
|
* removed REMT from mltree (remainder should never overflow). |
306 |
|
|
307 |
|
* added primops to deal with divisions of all flavors to the frontend |
308 |
|
|
309 |
|
* handled these primops all the way through so they map to their respective |
310 |
|
MLRISC support |
311 |
|
|
312 |
|
* used these primops in the implementation of Int, Int32, Word, Word32 |
313 |
|
|
314 |
|
* removed INLDIV, INLMOD, and INLREM as they are no longer necessary |
315 |
|
|
316 |
|
* parameterized INLMIN, INLMAX, and INLABS by a numkind |
317 |
|
|
318 |
|
* translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including |
319 |
|
floating point |
320 |
|
|
321 |
|
* used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32, |
322 |
|
and Real (but Real.abs maps to a separate floating-point-only primop) |
323 |
|
|
324 |
|
|
325 |
|
TODO items: |
326 |
|
|
327 |
|
* Hacked Alpha32 instruction selection, disabling the selection of REMx |
328 |
|
instructions because the machine instruction encoder cannot handle |
329 |
|
them. (Hppa, PPC, and Sparc instruction selection did not handle |
330 |
|
REM in the first place, and REM is supported by the x86 machine coder.) |
331 |
|
|
332 |
|
* Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction |
333 |
|
selection phase. (The two can be streamlined because the hardware |
334 |
|
delivers both quotient and remainder at the same time anyway.) |
335 |
|
|
336 |
|
* Think about what to do with "valOf(Int32.minInt) div ~1" and friends. |
337 |
|
(Currently the behavior is inconsistent both across architectures and |
338 |
|
wrt. the draft Basis spec.) |
339 |
|
|
340 |
|
* Word8 should eventually be handled natively, too. |
341 |
|
|
342 |
|
* There seems to be one serious bug in mltree-gen.sml. It appears, though, |
343 |
|
as if there currently is no execution path that could trigger it in |
344 |
|
SML/NJ. (The assumptions underlying functions arith and promotable do not |
345 |
|
hold for things like multiplication and division.) |
346 |
|
|
347 |
|
---------------------------------------------------------------------- |
348 |
|
Name: Matthias Blume |
349 |
|
Date: 2002/03/27 16:27:00 EST |
350 |
|
Tag: blume-20020327-mlrisc-divisions |
351 |
|
Description: |
352 |
|
|
353 |
|
Added support for all four division operations (ML's div, mod, quot, |
354 |
|
and rem) to MLRISC. In the course of doing so, I also rationalized |
355 |
|
the naming (no more annoying switch-around of DIV and QUOT), by |
356 |
|
parameterizing the operation by div_rounding_mode (which can be either |
357 |
|
DIV_TO_ZERO or DIV_TO_NEGINF). |
358 |
|
|
359 |
|
The generic MLTreeGen functor takes care of compiling all four |
360 |
|
operations down to only round-to-zero div. |
361 |
|
|
362 |
|
Missing pieces: |
363 |
|
|
364 |
|
* Doing something smarter than relying on MLTreeGen on architectures |
365 |
|
like, e.g., the x86 where hardware division delivers both quotient and |
366 |
|
remainder at the same time. With this, the implementation of the |
367 |
|
round-to-neginf operations could be further streamlined. |
368 |
|
|
369 |
|
* Remove inlining support for div/mod/rem from the frontend and replace it |
370 |
|
with primops that get carried through to the backend. Do this for all |
371 |
|
int and word types. |
372 |
|
|
373 |
|
---------------------------------------------------------------------- |
374 |
|
Name: Matthias Blume |
375 |
|
Date: 2002/03/25 17:25:00 EST |
376 |
|
Tag: blume-20020325-divmod |
377 |
|
Description: |
378 |
|
|
379 |
|
I improved (hopefully without breaking them) the implementation of Int.div, |
380 |
|
Int.mod, and Int.rem. For this, the code in translate.sml now takes |
381 |
|
advantage of the following observations: |
382 |
|
|
383 |
|
Let q = x quot y r = x rem y |
384 |
|
d = x div y m = x mod y |
385 |
|
|
386 |
|
where "quot" is the round-to-zero version of integer division that |
387 |
|
hardware usually provides. Then we have: |
388 |
|
|
389 |
|
r = x - q * y where neither the * nor the - will overflow |
390 |
|
d = if q >= 0 orelse x = q * y then q else q - 1 |
391 |
|
where neither the * nor the - will overflow |
392 |
|
m = if q >= 0 orelse r = 0 then r else r + y |
393 |
|
where the + will not overflow |
394 |
|
|
395 |
|
This results in substantial simplification of the generated code. |
396 |
|
The following table shows the number of CFG nodes and edges generated |
397 |
|
for |
398 |
|
fun f (x, y) = x OPER y |
399 |
|
(* with OPER \in div, mod, quot, rem *) |
400 |
|
|
401 |
|
|
402 |
|
OPER | nodes(old) | edges(old) | nodes(new) | edges(new) |
403 |
|
-------------------------------------------------------- |
404 |
|
div | 24 | 39 | 12 | 16 |
405 |
|
mod | 41 | 71 | 12 | 16 |
406 |
|
quot | 8 | 10 | 8 | 10 |
407 |
|
rem | 10 | 14 | 8 | 10 |
408 |
|
|
409 |
|
|
410 |
|
---------------------------------------------------------------------- |
411 |
|
Name: Matthias Blume |
412 |
|
Date: 2002/03/25 22:06:00 EST |
413 |
|
Tag: blume-20020325-cprotobug |
414 |
|
Description: |
415 |
|
|
416 |
|
Fixed a bug in cproto (c prototype decoder). |
417 |
|
|
418 |
|
---------------------------------------------------------------------- |
419 |
|
Name: Matthias Blume |
420 |
|
Date: 2002/03/25 16:00:00 EST |
421 |
|
Tag: blume-20020325-raw-primops |
422 |
|
Description: |
423 |
|
|
424 |
|
I did some cleanup to Allen's new primop code and |
425 |
|
replaced yesterday's bootfiles with new ones. |
426 |
|
(But they are stored in the same place.) |
427 |
|
|
428 |
|
---------------------------------------------------------------------- |
429 |
|
Name: Matthias Blume |
430 |
|
Date: 2002/03/24 22:40:00 EST |
431 |
|
Tag: blume-20020324-bootfiles |
432 |
|
Description: |
433 |
|
|
434 |
|
Made the bootfiles that Allen asked for. |
435 |
|
|
436 |
|
---------------------------------------------------------------------- |
437 |
|
Name: Allen Leung |
438 |
|
Date: 2002/03/23 15:50:00 EST |
439 |
|
Tag: leunga-20020323-flint-cps-rcc-primops |
440 |
|
Description: |
441 |
|
|
442 |
|
1. Changes to FLINT primops: |
443 |
|
|
444 |
|
(* make a call to a C-function; |
445 |
|
* The primop carries C function prototype information and specifies |
446 |
|
* which of its (ML-) arguments are floating point. C prototype |
447 |
|
* information is for use by the backend, ML information is for |
448 |
|
* use by the CPS converter. *) |
449 |
|
| RAW_CCALL of { c_proto: CTypes.c_proto, |
450 |
|
ml_args: ccall_type list, |
451 |
|
ml_res_opt: ccall_type option, |
452 |
|
reentrant : bool |
453 |
|
} option |
454 |
|
(* Allocate uninitialized storage on the heap. |
455 |
|
* The record is meant to hold short-lived C objects, i.e., they |
456 |
|
* are not ML pointers. With the tag, the representation is |
457 |
|
* the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8) |
458 |
|
*) |
459 |
|
| RAW_RECORD of {tag:bool,sz:int} |
460 |
|
and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR |
461 |
|
|
462 |
|
2. These CPS primops are now overloaded: |
463 |
|
|
464 |
|
rawload of {kind:numkind} |
465 |
|
rawstore of {kind:numkind} |
466 |
|
|
467 |
|
The one argument form is: |
468 |
|
|
469 |
|
rawload {kind} address |
470 |
|
|
471 |
|
The two argument form is: |
472 |
|
|
473 |
|
rawload {kind} [ml object, byte-offset] |
474 |
|
|
475 |
|
3. RAW_CCALL/RCC now takes two extra arguments: |
476 |
|
|
477 |
|
a. The first is whether the C call is reentrant, i.e., whether |
478 |
|
ML state should be saved and restored. |
479 |
|
b. The second argument is a string argument specifying the name of |
480 |
|
library and the C function. |
481 |
|
|
482 |
|
These things are currently not handled in the code generator, yet. |
483 |
|
|
484 |
|
4. In CProto, |
485 |
|
|
486 |
|
An encoding type of "bool" means "ml object" and is mapped into |
487 |
|
C prototype of PTR. Note that "bool" is different than "string", |
488 |
|
even though "string" is also mapped into PTR, because "bool" |
489 |
|
is assigned an CPS type of BOGt, while "string" is assigned INT32t. |
490 |
|
|
491 |
|
5. Pickler/unpicker |
492 |
|
|
493 |
|
Changed to handle RAW_RECORD and newest RAW_CCALL |
494 |
|
|
495 |
|
6. MLRiscGen, |
496 |
|
|
497 |
|
1. Changed to handle the new rawload/rawstore/rawrecord operators. |
498 |
|
2. Code for handling C Calls has been moved to a new module CPSCCalls, |
499 |
|
in the file CodeGen/cpscompile/cps-c-calls.sml |
500 |
|
|
501 |
|
7. Added the conditional move operator |
502 |
|
|
503 |
|
condmove of branch |
504 |
|
|
505 |
|
to cps. Generation of this is still buggy so it is currently |
506 |
|
disabled. |
507 |
|
|
508 |
|
---------------------------------------------------------------------- |
509 |
|
Name: Lal George |
510 |
|
Date: 2002/03/22 14:18:25 EST |
511 |
|
Tag: george-20020322-cps-branch-prob |
512 |
|
Description: |
513 |
|
|
514 |
|
Implemented the Ball-Larus branch prediction-heuristics, and |
515 |
|
incorporated graphical viewers for control flow graphs. |
516 |
|
|
517 |
|
Ball-Larus Heuristics: |
518 |
|
--------------------- |
519 |
|
See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml. |
520 |
|
|
521 |
|
By design it uses the Dempster-Shafer theory for combining |
522 |
|
probabilities. For example, in the function: |
523 |
|
|
524 |
|
fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc) |
525 |
|
|
526 |
|
the ball-larus heuristics predicts that the n=0 is unlikely |
527 |
|
(OH-heuristic), and the 'then' branch is unlikely because of the |
528 |
|
RH-heuristic -- giving the 'then' branch an even lower combined |
529 |
|
probability using the Dempster-Shafer theory. |
530 |
|
|
531 |
|
Finally, John Reppy's loop analysis in MLRISC, further lowers the |
532 |
|
probability of the 'then' branch because of the loop in the else |
533 |
|
branch. |
534 |
|
|
535 |
|
|
536 |
|
Graphical Viewing: |
537 |
|
------------------ |
538 |
|
I merely plugged in Allen's graphical viewers into the compiler. The |
539 |
|
additional code is not much. At the top level, saying: |
540 |
|
|
541 |
|
Control.MLRISC.getFlag "cfg-graphical-view" := true; |
542 |
|
|
543 |
|
will display the graphical view of the control flow graph just before |
544 |
|
back-patching. daVinci must be in your path for this to work. If |
545 |
|
daVinci is not available, then the default viewer can be changed |
546 |
|
using: |
547 |
|
|
548 |
|
Control.MLRISC.getString "viewer" |
549 |
|
|
550 |
|
which can be set to "dot" or "vcg" for the corresponding viewers. Of |
551 |
|
course, these viewers must be in your path. |
552 |
|
|
553 |
|
The above will display the compilation unit at the level of clusters, |
554 |
|
many of which are small, boring, and un-interesting. Also setting: |
555 |
|
|
556 |
|
Control.MLRISC.getInt "cfg-graphical-view_size" |
557 |
|
|
558 |
|
will display clusters that are larger than the value set by the above. |
559 |
|
|
560 |
|
|
561 |
|
---------------------------------------------------------------------- |
562 |
|
Name: Matthias Blume |
563 |
|
Date: 2002/03/21 22:20:00 EST |
564 |
|
Tag: blume-20020321-kmp-bugfix |
565 |
|
Description: |
566 |
|
|
567 |
|
Changed the interface to the KMP routine in PreString and fixed |
568 |
|
a minor bug in one place where it was used. |
569 |
|
|
570 |
|
---------------------------------------------------------------------- |
571 |
|
Name: Allen Leung |
572 |
|
Date: 2002/03/21 20:30:00 EST |
573 |
|
Tag: leunga-20020321-cfg |
574 |
|
Description: |
575 |
|
|
576 |
|
Fixed a potential problem in cfg edge splitting. |
577 |
|
|
578 |
|
---------------------------------------------------------------------- |
579 |
|
Name: Allen Leung |
580 |
|
Date: 2002/03/21 17:15:00 EST |
581 |
|
Tag: leunga-20020321-x86-fp-cfg |
582 |
|
Description: |
583 |
|
|
584 |
|
1. Recoded the buggy parts of x86-fp. |
585 |
|
|
586 |
|
a. All the block reordering code has been removed. |
587 |
|
We now depend on the block placement phases to do this work. |
588 |
|
|
589 |
|
b. Critical edge splitting code has been simplified and moved into the |
590 |
|
CFG modules, as where they belong. |
591 |
|
|
592 |
|
Both of these were quite buggy and complex. The code is now much, much |
593 |
|
simpler. |
594 |
|
|
595 |
|
2. X86 backend. |
596 |
|
|
597 |
|
a. Added instructions for 64-bit support. Instruction selection for |
598 |
|
64-bit has not been committed, however, since that |
599 |
|
requires changes to MLTREE which haven't been approved by |
600 |
|
Lal and John. |
601 |
|
|
602 |
|
b. Added support for FUCOMI and FUCOMIP when generating code for |
603 |
|
PentiumPro and above. We only generate these instructions in |
604 |
|
the fast-fp mode. |
605 |
|
|
606 |
|
c. Added cases for JP and JNP in X86FreqProps. |
607 |
|
|
608 |
|
3. CFG |
609 |
|
|
610 |
|
CFG now has a bunch of methods for edge splitting and merging. |
611 |
|
|
612 |
|
4. Machine description. |
613 |
|
|
614 |
|
John's simplification of MLTREE_BASIS.fcond broke a few machine |
615 |
|
description things: |
616 |
|
|
617 |
|
rtl-build.{sig,sml} and hppa.mdl fixed. |
618 |
|
|
619 |
|
NOTE: the machine description stuff in the repository is still broken. |
620 |
|
Again, I can't put my fixes in because that involves |
621 |
|
changes to MLTREE. |
622 |
|
|
623 |
|
---------------------------------------------------------------------- |
624 |
|
Name: Matthias Blume |
625 |
|
Date: 2002/03/20 15:55:00 EST |
626 |
|
Tag: blume-20020320-kmp |
627 |
|
Description: |
628 |
|
|
629 |
|
Implemented Knuth-Morris-Pratt string matching in PreString and used |
630 |
|
it for String.isSubstring, Substring.isSubstring, and |
631 |
|
Substring.position. |
632 |
|
|
633 |
|
(Might need some stress-testing. Simple examples worked fine.) |
634 |
|
|
635 |
|
---------------------------------------------------------------------- |
636 |
|
Name: Matthias Blume |
637 |
|
Date: 2002/03/19 16:37:00 EST |
638 |
|
Tag: blume-20020319-witnesses |
639 |
|
Description: |
640 |
|
|
641 |
|
Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib. |
642 |
|
|
643 |
|
This implements a generic mechanism for changing constness qualifiers |
644 |
|
anywhere within big C types without resorting to outright "casts". |
645 |
|
(So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you |
646 |
|
modify the constness at the outermost level.) |
647 |
|
The implementation of "convert" is based on the idea of "witness" |
648 |
|
values -- values that are not used by the operation but whose types |
649 |
|
"testify" to their applicability. On the implementation side, "convert" |
650 |
|
is simply a projection (returning its second curried argument). With |
651 |
|
cross-module inlining, it should not result in any machine code being |
652 |
|
generated. |
653 |
|
|
654 |
|
---------------------------------------------------------------------- |
655 |
|
Name: Matthias Blume |
656 |
|
Date: 2002/03/15 16:40:00 EST |
657 |
|
Tag: blume-20020315-basis |
658 |
|
Description: |
659 |
|
|
660 |
|
Provided (preliminary?) implementations for |
661 |
|
|
662 |
|
{String,Substring}.{concatWith,isSuffix,isSubstring} |
663 |
|
|
664 |
|
and |
665 |
|
|
666 |
|
Substring.full |
667 |
|
|
668 |
|
Those are in the Basis spec but they were missing in SML/NJ. |
669 |
|
|
670 |
|
---------------------------------------------------------------------- |
671 |
|
Name: Matthias Blume |
672 |
|
Date: 2002/03/14 21:30:00 EST |
673 |
|
Tag: blume-20020314-controls |
674 |
|
Description: |
675 |
|
|
676 |
|
Controls: |
677 |
|
--------- |
678 |
|
|
679 |
|
1. Factored out the recently-added Controls : CONTROLS stuff and put |
680 |
|
it into its own library $/controls-lib.cm. The source tree for |
681 |
|
this is under src/smlnj-lib/Controls. |
682 |
|
|
683 |
|
2. Changed the names of types and functions in this interface, so they |
684 |
|
make a bit more "sense": |
685 |
|
|
686 |
|
module -> registry |
687 |
|
'a registry -> 'a group |
688 |
|
|
689 |
|
3. The interface now deals in ref cells only. The getter/setter interface |
690 |
|
is (mostly) gone. |
691 |
|
|
692 |
|
4. Added a function that lets one register an already-existing ref cell. |
693 |
|
|
694 |
|
5. Made the corresponding modifications to the rest of the code so that |
695 |
|
everything compiles again. |
696 |
|
|
697 |
|
6. Changed the implementation of Controls.MLRISC back to something closer |
698 |
|
to the original. In particular, this module (and therefore MLRISC) |
699 |
|
does not depend on Controls. There now is some link-time code in |
700 |
|
int-sys.sml that registers the MLRISC controls with the Controls |
701 |
|
module. |
702 |
|
|
703 |
|
CM: |
704 |
|
--- |
705 |
|
|
706 |
|
* One can now specify the lambda-split aggressiveness in init.cmi. |
707 |
|
|
708 |
|
---------------------------------------------------------------------- |
709 |
|
Name: Allen Leung |
710 |
|
Date: 2002/03/13 17:30:00 EST |
711 |
|
Tag: leunga-20020313-x86-fp-unary |
712 |
|
Description: |
713 |
|
|
714 |
|
Bug fix for: |
715 |
|
|
716 |
|
> leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml |
717 |
|
> Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002 |
718 |
|
> - fun f(x,(y,z)) = Real.~ y; |
719 |
|
> [autoloading] |
720 |
|
> [autoloading done] |
721 |
|
> fchsl (%eax), 184(%esp) |
722 |
|
> Error: MLRisc bug: X86MCEmitter.emitInstr |
723 |
|
> |
724 |
|
> uncaught exception Error |
725 |
|
> raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19 |
726 |
|
|
727 |
|
The problem was that the code generator did not generate any fp registers |
728 |
|
in this case, and the ra didn't know that it needed to run the X86FP phase to |
729 |
|
translate the pseudo fp instruction. This only happened with unary fp |
730 |
|
operators in certain situations. |
731 |
|
|
732 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
733 |
Name: Matthias Blume |
Name: Matthias Blume |
734 |
Date: 2002/03/13 14:00:00 EST |
Date: 2002/03/13 14:00:00 EST |
768 |
provides a bit more "stability": Once CM has seen a compilation |
provides a bit more "stability": Once CM has seen a compilation |
769 |
unit, it keeps its identity constant (as long as you do not delete |
unit, it keeps its identity constant (as long as you do not delete |
770 |
those crucial CM/GUID/* files). This means that when you change |
those crucial CM/GUID/* files). This means that when you change |
771 |
and interface, compiler, then go back to the old interface, and |
an interface, compile, then go back to the old interface, and |
772 |
compile again, you arrive at the original pid. |
compile again, you arrive at the original pid. |
773 |
|
|
774 |
There now also is a mechanism that instructs CM to use the plain |
There now also is a mechanism that instructs CM to use the plain |
843 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
844 |
Name: Allen Leung |
Name: Allen Leung |
845 |
Date: 2002/03/11 10:30:00 EST |
Date: 2002/03/11 10:30:00 EST |
846 |
Tag: leunga-20020310-runtime-string0 |
Tag: leunga-20020311-runtime-string0 |
847 |
Description: |
Description: |
848 |
|
|
849 |
The representation of the empty string now points to a |
The representation of the empty string now points to a |