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/05/21 12:35:00 EDT |
18 |
|
Tag: blume-20020521-cmdoc |
19 |
|
Description: |
20 |
|
|
21 |
|
CM documentation update. |
22 |
|
|
23 |
|
---------------------------------------------------------------------- |
24 |
|
Name: Matthias Blume |
25 |
|
Date: 2002/05/21 10:55:00 EDT |
26 |
|
Tag: blume-20020521-misc |
27 |
|
Description: |
28 |
|
|
29 |
|
- John tweaked runtime to be silent on heap export (except when |
30 |
|
GC messages are on). |
31 |
|
- I added a few more things (cross-compiling versions of CMB) to |
32 |
|
config/preloads (as suggestions). |
33 |
|
|
34 |
|
---------------------------------------------------------------------- |
35 |
|
Name: Matthias Blume |
36 |
|
Date: 2002/05/20 22:25:00 EDT |
37 |
|
Tag: blume-20020520-controls |
38 |
|
Description: |
39 |
|
|
40 |
|
- Added ControlUtil structure to control-lib.cm. |
41 |
|
- Use it throughout. |
42 |
|
- Used Controls facility to define MLRISC controls (as opposed to |
43 |
|
registering MLRISC control ref cells with Controls after the fact) |
44 |
|
- Fixed messed-up controls priorities. |
45 |
|
|
46 |
|
* Removed again all the stuff from config/preloads that one wouldn't |
47 |
|
be able to preload at the time the initial heap image is built. |
48 |
|
(Many libraries, e.g., CML, do not exist yet at this time. The |
49 |
|
only libraries that can be preloaded via config/preloads are those |
50 |
|
that come bundled with the bootfiles.) |
51 |
|
|
52 |
|
---------------------------------------------------------------------- |
53 |
|
Name: Matthias Blume |
54 |
|
Date: 2002/05/20 10:59:00 EDT |
55 |
|
Tag: blume-20020520-preloads |
56 |
|
Description: |
57 |
|
|
58 |
|
Added a lot of commented-out suggestions for things to be included |
59 |
|
in config/preloads. |
60 |
|
|
61 |
|
---------------------------------------------------------------------- |
62 |
|
Name: Allen Leung |
63 |
|
Date: 2002/05/18 14:20:00 EDT |
64 |
|
Tag: leunga-20020518-mdl |
65 |
|
Description: |
66 |
|
|
67 |
|
o Made the mdl tool stuff compile and run again. |
68 |
|
o I've disabled all the stuff that depends on RTL specifications; they |
69 |
|
are all badly broken anyway. |
70 |
|
|
71 |
|
---------------------------------------------------------------------- |
72 |
|
Name: Matthias Blume |
73 |
|
Date: 2002/05/17 16:49:00 EDT |
74 |
|
Tag: blume-20020517-controls |
75 |
|
Description: |
76 |
|
|
77 |
|
0. John Reppy made several modifications to the SML/NJ library. |
78 |
|
In particular, there is a shiny new controls-lib.cm. |
79 |
|
|
80 |
|
1. Pushed new controls interface through compiler so that everything |
81 |
|
compiles again. |
82 |
|
|
83 |
|
2. Added FormatComb and FORMAT_COMB to the CML version of the |
84 |
|
SML/NJ library (so that CML compiles again). |
85 |
|
|
86 |
|
3. Modified init scripts because XXX_DEFAULT environment variables |
87 |
|
are no longer with us. (Boot-time initialization is now done |
88 |
|
using the same environment variables that are also used for |
89 |
|
startup-time initialization of controls.) |
90 |
|
|
91 |
|
---------------------------------------------------------------------- |
92 |
|
Name: Lal George |
93 |
|
Date: 2002/05/15 09:20:10 EDT |
94 |
|
Tag: george-20020515-pseudo-op-decls |
95 |
|
Description: |
96 |
|
|
97 |
|
All pseudo-ops emitted before the first segment declaration |
98 |
|
such as TEXT, DATA, and BSS directives are assumed to be global |
99 |
|
declarations and are emitted first in the assembly file. This is |
100 |
|
useful in a number of situations where one has pseudo-ops that are not |
101 |
|
specific to any segment, and also works around the constraint that one |
102 |
|
cannot have client pseudo-ops in the TEXT segment. |
103 |
|
|
104 |
|
Because no segment is associated with these declarations it is |
105 |
|
an error to allocate any space or objects before the first segment |
106 |
|
directive and an exception will be raised. However, we cannot make |
107 |
|
this check for client pseudo-ops. |
108 |
|
|
109 |
|
These top level declarations are a field in the CFG graph_info. |
110 |
|
In theory you can continue to add to this field after the CFG has been |
111 |
|
built -- provided you know what you are doing;-) |
112 |
|
|
113 |
|
---------------------------------------------------------------------- |
114 |
|
Name: Matthias Blume |
115 |
|
Date: 2002/05/13 16:40:00 EDT |
116 |
|
Tag: blume-20020513-pp-etc |
117 |
|
Description: |
118 |
|
|
119 |
|
A few minor bugfixes: |
120 |
|
|
121 |
|
- Stopgap measure for bug recently reported by Elsa Gunter (ppDec). |
122 |
|
(Bogus printouts for redefined bindings still occur. Compiler |
123 |
|
bug should no longer occur now. We need to redo the prettyprinter |
124 |
|
from scratch.) |
125 |
|
|
126 |
|
- CM pathname printer now also adds escape sequences for ( and ) |
127 |
|
|
128 |
|
- commend and docu fixes for ml-nlffi |
129 |
|
|
130 |
|
---------------------------------------------------------------------- |
131 |
|
Name: Matthias Blume |
132 |
|
Date: 2002/05/10 16:40:00 EDT |
133 |
|
Tag: blume-20020510-erg-textio |
134 |
|
Description: |
135 |
|
|
136 |
|
Applied the following bugfix provided by Emden Gansner: |
137 |
|
|
138 |
|
Output is corrupted when outputSubstr is used rather than output. |
139 |
|
|
140 |
|
The problem occurs when a substring |
141 |
|
|
142 |
|
ss = (s, dataStart, dataLen) |
143 |
|
|
144 |
|
where dataStart > 0, fills a stream buffer with avail bytes left. |
145 |
|
avail bytes of s, starting at index dataStart, are copied into the |
146 |
|
buffer, the buffer is flushed, and then the remaining dataLen-avail |
147 |
|
bytes of ss are copied into the beginning of the buffer. Instead of |
148 |
|
starting this copy at index dataStart+avail in s, the current code |
149 |
|
starts the copy at index avail. |
150 |
|
|
151 |
|
Fix: |
152 |
|
In text-io-fn.sml, change line 695 from |
153 |
|
val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0) |
154 |
|
to |
155 |
|
val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0) |
156 |
|
|
157 |
|
---------------------------------------------------------------------- |
158 |
|
Name: Matthias Blume |
159 |
|
Date: 2002/04/12 13:55:00 EDT |
160 |
|
Tag: blume-20020412-assyntax |
161 |
|
Description: |
162 |
|
|
163 |
|
1. Grabbed newer assyntax.h from the XFree86 project. |
164 |
|
2. Fiddled with how to compile X86.prim.asm without warnings. |
165 |
|
3. (Very) Minor cleanup in CM. |
166 |
|
|
167 |
|
---------------------------------------------------------------------- |
168 |
|
Name: Matthias Blume |
169 |
|
Date: 2002/04/01 (no joke!) 17:07:00 EST |
170 |
|
Tag: blume-20020401-x86div |
171 |
|
Description: |
172 |
|
|
173 |
|
Added full support for div/mod/rem/quot on the x86, using the machine |
174 |
|
instruction's two results (without clumsily recomputing the remainder) |
175 |
|
directly where appropriate. |
176 |
|
|
177 |
|
Some more extensive power-of-two support was added to the x86 instruction |
178 |
|
selector (avoiding expensive divs, mods, and muls where they can be |
179 |
|
replaced with cheaper shifts and masks). However, this sort of thing |
180 |
|
ought to be done earlier, e.g., within the CPS optimizer so that |
181 |
|
all architectures benefit from it. |
182 |
|
|
183 |
|
The compiler compiles to a fixed point, but changes might be somewhat |
184 |
|
fragile nevertheless. Please, report any strange things that you might |
185 |
|
see wrt. div/mod/quot/rem... |
186 |
|
|
187 |
|
---------------------------------------------------------------------- |
188 |
|
Name: Matthias Blume |
189 |
|
Date: 2002/03/29 17:22:00 |
190 |
|
Tag: blume-20020329-div |
191 |
|
Description: |
192 |
|
|
193 |
|
Fixed my broken div/mod logic. Unfortunately, this means that the |
194 |
|
inline code for div/mod now has one more comparison than before. |
195 |
|
Fast paths (quotient > 0 or remainder = 0) are not affected, though. |
196 |
|
The problem was with quotient = 0, because that alone does not tell |
197 |
|
us which way the rounding went. One then has to look at whether |
198 |
|
remainder and divisor have the same sign... :( |
199 |
|
|
200 |
|
Anyway, I replaced the bootfiles with fresh ones... |
201 |
|
|
202 |
|
---------------------------------------------------------------------- |
203 |
|
Name: Matthias Blume |
204 |
|
Date: 2002/03/29 14:10:00 EST |
205 |
|
Tag: blume-20020329-inlprims |
206 |
|
Description: |
207 |
|
|
208 |
|
NEW BOOTFILES!!! Version number bumped to 110.39.3. |
209 |
|
|
210 |
|
Primops have changed. This means that the bin/boot-file formats have |
211 |
|
changed as well. |
212 |
|
|
213 |
|
To make sure that there is no confusion, I made a new version. |
214 |
|
|
215 |
|
|
216 |
|
CHANGES: |
217 |
|
|
218 |
|
* removed REMT from mltree (remainder should never overflow). |
219 |
|
|
220 |
|
* added primops to deal with divisions of all flavors to the frontend |
221 |
|
|
222 |
|
* handled these primops all the way through so they map to their respective |
223 |
|
MLRISC support |
224 |
|
|
225 |
|
* used these primops in the implementation of Int, Int32, Word, Word32 |
226 |
|
|
227 |
|
* removed INLDIV, INLMOD, and INLREM as they are no longer necessary |
228 |
|
|
229 |
|
* parameterized INLMIN, INLMAX, and INLABS by a numkind |
230 |
|
|
231 |
|
* translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including |
232 |
|
floating point |
233 |
|
|
234 |
|
* used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32, |
235 |
|
and Real (but Real.abs maps to a separate floating-point-only primop) |
236 |
|
|
237 |
|
|
238 |
|
TODO items: |
239 |
|
|
240 |
|
* Hacked Alpha32 instruction selection, disabling the selection of REMx |
241 |
|
instructions because the machine instruction encoder cannot handle |
242 |
|
them. (Hppa, PPC, and Sparc instruction selection did not handle |
243 |
|
REM in the first place, and REM is supported by the x86 machine coder.) |
244 |
|
|
245 |
|
* Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction |
246 |
|
selection phase. (The two can be streamlined because the hardware |
247 |
|
delivers both quotient and remainder at the same time anyway.) |
248 |
|
|
249 |
|
* Think about what to do with "valOf(Int32.minInt) div ~1" and friends. |
250 |
|
(Currently the behavior is inconsistent both across architectures and |
251 |
|
wrt. the draft Basis spec.) |
252 |
|
|
253 |
|
* Word8 should eventually be handled natively, too. |
254 |
|
|
255 |
|
* There seems to be one serious bug in mltree-gen.sml. It appears, though, |
256 |
|
as if there currently is no execution path that could trigger it in |
257 |
|
SML/NJ. (The assumptions underlying functions arith and promotable do not |
258 |
|
hold for things like multiplication and division.) |
259 |
|
|
260 |
|
---------------------------------------------------------------------- |
261 |
|
Name: Matthias Blume |
262 |
|
Date: 2002/03/27 16:27:00 EST |
263 |
|
Tag: blume-20020327-mlrisc-divisions |
264 |
|
Description: |
265 |
|
|
266 |
|
Added support for all four division operations (ML's div, mod, quot, |
267 |
|
and rem) to MLRISC. In the course of doing so, I also rationalized |
268 |
|
the naming (no more annoying switch-around of DIV and QUOT), by |
269 |
|
parameterizing the operation by div_rounding_mode (which can be either |
270 |
|
DIV_TO_ZERO or DIV_TO_NEGINF). |
271 |
|
|
272 |
|
The generic MLTreeGen functor takes care of compiling all four |
273 |
|
operations down to only round-to-zero div. |
274 |
|
|
275 |
|
Missing pieces: |
276 |
|
|
277 |
|
* Doing something smarter than relying on MLTreeGen on architectures |
278 |
|
like, e.g., the x86 where hardware division delivers both quotient and |
279 |
|
remainder at the same time. With this, the implementation of the |
280 |
|
round-to-neginf operations could be further streamlined. |
281 |
|
|
282 |
|
* Remove inlining support for div/mod/rem from the frontend and replace it |
283 |
|
with primops that get carried through to the backend. Do this for all |
284 |
|
int and word types. |
285 |
|
|
286 |
|
---------------------------------------------------------------------- |
287 |
|
Name: Matthias Blume |
288 |
|
Date: 2002/03/25 17:25:00 EST |
289 |
|
Tag: blume-20020325-divmod |
290 |
|
Description: |
291 |
|
|
292 |
|
I improved (hopefully without breaking them) the implementation of Int.div, |
293 |
|
Int.mod, and Int.rem. For this, the code in translate.sml now takes |
294 |
|
advantage of the following observations: |
295 |
|
|
296 |
|
Let q = x quot y r = x rem y |
297 |
|
d = x div y m = x mod y |
298 |
|
|
299 |
|
where "quot" is the round-to-zero version of integer division that |
300 |
|
hardware usually provides. Then we have: |
301 |
|
|
302 |
|
r = x - q * y where neither the * nor the - will overflow |
303 |
|
d = if q >= 0 orelse x = q * y then q else q - 1 |
304 |
|
where neither the * nor the - will overflow |
305 |
|
m = if q >= 0 orelse r = 0 then r else r + y |
306 |
|
where the + will not overflow |
307 |
|
|
308 |
|
This results in substantial simplification of the generated code. |
309 |
|
The following table shows the number of CFG nodes and edges generated |
310 |
|
for |
311 |
|
fun f (x, y) = x OPER y |
312 |
|
(* with OPER \in div, mod, quot, rem *) |
313 |
|
|
314 |
|
|
315 |
|
OPER | nodes(old) | edges(old) | nodes(new) | edges(new) |
316 |
|
-------------------------------------------------------- |
317 |
|
div | 24 | 39 | 12 | 16 |
318 |
|
mod | 41 | 71 | 12 | 16 |
319 |
|
quot | 8 | 10 | 8 | 10 |
320 |
|
rem | 10 | 14 | 8 | 10 |
321 |
|
|
322 |
|
|
323 |
|
---------------------------------------------------------------------- |
324 |
|
Name: Matthias Blume |
325 |
|
Date: 2002/03/25 22:06:00 EST |
326 |
|
Tag: blume-20020325-cprotobug |
327 |
|
Description: |
328 |
|
|
329 |
|
Fixed a bug in cproto (c prototype decoder). |
330 |
|
|
331 |
|
---------------------------------------------------------------------- |
332 |
|
Name: Matthias Blume |
333 |
|
Date: 2002/03/25 16:00:00 EST |
334 |
|
Tag: blume-20020325-raw-primops |
335 |
|
Description: |
336 |
|
|
337 |
|
I did some cleanup to Allen's new primop code and |
338 |
|
replaced yesterday's bootfiles with new ones. |
339 |
|
(But they are stored in the same place.) |
340 |
|
|
341 |
|
---------------------------------------------------------------------- |
342 |
|
Name: Matthias Blume |
343 |
|
Date: 2002/03/24 22:40:00 EST |
344 |
|
Tag: blume-20020324-bootfiles |
345 |
|
Description: |
346 |
|
|
347 |
|
Made the bootfiles that Allen asked for. |
348 |
|
|
349 |
|
---------------------------------------------------------------------- |
350 |
|
Name: Allen Leung |
351 |
|
Date: 2002/03/23 15:50:00 EST |
352 |
|
Tag: leunga-20020323-flint-cps-rcc-primops |
353 |
|
Description: |
354 |
|
|
355 |
|
1. Changes to FLINT primops: |
356 |
|
|
357 |
|
(* make a call to a C-function; |
358 |
|
* The primop carries C function prototype information and specifies |
359 |
|
* which of its (ML-) arguments are floating point. C prototype |
360 |
|
* information is for use by the backend, ML information is for |
361 |
|
* use by the CPS converter. *) |
362 |
|
| RAW_CCALL of { c_proto: CTypes.c_proto, |
363 |
|
ml_args: ccall_type list, |
364 |
|
ml_res_opt: ccall_type option, |
365 |
|
reentrant : bool |
366 |
|
} option |
367 |
|
(* Allocate uninitialized storage on the heap. |
368 |
|
* The record is meant to hold short-lived C objects, i.e., they |
369 |
|
* are not ML pointers. With the tag, the representation is |
370 |
|
* the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8) |
371 |
|
*) |
372 |
|
| RAW_RECORD of {tag:bool,sz:int} |
373 |
|
and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR |
374 |
|
|
375 |
|
2. These CPS primops are now overloaded: |
376 |
|
|
377 |
|
rawload of {kind:numkind} |
378 |
|
rawstore of {kind:numkind} |
379 |
|
|
380 |
|
The one argument form is: |
381 |
|
|
382 |
|
rawload {kind} address |
383 |
|
|
384 |
|
The two argument form is: |
385 |
|
|
386 |
|
rawload {kind} [ml object, byte-offset] |
387 |
|
|
388 |
|
3. RAW_CCALL/RCC now takes two extra arguments: |
389 |
|
|
390 |
|
a. The first is whether the C call is reentrant, i.e., whether |
391 |
|
ML state should be saved and restored. |
392 |
|
b. The second argument is a string argument specifying the name of |
393 |
|
library and the C function. |
394 |
|
|
395 |
|
These things are currently not handled in the code generator, yet. |
396 |
|
|
397 |
|
4. In CProto, |
398 |
|
|
399 |
|
An encoding type of "bool" means "ml object" and is mapped into |
400 |
|
C prototype of PTR. Note that "bool" is different than "string", |
401 |
|
even though "string" is also mapped into PTR, because "bool" |
402 |
|
is assigned an CPS type of BOGt, while "string" is assigned INT32t. |
403 |
|
|
404 |
|
5. Pickler/unpicker |
405 |
|
|
406 |
|
Changed to handle RAW_RECORD and newest RAW_CCALL |
407 |
|
|
408 |
|
6. MLRiscGen, |
409 |
|
|
410 |
|
1. Changed to handle the new rawload/rawstore/rawrecord operators. |
411 |
|
2. Code for handling C Calls has been moved to a new module CPSCCalls, |
412 |
|
in the file CodeGen/cpscompile/cps-c-calls.sml |
413 |
|
|
414 |
|
7. Added the conditional move operator |
415 |
|
|
416 |
|
condmove of branch |
417 |
|
|
418 |
|
to cps. Generation of this is still buggy so it is currently |
419 |
|
disabled. |
420 |
|
|
421 |
|
---------------------------------------------------------------------- |
422 |
|
Name: Lal George |
423 |
|
Date: 2002/03/22 14:18:25 EST |
424 |
|
Tag: george-20020322-cps-branch-prob |
425 |
|
Description: |
426 |
|
|
427 |
|
Implemented the Ball-Larus branch prediction-heuristics, and |
428 |
|
incorporated graphical viewers for control flow graphs. |
429 |
|
|
430 |
|
Ball-Larus Heuristics: |
431 |
|
--------------------- |
432 |
|
See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml. |
433 |
|
|
434 |
|
By design it uses the Dempster-Shafer theory for combining |
435 |
|
probabilities. For example, in the function: |
436 |
|
|
437 |
|
fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc) |
438 |
|
|
439 |
|
the ball-larus heuristics predicts that the n=0 is unlikely |
440 |
|
(OH-heuristic), and the 'then' branch is unlikely because of the |
441 |
|
RH-heuristic -- giving the 'then' branch an even lower combined |
442 |
|
probability using the Dempster-Shafer theory. |
443 |
|
|
444 |
|
Finally, John Reppy's loop analysis in MLRISC, further lowers the |
445 |
|
probability of the 'then' branch because of the loop in the else |
446 |
|
branch. |
447 |
|
|
448 |
|
|
449 |
|
Graphical Viewing: |
450 |
|
------------------ |
451 |
|
I merely plugged in Allen's graphical viewers into the compiler. The |
452 |
|
additional code is not much. At the top level, saying: |
453 |
|
|
454 |
|
Control.MLRISC.getFlag "cfg-graphical-view" := true; |
455 |
|
|
456 |
|
will display the graphical view of the control flow graph just before |
457 |
|
back-patching. daVinci must be in your path for this to work. If |
458 |
|
daVinci is not available, then the default viewer can be changed |
459 |
|
using: |
460 |
|
|
461 |
|
Control.MLRISC.getString "viewer" |
462 |
|
|
463 |
|
which can be set to "dot" or "vcg" for the corresponding viewers. Of |
464 |
|
course, these viewers must be in your path. |
465 |
|
|
466 |
|
The above will display the compilation unit at the level of clusters, |
467 |
|
many of which are small, boring, and un-interesting. Also setting: |
468 |
|
|
469 |
|
Control.MLRISC.getInt "cfg-graphical-view_size" |
470 |
|
|
471 |
|
will display clusters that are larger than the value set by the above. |
472 |
|
|
473 |
|
|
474 |
|
---------------------------------------------------------------------- |
475 |
|
Name: Matthias Blume |
476 |
|
Date: 2002/03/21 22:20:00 EST |
477 |
|
Tag: blume-20020321-kmp-bugfix |
478 |
|
Description: |
479 |
|
|
480 |
|
Changed the interface to the KMP routine in PreString and fixed |
481 |
|
a minor bug in one place where it was used. |
482 |
|
|
483 |
|
---------------------------------------------------------------------- |
484 |
|
Name: Allen Leung |
485 |
|
Date: 2002/03/21 20:30:00 EST |
486 |
|
Tag: leunga-20020321-cfg |
487 |
|
Description: |
488 |
|
|
489 |
|
Fixed a potential problem in cfg edge splitting. |
490 |
|
|
491 |
|
---------------------------------------------------------------------- |
492 |
|
Name: Allen Leung |
493 |
|
Date: 2002/03/21 17:15:00 EST |
494 |
|
Tag: leunga-20020321-x86-fp-cfg |
495 |
|
Description: |
496 |
|
|
497 |
|
1. Recoded the buggy parts of x86-fp. |
498 |
|
|
499 |
|
a. All the block reordering code has been removed. |
500 |
|
We now depend on the block placement phases to do this work. |
501 |
|
|
502 |
|
b. Critical edge splitting code has been simplified and moved into the |
503 |
|
CFG modules, as where they belong. |
504 |
|
|
505 |
|
Both of these were quite buggy and complex. The code is now much, much |
506 |
|
simpler. |
507 |
|
|
508 |
|
2. X86 backend. |
509 |
|
|
510 |
|
a. Added instructions for 64-bit support. Instruction selection for |
511 |
|
64-bit has not been committed, however, since that |
512 |
|
requires changes to MLTREE which haven't been approved by |
513 |
|
Lal and John. |
514 |
|
|
515 |
|
b. Added support for FUCOMI and FUCOMIP when generating code for |
516 |
|
PentiumPro and above. We only generate these instructions in |
517 |
|
the fast-fp mode. |
518 |
|
|
519 |
|
c. Added cases for JP and JNP in X86FreqProps. |
520 |
|
|
521 |
|
3. CFG |
522 |
|
|
523 |
|
CFG now has a bunch of methods for edge splitting and merging. |
524 |
|
|
525 |
|
4. Machine description. |
526 |
|
|
527 |
|
John's simplification of MLTREE_BASIS.fcond broke a few machine |
528 |
|
description things: |
529 |
|
|
530 |
|
rtl-build.{sig,sml} and hppa.mdl fixed. |
531 |
|
|
532 |
|
NOTE: the machine description stuff in the repository is still broken. |
533 |
|
Again, I can't put my fixes in because that involves |
534 |
|
changes to MLTREE. |
535 |
|
|
536 |
|
---------------------------------------------------------------------- |
537 |
|
Name: Matthias Blume |
538 |
|
Date: 2002/03/20 15:55:00 EST |
539 |
|
Tag: blume-20020320-kmp |
540 |
|
Description: |
541 |
|
|
542 |
|
Implemented Knuth-Morris-Pratt string matching in PreString and used |
543 |
|
it for String.isSubstring, Substring.isSubstring, and |
544 |
|
Substring.position. |
545 |
|
|
546 |
|
(Might need some stress-testing. Simple examples worked fine.) |
547 |
|
|
548 |
|
---------------------------------------------------------------------- |
549 |
|
Name: Matthias Blume |
550 |
|
Date: 2002/03/19 16:37:00 EST |
551 |
|
Tag: blume-20020319-witnesses |
552 |
|
Description: |
553 |
|
|
554 |
|
Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib. |
555 |
|
|
556 |
|
This implements a generic mechanism for changing constness qualifiers |
557 |
|
anywhere within big C types without resorting to outright "casts". |
558 |
|
(So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you |
559 |
|
modify the constness at the outermost level.) |
560 |
|
The implementation of "convert" is based on the idea of "witness" |
561 |
|
values -- values that are not used by the operation but whose types |
562 |
|
"testify" to their applicability. On the implementation side, "convert" |
563 |
|
is simply a projection (returning its second curried argument). With |
564 |
|
cross-module inlining, it should not result in any machine code being |
565 |
|
generated. |
566 |
|
|
567 |
|
---------------------------------------------------------------------- |
568 |
|
Name: Matthias Blume |
569 |
|
Date: 2002/03/15 16:40:00 EST |
570 |
|
Tag: blume-20020315-basis |
571 |
|
Description: |
572 |
|
|
573 |
|
Provided (preliminary?) implementations for |
574 |
|
|
575 |
|
{String,Substring}.{concatWith,isSuffix,isSubstring} |
576 |
|
|
577 |
|
and |
578 |
|
|
579 |
|
Substring.full |
580 |
|
|
581 |
|
Those are in the Basis spec but they were missing in SML/NJ. |
582 |
|
|
583 |
|
---------------------------------------------------------------------- |
584 |
|
Name: Matthias Blume |
585 |
|
Date: 2002/03/14 21:30:00 EST |
586 |
|
Tag: blume-20020314-controls |
587 |
|
Description: |
588 |
|
|
589 |
|
Controls: |
590 |
|
--------- |
591 |
|
|
592 |
|
1. Factored out the recently-added Controls : CONTROLS stuff and put |
593 |
|
it into its own library $/controls-lib.cm. The source tree for |
594 |
|
this is under src/smlnj-lib/Controls. |
595 |
|
|
596 |
|
2. Changed the names of types and functions in this interface, so they |
597 |
|
make a bit more "sense": |
598 |
|
|
599 |
|
module -> registry |
600 |
|
'a registry -> 'a group |
601 |
|
|
602 |
|
3. The interface now deals in ref cells only. The getter/setter interface |
603 |
|
is (mostly) gone. |
604 |
|
|
605 |
|
4. Added a function that lets one register an already-existing ref cell. |
606 |
|
|
607 |
|
5. Made the corresponding modifications to the rest of the code so that |
608 |
|
everything compiles again. |
609 |
|
|
610 |
|
6. Changed the implementation of Controls.MLRISC back to something closer |
611 |
|
to the original. In particular, this module (and therefore MLRISC) |
612 |
|
does not depend on Controls. There now is some link-time code in |
613 |
|
int-sys.sml that registers the MLRISC controls with the Controls |
614 |
|
module. |
615 |
|
|
616 |
|
CM: |
617 |
|
--- |
618 |
|
|
619 |
|
* One can now specify the lambda-split aggressiveness in init.cmi. |
620 |
|
|
621 |
|
---------------------------------------------------------------------- |
622 |
|
Name: Allen Leung |
623 |
|
Date: 2002/03/13 17:30:00 EST |
624 |
|
Tag: leunga-20020313-x86-fp-unary |
625 |
|
Description: |
626 |
|
|
627 |
|
Bug fix for: |
628 |
|
|
629 |
|
> leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml |
630 |
|
> Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002 |
631 |
|
> - fun f(x,(y,z)) = Real.~ y; |
632 |
|
> [autoloading] |
633 |
|
> [autoloading done] |
634 |
|
> fchsl (%eax), 184(%esp) |
635 |
|
> Error: MLRisc bug: X86MCEmitter.emitInstr |
636 |
|
> |
637 |
|
> uncaught exception Error |
638 |
|
> raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19 |
639 |
|
|
640 |
|
The problem was that the code generator did not generate any fp registers |
641 |
|
in this case, and the ra didn't know that it needed to run the X86FP phase to |
642 |
|
translate the pseudo fp instruction. This only happened with unary fp |
643 |
|
operators in certain situations. |
644 |
|
|
645 |
|
---------------------------------------------------------------------- |
646 |
|
Name: Matthias Blume |
647 |
|
Date: 2002/03/13 14:00:00 EST |
648 |
|
Tag: blume-20020313-overload-etc |
649 |
|
Description: |
650 |
|
|
651 |
|
1. Added _overload as a synonym for overload for backward compatibility. |
652 |
|
(Control.overloadKW must be true for either version to be accepted.) |
653 |
|
|
654 |
|
2. Fixed bug in install script that caused more things to be installed |
655 |
|
than what was requested in config/targets. |
656 |
|
|
657 |
|
3. Made CM aware of the (_)overload construct so that autoloading |
658 |
|
works. |
659 |
|
|
660 |
|
---------------------------------------------------------------------- |
661 |
|
Name: Matthias Blume |
662 |
|
Date: 2002/03/12 22:03:00 EST |
663 |
|
Tag: blume-20020312-url |
664 |
|
Description: |
665 |
|
|
666 |
|
Forgot to update BOOT and srcarchiveurl. |
667 |
|
|
668 |
|
---------------------------------------------------------------------- |
669 |
|
Name: Matthias Blume |
670 |
|
Date: 2002/03/12 17:30:00 EST |
671 |
|
Tag: blume-20020312-version110392 |
672 |
|
Description: |
673 |
|
|
674 |
|
Yet another version number bump (because of small changes to the |
675 |
|
binfile format). Version number is now 110.39.2. NEW BOOTFILES! |
676 |
|
|
677 |
|
Changes: |
678 |
|
|
679 |
|
The new pid generation scheme described a few weeks ago was overly |
680 |
|
complicated. I implemented a new mechanism that is simpler and |
681 |
|
provides a bit more "stability": Once CM has seen a compilation |
682 |
|
unit, it keeps its identity constant (as long as you do not delete |
683 |
|
those crucial CM/GUID/* files). This means that when you change |
684 |
|
an interface, compile, then go back to the old interface, and |
685 |
|
compile again, you arrive at the original pid. |
686 |
|
|
687 |
|
There now also is a mechanism that instructs CM to use the plain |
688 |
|
environment hash as a module's pid (effectively making its GUID |
689 |
|
the empty string). For this, "noguid" must be specified as an |
690 |
|
option to the .sml file in question within its .cm file. |
691 |
|
This is most useful for code that is being generated by tools such |
692 |
|
as ml-nlffigen (because during development programmers tend to |
693 |
|
erase the tool's entire output directory tree including CM's cached |
694 |
|
GUIDs). "noguid" is somewhat dangerous (since it can be used to locally |
695 |
|
revert to the old, broken behavior of SML/NJ, but in specific cases |
696 |
|
where there is no danger of interface confusion, its use is ok |
697 |
|
(I think). |
698 |
|
|
699 |
|
ml-nlffigen by default generates "noguid" annotations. They can be |
700 |
|
turned off by specifying -guid in its command line. |
701 |
|
|
702 |
|
---------------------------------------------------------------------- |
703 |
|
Name: Lal George |
704 |
|
Date: 2002/03/12 12 14:42:36 EST |
705 |
|
Tag: george-20020312-frequency-computation |
706 |
|
Description: |
707 |
|
|
708 |
|
Integrated jump chaining and static block frequency into the |
709 |
|
compiler. More details and numbers later. |
710 |
|
|
711 |
|
---------------------------------------------------------------------- |
712 |
|
Name: Lal George |
713 |
|
Date: 2002/03/11 11 22:38:53 EST |
714 |
|
Tag: george-20020311-jump-chain-elim |
715 |
|
Description: |
716 |
|
|
717 |
|
Tested the jump chain elimination on all architectures (except the |
718 |
|
hppa). This is on by default right now and is profitable for the |
719 |
|
alpha and x86, however, it may not be profitable for the sparc and ppc |
720 |
|
when compiling the compiler. |
721 |
|
|
722 |
|
The gc test will typically jump to a label at the end of the cluster, |
723 |
|
where there is another jump to an external cluster containing the actual |
724 |
|
code to invoke gc. This is to allow factoring of common gc invocation |
725 |
|
sequences. That is to say, we generate: |
726 |
|
|
727 |
|
f: |
728 |
|
testgc |
729 |
|
ja L1 % jump if above to L1 |
730 |
|
|
731 |
|
L1: |
732 |
|
jmp L2 |
733 |
|
|
734 |
|
|
735 |
|
After jump chain elimination the 'ja L1' instructions is converted to |
736 |
|
'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end |
737 |
|
up being implemented in their long form (if L2 is far away) using: |
738 |
|
|
739 |
|
jbe L3 % jump if below or equal to L3 |
740 |
|
jmp L2 |
741 |
|
L3: |
742 |
|
... |
743 |
|
|
744 |
|
|
745 |
|
For large compilation units L2 may be far away. |
746 |
|
|
747 |
|
|
748 |
|
---------------------------------------------------------------------- |
749 |
|
Name: Matthias Blume |
750 |
|
Date: 2002/03/11 13:30:00 EST |
751 |
|
Tag: blume-20020311-mltreeeval |
752 |
|
Description: |
753 |
|
|
754 |
|
A functor parameter was missing. |
755 |
|
|
756 |
|
---------------------------------------------------------------------- |
757 |
|
Name: Allen Leung |
758 |
|
Date: 2002/03/11 10:30:00 EST |
759 |
|
Tag: leunga-20020311-runtime-string0 |
760 |
|
Description: |
761 |
|
|
762 |
|
The representation of the empty string now points to a |
763 |
|
legal null terminated C string instead of unit. It is now possible |
764 |
|
to convert an ML string into C string with InlineT.CharVector.getData. |
765 |
|
This compiles into one single machine instruction. |
766 |
|
|
767 |
|
---------------------------------------------------------------------- |
768 |
|
Name: Allen Leung |
769 |
|
Date: 2002/03/10 23:55:00 EST |
770 |
|
Tag: leunga-20020310-x86-call |
771 |
|
Description: |
772 |
|
|
773 |
|
Added machine generation for CALL instruction (relative displacement mode) |
774 |
|
|
775 |
|
---------------------------------------------------------------------- |
776 |
|
Name: Matthias Blume |
777 |
|
Date: 2002/03/08 16:05:00 |
778 |
|
Tag: blume-20020308-entrypoints |
779 |
|
Description: |
780 |
|
|
781 |
|
Version number bumped to 110.39.1. NEW BOOTFILES! |
782 |
|
|
783 |
|
Entrypoints: non-zero offset into a code object where execution should begin. |
784 |
|
|
785 |
|
- Added the notion of an entrypoint to CodeObj. |
786 |
|
- Added reading/writing of entrypoint info to Binfile. |
787 |
|
- Made runtime system bootloader aware of entrypoints. |
788 |
|
- Use the address of the label of the first function given to mlriscGen |
789 |
|
as the entrypoint. This address is currently always 0, but it will |
790 |
|
not be 0 once we turn on block placement. |
791 |
|
- Removed the linkage cluster code (which was The Other Way(tm) of dealing |
792 |
|
with entry points) from mlriscGen. |
793 |
|
|
794 |
|
---------------------------------------------------------------------- |
795 |
|
Name: Allen Leung |
796 |
|
Date: 2002/03/07 20:45:00 EST |
797 |
|
Tag: leunga-20020307-x86-cmov |
798 |
|
Description: |
799 |
|
|
800 |
|
Bug fixes for CMOVcc on x86. |
801 |
|
|
802 |
|
1. Added machine code generation for CMOVcc |
803 |
|
2. CMOVcc is now generated in preference over SETcc on PentiumPro or above. |
804 |
|
3. CMOVcc cannot have an immediate operand as argument. |
805 |
|
|
806 |
|
---------------------------------------------------------------------- |
807 |
|
Name: Matthias Blume |
808 |
|
Date: 2002/03/07 16:15:00 EST |
809 |
|
Tag: blume-20020307-controls |
810 |
|
Description: |
811 |
|
|
812 |
|
This is a very large but mostly boring patch which makes (almost) |
813 |
|
every tuneable compiler knob (i.e., pretty much everything under |
814 |
|
Control.* plus a few other things) configurable via both the command |
815 |
|
line and environment variables in the style CM did its configuration |
816 |
|
until now. |
817 |
|
|
818 |
|
Try starting sml with '-h' (or, if you are brave, '-H') |
819 |
|
|
820 |
|
To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which |
821 |
|
implements the underlying generic mechanism. |
822 |
|
|
823 |
|
The interface to some of the existing such facilities has changed somewhat. |
824 |
|
For example, the MLRiscControl module now provides mkFoo instead of getFoo. |
825 |
|
(The getFoo interface is still there for backward-compatibility, but its |
826 |
|
use is deprecated.) |
827 |
|
|
828 |
|
The ml-build script passes -Cxxx=yyy command-line arguments through so |
829 |
|
that one can now twiddle the compiler settings when using this "batch" |
830 |
|
compiler. |
831 |
|
|
832 |
|
TODO items: |
833 |
|
|
834 |
|
We should go through and throw out all controls that are no longer |
835 |
|
connected to anything. Moreover, we should go through and provide |
836 |
|
meaningful (and correct!) documentation strings for those controls |
837 |
|
that still are connected. |
838 |
|
|
839 |
|
Currently, multiple calls to Controls.new are accepted (only the first |
840 |
|
has any effect). Eventually we should make sure that every control |
841 |
|
is being made (via Controls.new) exactly once. Future access can then |
842 |
|
be done using Controls.acc. |
843 |
|
|
844 |
|
Finally, it would probably be a good idea to use the getter-setter |
845 |
|
interface to controls rather than ref cells. For the time being, both |
846 |
|
styles are provided by the Controls module, but getter-setter pairs are |
847 |
|
better if thread-safety is of any concern because they can be wrapped. |
848 |
|
|
849 |
|
***************************************** |
850 |
|
|
851 |
|
One bug fix: The function blockPlacement in three of the MLRISC |
852 |
|
backpatch files used to be hard-wired to one of two possibilities at |
853 |
|
link time (according to the value of the placementFlag). But (I |
854 |
|
think) it should rather sense the flag every time. |
855 |
|
|
856 |
|
***************************************** |
857 |
|
|
858 |
|
Other assorted changes (by other people who did not supply a HISTORY entry): |
859 |
|
|
860 |
|
1. the cross-module inliner now works much better (Monnier) |
861 |
|
2. representation of weights, frequencies, and probabilities in MLRISC |
862 |
|
changed in preparation of using those for weighted block placement |
863 |
|
(Reppy, George) |
864 |
|
|
865 |
|
---------------------------------------------------------------------- |
866 |
|
Name: Lal George |
867 |
|
Date: 2002/03/07 14:44:24 EST 2002 |
868 |
|
Tag: george-20020307-weighted-block-placement |
869 |
|
|
870 |
|
Tested the weighted block placement optimization on all architectures |
871 |
|
(except the hppa) using AMPL to generate the block and edge frequencies. |
872 |
|
Changes were required in the machine properties to correctly |
873 |
|
categorize trap instructions. There is an MLRISC flag |
874 |
|
"weighted-block-placement" that can be used to enable weighted block |
875 |
|
placement, but this will be ineffective without block/edge |
876 |
|
frequencies (coming soon). |
877 |
|
|
878 |
|
|
879 |
|
---------------------------------------------------------------------- |
880 |
|
Name: Lal George |
881 |
|
Date: 2002/03/05 17:24:48 EST |
882 |
|
Tag: george-20020305-linkage-cluster |
883 |
|
|
884 |
|
In order to support the block placement optimization, a new cluster |
885 |
|
is generated as the very first cluster (called the linkage cluster). |
886 |
|
It contains a single jump to the 'real' entry point for the compilation |
887 |
|
unit. Block placement has no effect on the linkage cluster itself, but |
888 |
|
all the other clusters have full freedom in the manner in which they |
889 |
|
reorder blocks or functions. |
890 |
|
|
891 |
|
On the x86 the typical linkage code that is generated is: |
892 |
|
---------------------- |
893 |
|
.align 2 |
894 |
|
L0: |
895 |
|
addl $L1-L0, 72(%esp) |
896 |
|
jmp L1 |
897 |
|
|
898 |
|
|
899 |
|
.align 2 |
900 |
|
L1: |
901 |
|
---------------------- |
902 |
|
|
903 |
|
72(%esp) is the memory location for the stdlink register. This |
904 |
|
must contain the address of the CPS function being called. In the |
905 |
|
above example, it contains the address of L0; before |
906 |
|
calling L1 (the real entry point for the compilation unit), it |
907 |
|
must contain the address for L1, and hence |
908 |
|
|
909 |
|
addl $L1-L0, 72(%esp) |
910 |
|
|
911 |
|
I have tested this on all architectures except the hppa.The increase |
912 |
|
in code size is of course negligible |
913 |
|
|
914 |
|
---------------------------------------------------------------------- |
915 |
|
Name: Allen Leung |
916 |
|
Date: 2002/03/03 13:20:00 EST |
917 |
|
Tag: leunga-20020303-mlrisc-tools |
918 |
|
|
919 |
|
Added #[ ... ] expressions to mlrisc tools |
920 |
|
|
921 |
|
---------------------------------------------------------------------- |
922 |
|
Name: Matthias Blume |
923 |
|
Date: 2002/02/27 12:29:00 EST |
924 |
|
Tag: blume-20020227-cdebug |
925 |
|
Description: |
926 |
|
|
927 |
|
- made types in structure C and C_Debug to be equal |
928 |
|
- got rid of code duplication (c-int.sml vs. c-int-debug.sml) |
929 |
|
- there no longer is a C_Int_Debug (C_Debug is directly derived from C) |
930 |
|
|
931 |
|
---------------------------------------------------------------------- |
932 |
|
Name: Matthias Blume |
933 |
|
Date: 2002/02/26 12:00:00 EST |
934 |
|
Tag: blume-20020226-ffi |
935 |
|
Description: |
936 |
|
|
937 |
|
1. Fixed a minor bug in CM's "noweb" tool: |
938 |
|
If numbering is turned off, then truly don't number (i.e., do not |
939 |
|
supply the -L option to noweb). The previous behavior was to supply |
940 |
|
-L'' -- which caused noweb to use the "default" line numbering scheme. |
941 |
|
Thanks to Chris Richards for pointing this out (and supplying the fix). |
942 |
|
|
943 |
|
2. Once again, I reworked some aspects of the FFI: |
944 |
|
|
945 |
|
A. The incomplete/complete type business: |
946 |
|
|
947 |
|
- Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are |
948 |
|
gone! |
949 |
|
- ML types representing an incomplete type are now *equal* to |
950 |
|
ML types representing their corresponding complete types (just like |
951 |
|
in C). This is still safe because ml-nlffigen will not generate |
952 |
|
RTTI for incomplete types, nor will it generate functions that |
953 |
|
require access to such RTTI. But when ML code generated from both |
954 |
|
incomplete and complete versions of the C type meet, the ML types |
955 |
|
are trivially interoperable. |
956 |
|
|
957 |
|
NOTE: These changes restore the full generality of the translation |
958 |
|
(which was previously lost when I eliminated functorization)! |
959 |
|
|
960 |
|
B. Enum types: |
961 |
|
|
962 |
|
- Structure C now has a type constructor "enum" that is similar to |
963 |
|
how the "su" constructor works. However, "enum" is not a phantom |
964 |
|
type because each "T enum" has values (and is isomorphic to |
965 |
|
MLRep.Signed.int). |
966 |
|
- There are generic access operations for enum objects (using |
967 |
|
MLRep.Signed.int). |
968 |
|
- ml-nlffigen will generate a structure E_foo for each "enum foo". |
969 |
|
* The structure contains the definition of type "mlrep" (the ML-side |
970 |
|
representation type of the enum). Normally, mlrep is the same |
971 |
|
as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec", |
972 |
|
then mlrep will be defined as a datatype -- thus facilitating |
973 |
|
pattern matching on mlrep values. |
974 |
|
("-ec" will be suppressed if there are duplicate values in an |
975 |
|
enumeration.) |
976 |
|
* Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep |
977 |
|
will be generated for each C enum constant xxx. |
978 |
|
* Conversion functions m2i and i2m convert between mlrep and |
979 |
|
MLRep.Signed.int. (Without "-ec", these functions are identities.) |
980 |
|
* Coversion functions c and ml convert between mlrep and "tag enum". |
981 |
|
* Access functions (get/set) fetch and store mlrep values. |
982 |
|
- By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed |
983 |
|
enumerations are merged into one single enumeration represented by |
984 |
|
structure E_'. |
985 |
|
|
986 |
|
---------------------------------------------------------------------- |
987 |
|
Name: Allen Leung |
988 |
|
Date: 2002/02/25 04:45:00 EST |
989 |
|
Tag: leunga-20020225-cps-spill |
990 |
|
|
991 |
|
This is a new implementation of the CPS spill phase. |
992 |
|
The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml |
993 |
|
In case of problems, replace it with the old file spill.sml |
994 |
|
|
995 |
|
The current compiler runs into some serious performance problems when |
996 |
|
constructing a large record. This can happen when we try to compile a |
997 |
|
structure with many items. Even a very simple structure like the following |
998 |
|
makes the compiler slow down. |
999 |
|
|
1000 |
|
structure Foo = struct |
1001 |
|
val x_1 = 0w1 : Word32.int |
1002 |
|
val x_2 = 0w2 : Word32.int |
1003 |
|
val x_3 = 0w3 : Word32.int |
1004 |
|
... |
1005 |
|
val x_N = 0wN : Word32.int |
1006 |
|
end |
1007 |
|
|
1008 |
|
The following table shows the compile time, from N=1000 to N=4000, |
1009 |
|
with the old compiler: |
1010 |
|
|
1011 |
|
N |
1012 |
|
1000 CPS 100 spill 0.04u 0.00s 0.00g |
1013 |
|
MLRISC ra 0.06u 0.00s 0.05g |
1014 |
|
(spills = 0 reloads = 0) |
1015 |
|
TOTAL 0.63u 0.07s 0.21g |
1016 |
|
|
1017 |
|
1100 CPS 100 spill 8.25u 0.32s 0.64g |
1018 |
|
MLRISC ra 5.68u 0.59s 3.93g |
1019 |
|
(spills = 0 reloads = 0) |
1020 |
|
TOTAL 14.71u 0.99s 4.81g |
1021 |
|
|
1022 |
|
1500 CPS 100 spill 58.55u 2.34s 1.74g |
1023 |
|
MLRISC ra 5.54u 0.65s 3.91g |
1024 |
|
(spills = 543 reloads = 1082) |
1025 |
|
TOTAL 65.40u 3.13s 6.00g |
1026 |
|
|
1027 |
|
2000 CPS 100 spill 126.69u 4.84s 3.08g |
1028 |
|
MLRISC ra 0.80u 0.10s 0.55g |
1029 |
|
(spills = 42 reloads = 84) |
1030 |
|
TOTAL 129.42u 5.10s 4.13g |
1031 |
|
|
1032 |
|
3000 CPS 100 spill 675.59u 19.03s 11.64g |
1033 |
|
MLRISC ra 2.69u 0.27s 1.38g |
1034 |
|
(spills = 62 reloads = 124) |
1035 |
|
TOTAL 682.48u 19.61s 13.99g |
1036 |
|
|
1037 |
|
4000 CPS 100 spill 2362.82u 56.28s 43.60g |
1038 |
|
MLRISC ra 4.96u 0.27s 2.72g |
1039 |
|
(spills = 85 reloads = 170) |
1040 |
|
TOTAL 2375.26u 57.21s 48.00g |
1041 |
|
|
1042 |
|
As you can see the old cps spill module suffers from some serious |
1043 |
|
performance problem. But since I cannot decipher the old code fully, |
1044 |
|
instead of patching the problems up, I'm reimplementing it |
1045 |
|
with a different algorithm. The new code is more modular, |
1046 |
|
smaller when compiled, and substantially faster |
1047 |
|
(O(n log n) time and O(n) space). Timing of the new spill module: |
1048 |
|
|
1049 |
|
4000 CPS 100 spill 0.02u 0.00s 0.00g |
1050 |
|
MLRISC ra 0.25u 0.02s 0.15g |
1051 |
|
(spills=1 reloads=3) |
1052 |
|
TOTAL 7.74u 0.34s 1.62g |
1053 |
|
|
1054 |
|
Implementation details: |
1055 |
|
|
1056 |
|
As far as I can tell, the purpose of the CPS spill module is to make sure the |
1057 |
|
number of live variables at any program point (the bandwidth) |
1058 |
|
does not exceed a certain limit, which is determined by the |
1059 |
|
size of the spill area. |
1060 |
|
|
1061 |
|
When the bandwidth is too large, we decrease the register pressure by |
1062 |
|
packing live variables into spill records. How we achieve this is |
1063 |
|
completely different than what we did in the old code. |
1064 |
|
|
1065 |
|
First, there is something about the MLRiscGen code generator |
1066 |
|
that we should be aware of: |
1067 |
|
|
1068 |
|
o MLRiscGen performs code motion! |
1069 |
|
|
1070 |
|
In particular, it will move floating point computations and |
1071 |
|
address computations involving only the heap pointer to |
1072 |
|
their use sites (if there is only a single use). |
1073 |
|
What this means is that if we have a CPS record construction |
1074 |
|
statement |
1075 |
|
|
1076 |
|
RECORD(k,vl,w,e) |
1077 |
|
|
1078 |
|
we should never count the new record address w as live if w |
1079 |
|
has only one use (which is often the case). |
1080 |
|
|
1081 |
|
We should do something similar to floating point, but the transformation |
1082 |
|
there is much more complex, so I won't deal with that. |
1083 |
|
|
1084 |
|
Secondly, there are now two new cps primops at our disposal: |
1085 |
|
|
1086 |
|
1. rawrecord of record_kind option |
1087 |
|
This pure operator allocates some uninitialized storage from the heap. |
1088 |
|
There are two forms: |
1089 |
|
|
1090 |
|
rawrecord NONE [INT n] allocates a tagless record of length n |
1091 |
|
rawrecord (SOME rk) [INT n] allocates a tagged record of length n |
1092 |
|
and initializes the tag. |
1093 |
|
|
1094 |
|
2. rawupdate of cty |
1095 |
|
rawupdate cty (v,i,x) |
1096 |
|
Assigns to x to the ith component of record v. |
1097 |
|
The storelist is not updated. |
1098 |
|
|
1099 |
|
We use these new primops for both spilling and increment record construction. |
1100 |
|
|
1101 |
|
1. Spilling. |
1102 |
|
|
1103 |
|
This is implemented with a linear scan algorithm (but generalized |
1104 |
|
to trees). The algorithm will create a single spill record at the |
1105 |
|
beginning of the cps function and use rawupdate to spill to it, |
1106 |
|
and SELECT or SELp to reload from it. So both spills and reloads |
1107 |
|
are fine-grain operations. In contrast, in the old algorithm |
1108 |
|
"spills" have to be bundled together in records. |
1109 |
|
|
1110 |
|
Ideally, we should sink the spill record construction to where |
1111 |
|
it is needed. We can even split the spill record into multiple ones |
1112 |
|
at the places where they are needed. But CPS is not a good |
1113 |
|
representation for global code motion, so I'll keep it simple and |
1114 |
|
am not attempting this. |
1115 |
|
|
1116 |
|
2. Incremental record construction (aka record splitting). |
1117 |
|
|
1118 |
|
Long records with many component values which are simulatenously live |
1119 |
|
(recall that single use record addresses are not considered to |
1120 |
|
be live) are constructed with rawrecord and rawupdate. |
1121 |
|
We allocate space on the heap with rawrecord first, then gradually |
1122 |
|
fill it in with rawupdate. This is the technique suggested to me |
1123 |
|
by Matthias. |
1124 |
|
|
1125 |
|
Some restrictions on when this is applicable: |
1126 |
|
1. It is not a VECTOR record. The code generator currently does not handle |
1127 |
|
this case. VECTOR record uses double indirection like arrays. |
1128 |
|
2. All the record component values are defined in the same "basic block" |
1129 |
|
as the record constructor. This is to prevent speculative |
1130 |
|
record construction. |
1131 |
|
|
1132 |
|
---------------------------------------------------------------------- |
1133 |
|
Name: Allen Leung |
1134 |
|
Date: 2002/02/22 01:02:00 EST |
1135 |
|
Tag: leunga-20020222-mlrisc-tools |
1136 |
|
|
1137 |
|
Minor bug fixes in the parser and rewriter |
1138 |
|
|
1139 |
|
---------------------------------------------------------------------- |
1140 |
|
Name: Allen Leung |
1141 |
|
Date: 2002/02/21 20:20:00 EST |
1142 |
|
Tag: leunga-20020221-peephole |
1143 |
|
|
1144 |
|
Regenerated the peephole files. Some contained typos in the specification |
1145 |
|
and some didn't compile because of pretty printing bugs in the old version |
1146 |
|
of 'nowhere'. |
1147 |
|
|
1148 |
|
---------------------------------------------------------------------- |
1149 |
|
Name: Allen Leung |
1150 |
|
Date: 2002/02/19 20:20:00 EST |
1151 |
|
Tag: leunga-20020219-mlrisc-tools |
1152 |
|
Description: |
1153 |
|
|
1154 |
|
Minor bug fixes to the mlrisc-tools library: |
1155 |
|
|
1156 |
|
1. Fixed up parsing colon suffixed keywords |
1157 |
|
2. Added the ability to shut the error messages up |
1158 |
|
3. Reimplemented the pretty printer and fixed up/improved |
1159 |
|
the pretty printing of handle and -> types. |
1160 |
|
4. Fixed up generation of literal symbols in the nowhere tool. |
1161 |
|
5. Added some SML keywords to to sml.sty |
1162 |
|
|
1163 |
|
---------------------------------------------------------------------- |
1164 |
|
Name: Matthias Blume |
1165 |
|
Date: 2002/02/19 16:20:00 EST |
1166 |
|
Tag: blume-20020219-cmffi |
1167 |
|
Description: |
1168 |
|
|
1169 |
|
A wild mix of changes, some minor, some major: |
1170 |
|
|
1171 |
|
* All C FFI-related libraries are now anchored under $c: |
1172 |
|
$/c.cm --> $c/c.cm |
1173 |
|
$/c-int.cm --> $c/internals/c-int.cm |
1174 |
|
$/memory.cm --> $c/memory/memory.cm |
1175 |
|
|
1176 |
|
* "make" tool (in CM) now treats its argument pathname slightly |
1177 |
|
differently: |
1178 |
|
1. If the native expansion is an absolute name, then before invoking |
1179 |
|
the "make" command on it, CM will apply OS.Path.mkRelative |
1180 |
|
(with relativeTo = OS.FileSys.getDir()) to it. |
1181 |
|
2. The argument will be passed through to subsequent phases of CM |
1182 |
|
processing without "going native". In particular, if the argument |
1183 |
|
was an anchored path, then "make" will not lose track of that anchor. |
1184 |
|
|
1185 |
|
* Compiler backends now "know" their respective C calling conventions |
1186 |
|
instead of having to be told about it by ml-nlffigen. This relieves |
1187 |
|
ml-nlffigen from one of its burdens. |
1188 |
|
|
1189 |
|
* The X86Backend has been split into X86CCallBackend and X86StdCallBackend. |
1190 |
|
|
1191 |
|
* Export C_DEBUG and C_Debug from $c/c.cm. |
1192 |
|
|
1193 |
|
* C type encoding in ml-nlffi-lib has been improved to model the conceptual |
1194 |
|
subtyping relationship between incomplete pointers and their complete |
1195 |
|
counterparts. For this, ('t, 'c) ptr has been changed to 'o ptr -- |
1196 |
|
with the convention of instantiating 'o with ('t, 'c) obj whenever |
1197 |
|
the pointer target type is complete. In the incomplete case, 'o |
1198 |
|
will be instantiated with some "'c iobj" -- a type obtained by |
1199 |
|
using one of the functors PointerToIncompleteType or PointerToCompleteType. |
1200 |
|
|
1201 |
|
Operations that work on both incomplete and complete pointer types are |
1202 |
|
typed as taking an 'o ptr while operations that require the target to |
1203 |
|
be known are typed as taking some ('t, 'c) obj ptr. |
1204 |
|
|
1205 |
|
voidptr is now a bit "more concrete", namely "type voidptr = void ptr'" |
1206 |
|
where void is an eqtype without any values. This makes it possible |
1207 |
|
to work on voidptr values using functions meant to operate on light |
1208 |
|
incomplete pointers. |
1209 |
|
|
1210 |
|
* As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has |
1211 |
|
been vastly simplified. |
1212 |
|
|
1213 |
|
---------------------------------------------------------------------- |
1214 |
|
Name: Matthias Blume |
1215 |
|
Date: 2002/02/19 10:48:00 EST |
1216 |
|
Tag: blume-20020219-pqfix |
1217 |
|
Description: |
1218 |
|
|
1219 |
|
Applied Chris Okasaki's bug fix for priority queues. |
1220 |
|
|
1221 |
|
---------------------------------------------------------------------- |
1222 |
|
Name: Matthias Blume |
1223 |
|
Date: 2002/02/15 17:05:00 |
1224 |
|
Tag: Release_110_39 |
1225 |
|
Description: |
1226 |
|
|
1227 |
|
Last-minute retagging is becoming a tradition... :-( |
1228 |
|
|
1229 |
|
This is the working release 110.39. |
1230 |
|
|
1231 |
|
---------------------------------------------------------------------- |
1232 |
|
Name: Matthias Blume |
1233 |
|
Date: 2002/02/15 16:00:00 EST |
1234 |
|
Tag: Release_110_39-orig |
1235 |
|
Description: |
1236 |
|
|
1237 |
|
Working release 110.39. New bootfiles. |
1238 |
|
|
1239 |
|
(Update: There was a small bug in the installer so it wouldn't work |
1240 |
|
with all shells. So I retagged. -Matthias) |
1241 |
|
|
1242 |
|
---------------------------------------------------------------------- |
1243 |
|
Name: Matthias Blume |
1244 |
|
Date: 2002/02/15 14:17:00 EST |
1245 |
|
Tag: blume-20020215-showbindings |
1246 |
|
Description: |
1247 |
|
|
1248 |
|
Added EnvRef.listBoundSymbols and CM.State.showBindings. Especially |
1249 |
|
the latter can be useful for exploring what bindings are available at |
1250 |
|
the interactive prompt. (The first function returns only the list |
1251 |
|
of symbols that are really bound, the second prints those but also the |
1252 |
|
ones that CM's autoloading mechanism knows about.) |
1253 |
|
|
1254 |
|
---------------------------------------------------------------------- |
1255 |
|
Name: Matthias Blume |
1256 |
|
Date: 2002/02/15 12:08:00 EST |
1257 |
|
Tag: blume-20020215-iptrs |
1258 |
|
Description: |
1259 |
|
|
1260 |
|
Two improvements to ml-nlffigen: |
1261 |
|
|
1262 |
|
1. Write files only if they do not exist or if their current contents |
1263 |
|
do not coincide with what's being written. (That is, avoid messing |
1264 |
|
with the time stamps unless absolutely necessary.) |
1265 |
|
|
1266 |
|
2. Implement a "repository" mechanism for generated files related |
1267 |
|
to "incomplete pointer types". See the README file for details. |
1268 |
|
|
1269 |
|
---------------------------------------------------------------------- |
1270 |
|
Name: Matthias Blume |
1271 |
|
Date: 2002/02/14 11:50:00 EST |
1272 |
|
Tag: blume-20020214-quote |
1273 |
|
Description: |
1274 |
|
|
1275 |
|
Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm). This is required |
1276 |
|
because of the new and improved tag generation scheme. (Thanks to Allen |
1277 |
|
Leung for pointing it out.) |
1278 |
|
|
1279 |
|
---------------------------------------------------------------------- |
1280 |
|
Name: Lal George |
1281 |
|
Date: 2002/02/14 09:55:27 EST 2002 |
1282 |
|
Tag: george-20020214-isabelle-bug |
1283 |
|
Description: |
1284 |
|
|
1285 |
|
Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation |
1286 |
|
of Isabelle on the x86. |
1287 |
|
|
1288 |
|
From Allen: |
1289 |
|
----------- |
1290 |
|
I've found the problem: |
1291 |
|
|
1292 |
|
in ra-core.sml, I use the counter "blocked" to keep track of the |
1293 |
|
true number of elements in the freeze queue. When the counter goes |
1294 |
|
to zero, I skip examining the queue. But I've messed up the |
1295 |
|
bookkeeping in combine(): |
1296 |
|
|
1297 |
|
else (); |
1298 |
|
case !ucol of |
1299 |
|
PSEUDO => (if !cntv > 0 then |
1300 |
|
(if !cntu > 0 then blocked := !blocked - 1 else (); |
1301 |
|
^^^^^^^^^^^^^^^^^^^^^^^ |
1302 |
|
moveu := mergeMoveList(!movev, !moveu) |
1303 |
|
) |
1304 |
|
else (); |
1305 |
|
|
1306 |
|
combine() is called to coalesce two nodes u and v. |
1307 |
|
I think I was thinking that if the move counts of u and v are both |
1308 |
|
greater than zero then after they are coalesced then one node is |
1309 |
|
removed from the freeze queue. Apparently I was thinking that |
1310 |
|
both u and v are of low degree, but that's clearly not necessarily true. |
1311 |
|
|
1312 |
|
|
1313 |
|
02/12/2002: |
1314 |
|
Here's the patch. HOL now compiles. |
1315 |
|
|
1316 |
|
I don't know how this impact on performance (compile |
1317 |
|
time or runtime). This bug caused the RA (especially on the x86) |
1318 |
|
to go thru the potential spill phase when there are still nodes on the |
1319 |
|
freeze queue. |
1320 |
|
|
1321 |
|
|
1322 |
|
|
1323 |
|
|
1324 |
|
---------------------------------------------------------------------- |
1325 |
|
Name: Matthias Blume |
1326 |
|
Date: 2002/02/13 22:40:00 EST |
1327 |
|
Tag: blume-20020213-fptr-rtti |
1328 |
|
Description: |
1329 |
|
|
1330 |
|
Fixed a bug in ml-nlffigen that was introduced with one of the previous |
1331 |
|
updates. |
1332 |
|
|
1333 |
|
---------------------------------------------------------------------- |
1334 |
|
Name: Matthias Blume |
1335 |
|
Date: 2002/02/13 16:41:00 EST |
1336 |
|
Tag: blume-20020213-cmlpq |
1337 |
|
Description: |
1338 |
|
|
1339 |
|
Added new priority queue export symbols (which have just been added to |
1340 |
|
smlnj-lib.cm) to CML's version of smlnj-lib.cm. (Otherwise CML would |
1341 |
|
not compile and the installer would choke.) |
1342 |
|
|
1343 |
|
---------------------------------------------------------------------- |
1344 |
|
Name: Matthias Blume |
1345 |
|
Date: 2002/02/13 16:15:00 EST |
1346 |
|
Tag: blume-20020213-various |
1347 |
|
Description: |
1348 |
|
|
1349 |
|
1. More tweaks to ml-nlffigen: |
1350 |
|
|
1351 |
|
- better internal datastructures (resulting in slight speedup) |
1352 |
|
- "-match" option requires exact match |
1353 |
|
- "localized" gensym counters (untagged structs/unions nested within |
1354 |
|
other structs/unions or within typedefs get a fresh counter; their |
1355 |
|
tag will be prefixed by a concatenation of their parents' tags) |
1356 |
|
- bug fixes (related to calculation of transitive closure of types |
1357 |
|
to be included in the output) |
1358 |
|
|
1359 |
|
2. Minor Basis updates: |
1360 |
|
|
1361 |
|
- added implementations for List.collate and Option.app |
1362 |
|
|
1363 |
|
---------------------------------------------------------------------- |
1364 |
|
Name: Matthias Blume |
1365 |
|
Date: 2002/02/11 15:55:00 EST |
1366 |
|
Tag: blume-20020211-gensym |
1367 |
|
Description: |
1368 |
|
|
1369 |
|
Added a "-gensym" option to command line of ml-nlffigen. This can be |
1370 |
|
used to specify a "stem" -- a string that is inserted in all "gensym'd" |
1371 |
|
names (ML structure names that correspond to unnamed C structs, unions, |
1372 |
|
and enums), so that separate runs of ml-nlffigen do not clash. |
1373 |
|
|
1374 |
|
---------------------------------------------------------------------- |
1375 |
|
Name: Matthias Blume |
1376 |
|
Date: 2002/02/11 12:05:00 EST |
1377 |
|
Tag: blume-20020211-gensml |
1378 |
|
Description: |
1379 |
|
|
1380 |
|
A quick fix for a problem with GenSML (in the pgraph-util library): |
1381 |
|
Make generation of toplevel "local" optional. (Strictly speaking, |
1382 |
|
signature definitions within "local" are not legal SML.) |
1383 |
|
|
1384 |
|
Other than that: updates to INSTALL and cm/TODO. |
1385 |
|
|
1386 |
|
---------------------------------------------------------------------- |
1387 |
|
Name: Matthias Blume |
1388 |
|
Date: 2002/02/08 15:00:00 EST |
1389 |
|
Tag: blume-20020208-uniquepid |
1390 |
|
Description: |
1391 |
|
|
1392 |
|
0. Version number has been bumped to 110.38.1. NEW BOOTFILES!!! |
1393 |
|
|
1394 |
|
1. The installer (config/install.sh) has gotten smarter: |
1395 |
|
|
1396 |
|
- Configuration options are a bit easier to specify now |
1397 |
|
(in config/targets). |
1398 |
|
- Bug in recognizing .tar.bz2 files fixed. |
1399 |
|
- Installer automatically resolves dependencies between |
1400 |
|
configuration options (e.g., if you ask for eXene, you will |
1401 |
|
also get cml -- regardless whether you asked for it or not). |
1402 |
|
- Installer can run in "quieter mode" by setting the environment |
1403 |
|
variable INSTALL_QUIETLY to "true". "Quieter" does not mean |
1404 |
|
"completely silent", though. |
1405 |
|
- Build HashCons library as part of smlnj-lib. |
1406 |
|
|
1407 |
|
2. A new scheme for assigning persistent identifiers to compilation |
1408 |
|
units (and, by extension, to types etc.) has been put into place. |
1409 |
|
This fixes a long-standing bug where types and even dynamic values |
1410 |
|
can get internally confused, thereby compromising type safety |
1411 |
|
(abstraction) and dynamic correctness. See |
1412 |
|
|
1413 |
|
http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz |
1414 |
|
|
1415 |
|
for an example of how things could go wrong until now. |
1416 |
|
|
1417 |
|
The downside of the new scheme is that pids are not quite as |
1418 |
|
persistent as they used to be: CM will generate a fresh pid |
1419 |
|
for every compilation unit that it thinks it sees for the first |
1420 |
|
time. That means that if you compile starting from a clean, fresh |
1421 |
|
source tree at two different times, you end up with different |
1422 |
|
binaries. |
1423 |
|
|
1424 |
|
Cutoff recompilation, however, has not been compromised because |
1425 |
|
CM keeps pid information in special caches between runs. |
1426 |
|
|
1427 |
|
---------------------------------------------------------------------- |
1428 |
|
Name: Lal George |
1429 |
|
Date: 2002/02/07 15:34:13 EST 2002 |
1430 |
|
Tag: <none> |
1431 |
|
Description: |
1432 |
|
|
1433 |
|
Compilers that generate assembly code may produce global labels |
1434 |
|
whose value is resolved at link time. The various peephole optimization |
1435 |
|
modules did not take this in account. |
1436 |
|
|
1437 |
|
TODO. The Labels.addrOf function should really return an option |
1438 |
|
type so that clients are forced to deal with this issue, rather |
1439 |
|
than an exception being raised. |
1440 |
|
|
1441 |
|
---------------------------------------------------------------------- |
1442 |
|
Name: Lal George |
1443 |
|
Date: 2002/02/06 13:55:02 EST |
1444 |
|
Tag: george-20020206-ra-breakup |
1445 |
|
Description: |
1446 |
|
|
1447 |
|
1. A bug fix from Allen. |
1448 |
|
|
1449 |
|
A typo causes extra fstp %st(0)'s to be generated at compensation |
1450 |
|
edges, which might cause stack underflow traps at runtime. This |
1451 |
|
occurs in fft where there are extraneous fstps right before the 'into' |
1452 |
|
trap instruction (in this case they are harmless since none of the |
1453 |
|
integers overflow.) |
1454 |
|
|
1455 |
|
2. Pulled out various utility modules that were embedded in the modules |
1456 |
|
of the register allocator. I need these modules for other purposes, but |
1457 |
|
they are not complete enough to put into a library (just yet). |
1458 |
|
---------------------------------------------------------------------- |
1459 |
|
Name: Matthias Blume |
1460 |
|
Date: 2002/01/31 16:05:00 EST |
1461 |
|
Tag: blume-20020131-sparc-ccalls |
1462 |
|
Description: |
1463 |
|
|
1464 |
|
1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes) |
1465 |
|
of extra stack space by mistake. Fixed. |
1466 |
|
|
1467 |
|
2. Bug in logic of handling of command-line options in ml-nlffigen fixed. |
1468 |
|
|
1469 |
|
---------------------------------------------------------------------- |
1470 |
|
Name: Allen Leung |
1471 |
|
Date: 2002/01/30 |
1472 |
|
Tag: leunga-20020130-nowhere-bug-fix |
1473 |
|
Description: |
1474 |
|
|
1475 |
|
MLRISC bug fixes: |
1476 |
|
1. Fixed a bindings computation bug in the 'nowhere' program generator tool. |
1477 |
|
2. MachineInt.fromString was negating its value. |
1478 |
|
|
1479 |
|
---------------------------------------------------------------------- |
1480 |
|
Name: Matthias Blume |
1481 |
|
Date: 2002/01/29 |
1482 |
|
Tag: blume-20020129-INSTALL |
1483 |
|
Description: |
1484 |
|
|
1485 |
|
- Added somewhat detailed installation instructions (file INSTALL). |
1486 |
|
- Fixed curl-detection bug in config/install.sh. |
1487 |
|
- It is now possible to select the URL getter using the URLGETTER |
1488 |
|
environment variable: |
1489 |
|
|
1490 |
|
not set / "unknown" --> automatic detection (script tries wget, |
1491 |
|
curl, and lynx) |
1492 |
|
"wget" / "curl" / "lynx" --> use the specified program (script "knows" |
1493 |
|
how to properly invoke them) |
1494 |
|
other --> use $URLGETTER directly, it must take |
1495 |
|
precisely two command-line arguments |
1496 |
|
(source URL and destination file name) |
1497 |
|
|
1498 |
|
---------------------------------------------------------------------- |
1499 |
|
Name: Matthias Blume |
1500 |
|
Date: 2002/01/28 |
1501 |
|
Tag: blume-20020128-sparc-ccalls |
1502 |
|
Description: |
1503 |
|
|
1504 |
|
- Fixed problem with calculation of "used" registers in sparc-c-calls. |
1505 |
|
- Make use of the allocParam argument in sparc-c-calls. |
1506 |
|
|
1507 |
|
---------------------------------------------------------------------- |
1508 |
|
Name: Matthias Blume |
1509 |
|
Date: 2002/01/28 |
1510 |
|
Tag: blume-20020128-allocParam |
1511 |
|
Description: |
1512 |
|
|
1513 |
|
John Reppy: Changes c-calls API to accept client-callback for |
1514 |
|
allocating extra stack space. |
1515 |
|
me: Corresponding changes to mlriscGen (using a dummy argument that |
1516 |
|
does not change the current behavior). |
1517 |
|
|
1518 |
|
---------------------------------------------------------------------- |
1519 |
|
Name: Matthias Blume |
1520 |
|
Date: 2002/01/28 12:00:00 |
1521 |
|
Tag: Release_110_38 |
1522 |
|
Description: |
1523 |
|
|
1524 |
|
This time for real!!! |
1525 |
|
|
1526 |
|
---------------------------------------------------------------------- |
1527 |
|
Name: Matthias Blume |
1528 |
|
Date: 2002/01/28 10:56:00 EST |
1529 |
|
Tag: blume-20020128-retraction |
1530 |
|
Description: |
1531 |
|
|
1532 |
|
0. Retracted earlier 110.38. (The Release_110_38 tag has been replaced |
1533 |
|
with blume-Release_110_38-retracted.) |
1534 |
|
|
1535 |
|
1. Fixed a problem with incorrect rounding modes in real64.sml. |
1536 |
|
(Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.) |
1537 |
|
|
1538 |
|
2. A bug in ml-nlffigen related to the handling of unnamed structs, unions, |
1539 |
|
and enums fixed. The naming of corresponding ML identifiers should |
1540 |
|
now be consistent again. |
1541 |
|
|
1542 |
|
---------------------------------------------------------------------- |
1543 |
|
Name: Allen Leung |
1544 |
|
Date: 2002/01/27 |
1545 |
|
Tag: leunga-20020127-nowhere |
1546 |
|
Description: |
1547 |
|
|
1548 |
|
Added a target called nowhere in the configuration scripts. |
1549 |
|
Enabling this will build the MLRISC 'nowhere' tool (for translating |
1550 |
|
programs with where-clauses into legal SML code) during installation. |
1551 |
|
|
1552 |
|
---------------------------------------------------------------------- |
1553 |
|
Name: Matthias Blume |
1554 |
|
Date: 2002/01/25 21:27:00 EST |
1555 |
|
Tag: blume-Release_110_38-retracted |
1556 |
|
Description: |
1557 |
|
|
1558 |
|
Call it a (working) release! Version is 110.38. Bootfiles are ready. |
1559 |
|
|
1560 |
|
README will be added later. |
1561 |
|
|
1562 |
|
!!! NOTE: Re-tagged as blume-Release_110_38-retracted. Original tag |
1563 |
|
(Release_110_38) removed. Reason: Last-minute bug fixes. |
1564 |
|
|
1565 |
|
---------------------------------------------------------------------- |
1566 |
|
Name: Matthias Blume |
1567 |
|
Date: 2002/01/25 |
1568 |
|
Tag: blume-20020125-ffi |
1569 |
|
Description: |
1570 |
|
|
1571 |
|
A large number of tweaks and improvements to ml-nlffi-lib and |
1572 |
|
ml-nlffigen: |
1573 |
|
|
1574 |
|
- ML represenation types have been streamlined |
1575 |
|
- getter and setter functions work with concrete values, not abstract |
1576 |
|
ones where possible |
1577 |
|
- ml-nlffigen command line more flexible (see README file there) |
1578 |
|
- some bugs have been fixed (hopefully) |
1579 |
|
|
1580 |
|
---------------------------------------------------------------------- |
1581 |
|
Name: Lal George |
1582 |
|
Date: 2002/01/24 |
1583 |
|
Tag: george-20020124-risc-ra-interface |
1584 |
|
Description: |
1585 |
|
|
1586 |
|
There is a dramatic simplification in the interface to the |
1587 |
|
register allocator for RISC architectures as a result of making |
1588 |
|
parallel copy instructions explicit. |
1589 |
|
|
1590 |
|
---------------------------------------------------------------------- |
1591 |
|
Name: Matthias Blume |
1592 |
|
Date: 2002/01/22 |
1593 |
|
Tag: blume-20020122-x86-ccalls |
1594 |
|
Description: |
1595 |
|
|
1596 |
|
Bug fix for c-calls on x86 (having to do with how char- and |
1597 |
|
short-arguments are being handled). |
1598 |
|
|
1599 |
|
---------------------------------------------------------------------- |
1600 |
|
Name: Matthias Blume |
1601 |
|
Date: 2002/01/21 |
1602 |
|
Tag: blume-20020121-ff |
1603 |
|
Description: |
1604 |
|
|
1605 |
|
Another day of fiddling with the FFI... |
1606 |
|
|
1607 |
|
1. Bug fix/workaround: CKIT does not complain about negative array |
1608 |
|
dimensions, so ml-nlffigen has to guard itself against this possibility. |
1609 |
|
(Otherwise a negative dimension would send it into an infinite loop.) |
1610 |
|
|
1611 |
|
2. Some of the abstract types (light objects, light pointers, most "base" |
1612 |
|
types) in structure C are now eqtypes. |
1613 |
|
|
1614 |
|
3. Added constructors and test functions for NULL function pointers. |
1615 |
|
|
1616 |
|
---------------------------------------------------------------------- |
1617 |
|
Name: Matthias Blume |
1618 |
|
Date: 2002/01/18 |
1619 |
|
Tag: blume-20020118-ready-for-new-release |
1620 |
|
Description: |
1621 |
|
|
1622 |
|
Made config/srcarchiveurl point to a new place. (Will provide boot |
1623 |
|
files shortly.) |
1624 |
|
|
1625 |
|
Maybe we christen this to be 110.38? |
1626 |
|
|
1627 |
|
---------------------------------------------------------------------- |
1628 |
|
Name: Matthias Blume |
1629 |
|
Date: 2002/01/18 |
1630 |
|
Tag: blume-20020118-more-ffifiddle |
1631 |
|
Description: |
1632 |
|
|
1633 |
|
Today's FFI fiddling: |
1634 |
|
|
1635 |
|
- Provided a structure CGetSet with "convenient" versions of C.Get.* and |
1636 |
|
C.Set.* that use concrete (MLRep.*) arguments and results instead |
1637 |
|
of abstract ones. |
1638 |
|
|
1639 |
|
- Provided word-style bit operations etc. for "int" representation |
1640 |
|
types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short, |
1641 |
|
and Long. |
1642 |
|
|
1643 |
|
---------------------------------------------------------------------- |
1644 |
|
Name: Matthias Blume |
1645 |
|
Date: 2002/01/18 |
1646 |
|
Tag: blume-20020118-use-x86-fp |
1647 |
|
Description: |
1648 |
|
|
1649 |
|
Now that x86-fast-fp seems to be working, I turned it back on again |
1650 |
|
by default. (Seems to work fine now, even with the FFI.) |
1651 |
|
|
1652 |
|
Other than that, I added some documentation about the FFI to |
1653 |
|
src/ml-nlffigen/README and updated the FFI test examples in |
1654 |
|
src/ml-nlffi-lib/Tests/*. |
1655 |
|
|
1656 |
|
---------------------------------------------------------------------- |
1657 |
|
Name: Allen Leung |
1658 |
|
Date: 2002/01/17 |
1659 |
|
Tag: leunga-20020117-x86-fast-fp-call |
1660 |
|
Description: |
1661 |
|
|
1662 |
|
1. Fixed a problem with handling return fp values when x86's fast fp |
1663 |
|
mode is turned on. |
1664 |
|
|
1665 |
|
2. Minor pretty printing fix for cellset. Print %st(0) as %st(0) instead |
1666 |
|
of %f32. |
1667 |
|
|
1668 |
|
3. Added a constructor INT32lit to the ast of MLRISC tools. |
1669 |
|
|
1670 |
|
---------------------------------------------------------------------- |
1671 |
|
Name: Matthias Blume |
1672 |
|
Date: 2002/01/16 |
1673 |
|
Tag: blume-20020116-ffifiddle |
1674 |
|
Description: |
1675 |
|
|
1676 |
|
More fiddling with the FFI interface: |
1677 |
|
|
1678 |
|
- Make constness 'c instead of rw wherever possible. This eliminates |
1679 |
|
the need for certain explicit coercions. (However, due to ML's |
1680 |
|
value polymorphism, there will still be many cases where explicit |
1681 |
|
coercions are necessary. Phantom types are not the whole answer |
1682 |
|
to modeling a subtyping relationship in ML.) |
1683 |
|
|
1684 |
|
- ro/rw coersions for pointers added. (Avoids the detour through */&.) |
1685 |
|
|
1686 |
|
- "printf" test example added to src/ml-nlffi-lib/Tests. (Demonstrates |
1687 |
|
clumsy workaround for varargs problem.) |
1688 |
|
|
1689 |
|
---------------------------------------------------------------------- |
1690 |
|
Name: Lal George |
1691 |
|
Date: 2002/01/15 |
1692 |
|
Tag: <none> |
1693 |
|
Description: |
1694 |
|
|
1695 |
|
1. Since COPY instructions are no longer native to the architecture, |
1696 |
|
a generic functor can be used to implement the expandCopies function. |
1697 |
|
|
1698 |
|
2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a |
1699 |
|
TEXT segment. |
1700 |
|
|
1701 |
|
---------------------------------------------------------------------- |
1702 |
|
Name: Matthias Blume |
1703 |
|
Date: 2002/01/15 |
1704 |
|
Tag: blume-20020115-ffiupdates |
1705 |
|
Description: |
1706 |
|
|
1707 |
|
1. Fix for bug resulting in single-precision float values being returned |
1708 |
|
incorrectly from FFI calls. |
1709 |
|
|
1710 |
|
2. Small modifications to C FFI API: |
1711 |
|
|
1712 |
|
- memory-allocation routines return straight objects (no options) |
1713 |
|
and raise an exception in out-of-memory situations |
1714 |
|
- unsafe extensions to cast between function pointers and pointers |
1715 |
|
from/to ints |
1716 |
|
- added structure C_Debug as an alternative to structure C where |
1717 |
|
pointer-dereferencing (|*| and |*!) always check for null-pointers |
1718 |
|
- added open_lib' to DynLinkage; open_lib' works like open_lib |
1719 |
|
but also takes a (possibly empty) list of existing library handles |
1720 |
|
that the current library depends on |
1721 |
|
|
1722 |
|
---------------------------------------------------------------------- |
1723 |
|
Name: Matthias Blume |
1724 |
|
Date: 2002/01/10 |
1725 |
|
Tag: blume-20020110-newffigen |
1726 |
|
Description: |
1727 |
|
|
1728 |
|
1. Updates to portable graph code. |
1729 |
|
|
1730 |
|
2. Major update to ml-nlffigen and ml-nlffi-lib. Things are much |
1731 |
|
more scalable now so that even huge interfaces such as the one |
1732 |
|
for GTK compile in finite time and space. :-) |
1733 |
|
See src/ml-nlffigen/README for details on what's new. |
1734 |
|
|
1735 |
|
---------------------------------------------------------------------- |
1736 |
|
Name: Lal George |
1737 |
|
Date: 2001/01/09 14:31:35 EST 2002 |
1738 |
|
Tag: george-20011206-rm-native-copy |
1739 |
|
Description: |
1740 |
|
|
1741 |
|
Removed the native COPY and FCOPY instructions |
1742 |
|
from all the architectures and replaced it with the |
1743 |
|
explicit COPY instruction from the previous commit. |
1744 |
|
|
1745 |
|
It is now possible to simplify many of the optimizations |
1746 |
|
modules that manipulate copies. This has not been |
1747 |
|
done in this change. |
1748 |
|
|
1749 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
1750 |
Name: Lal George |
Name: Lal George |
1751 |
Date: 2001/12/06 16:50:13 EST 2001 |
Date: 2001/12/06 16:50:13 EST 2001 |
2076 |
|
|
2077 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
2078 |
Name: Matthias Blume |
Name: Matthias Blume |
|
>>>>>>> 1.169 |
|
2079 |
Date: 2001/09/18 15:35:00 EDT |
Date: 2001/09/18 15:35:00 EDT |
2080 |
Tag: blume-20010918-readme11036 |
Tag: blume-20010918-readme11036 |
2081 |
Description: |
Description: |