for review: layout structures for resumption points
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Mar 12 12:35:34 AEDT 1999
This is for review by Tyson, since he has already seen most of it.
Estimated hours taken: 10
Allow the native collector to work for nondet code, by generating layout
structures for the resumption points whose addresses can be put into
redoip slots in nondet stack frames.
If the program is compiled with both native gc and debugging, entries
to disjunctions will have two labels and two layout structures, one
for gc and one for the debugger. At the moment we make no attempt
to try to combine the two structures, since doing so would add significant
extra complexity. Optimizing this option combination will not be important
for a while yet anyway.
compiler/code_info.m:
Update the code that generates resume points to also optionally
generate layout structures for the stack labels.
compiler/disj_gen.m:
When we save the heap pointer, update not only the current code_info
but the saved code_info that represents the branch start position
as well, since the slot containing the saved heap pointer will be
live in each of the following disjuncts.
compiler/labelopt.m:
compiler/mercury_compile.m:
compiler/optimize.m:
compiler/value_number.m:
Arrange to pass the global_data structure to the label elimination
and value numbering passes. This is to (a) prevent the label
elimination pass from removing labels (e.g. stack resume labels)
that have layout structures, and (b) to prevent value numbering
for moving computations across such labels, since that would
invalidate the layout structure.
(The presence of pragma_c_code fragments in the generated code avoids
both these potential problems for layout structures that correspond
to trace events, but that solution would be suboptimal for resume
labels.)
compiler/hlds_module.m:
Add a utility predicate needed by optimize.m.
Zoltan.
More information about the developers
mailing list