[m-dev.] CTGC implementation, getting started (again)

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Dec 1 01:43:27 AEDT 2005


On Wed, 30 Nov 2005, Nancy wrote:

>
> Hi,
>
> I've started to dive into the Compile-Time Garbage Collection
> implementation, with the purpose of moving (at last) the reuse-branch
> unto the main branch of the compiler.
>
> In attachment a first diff and two new files, for which I've got some
> questions:
>
> 1. Historically, the analysis used to be inserted as a last step of the
> middle pass. In the current state of the different stages, this would
> mean right after stage 195 (eliminate dead procs).
> The main constraint which decides on the stage is that after structure
> reuse analysis, the goals within a procedure may not be reordered.
> Any objections?
>

No, there are no objections.  The middle passes that occur after stage 195
all have to do with the implementation of various types of profiling.
They tend to introduce all sorts of strangeness into the HLDS that makes
meaningful program analyses quite difficult.


> 2. CTGC needs two big analysis-steps: the structure sharing analysis,
> and the actual structure reuse analysis. This used to be seen as two
> different compilation stages. I would prefer to keep it that way, with
> the idea that the structure sharing analysis might serve other purposes
> as well?
> When kept as two fases, I need two "stage numbers"... 196a, 196b, or is
> it okay if I move 195 to become 194.
> Silly questions perhaps, but they have to be asked anyway...
>

The latter, we would like to avoid numbering schemes like 196a, 196b -
it's one of the reasons the stage numbering was changed.  Rather than
moving `dead_procs' to stage 194 I suggest you make it stage 192 as that
leaves us with a little more room.


> 3. Module naming. For the moment I've added a toplevel package
> "structure_sharing", with one module "structure_sharing.analysis"
> (filename structure_sharing.analysis.m). Yet, I see that the termination
> analysis is seen as a part of the transform_hlds package. Should I do
> the same for structure sharing? for reuse analysis? What are the views
> on this?
> So either:
> 	package structure_sharing
> 	package structure_reuse
> or:
> 	package transform_hlds.structure_sharing
> 	package transform_hlds.structure_reuse
> or even:
> 	package transform_hlds.CTGC
> 	and then
> 	package transform_hlds.CTGC.structure_sharing
> 	package transform_hlds.CTGC.structure_reuse
>

My preference would be for one of the latter two.  (In fact by
and large I would prefer the last one.)

Cheers,
Julien.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list