

Estimated hours taken: 1
Branches: main

Preparations for starting the CTGC implementation within the main branch. 

mercury_compile.m:
options.m:
top_level.m:
transform_hlds.m:
	Add the necessary entries for performing the structure sharing
	analysis (as part of the CTGC system). 

ctgc.m
ctgc.structure_sharing.m
ctgc.structure_sharing.analysis.m
	New files. 



cvs server: Diffing .
cvs server: ctgc.m is a new entry, no comparison available
cvs server: ctgc.structure_sharing.analysis.m is a new entry, no comparison available
cvs server: ctgc.structure_sharing.m is a new entry, no comparison available
Index: mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.363
diff -n -r1.363 mercury_compile.m
a94 1
:- import_module transform_hlds.ctgc.structure_sharing.analysis.
d2395 1
a2395 4
    maybe_dump_hlds(!.HLDS, 192, "dead_procs", !DumpInfo, !IO),

    maybe_data_structure_sharing_analysis(Verbose, Stats, !HLDS, !IO), 
    maybe_dump_hlds(!.HLDS, 193, "structure_sharing", !DumpInfo, !IO), 
a3692 18
    ).

:- pred maybe_data_structure_sharing_analysis(bool::in, bool::in,
    module_info::in, module_info::out, io::di, io::uo) is det.

maybe_data_structure_sharing_analysis(Verbose, Stats, !HLDS, !IO) :- 
    globals__io_lookup_bool_option(data_structure_sharing_analysis, 
        Sharing, !IO), 
    (
        Sharing = yes, 
        maybe_write_string(Verbose, "% Data structure sharing analysis...\n",
            !IO), 
        maybe_flush_output(Verbose, !IO), 
        % data_structure_sharing_analysis(!HLDS, !IO), 
        maybe_write_string(Verbose, "% done.\n", !IO),
        maybe_report_stats(Stats, !IO)
    ;
        Sharing = no
Index: options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.478
diff -n -r1.478 options.m
a511 1
    ;       data_structure_sharing_analysis
Index: top_level.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/top_level.m,v
retrieving revision 1.6
diff -n -r1.6 top_level.m
a21 2
:- import_module transform_hlds.ctgc.
:- import_module transform_hlds.ctgc.structure_sharing.
Index: transform_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/transform_hlds.m,v
retrieving revision 1.20
diff -n -r1.20 transform_hlds.m
a43 3
:- include_module transform_hlds.ctgc.
   % :- include_module transform_hlds.ctgc.structure_sharing.

cvs server: Diffing notes
