[m-rev.] for review: fixes for intermodule optimisation and CTGC

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Apr 17 14:09:51 AEST 2008

On Thu, 17 Apr 2008, Peter Wang wrote:

> Branches: main
> Various fixes for intermodule optimisation and structure reuse analysis.
> compiler/structure_reuse.analysis.m:
> 	Write `:- pragma structure_reuse' declarations when making `.opt'
> 	files.
> 	Write structure_reuse pragmas for procedures exported to submodules.
> 	Don't write structure_reuse pragmas for the reuse versions of
> 	procedures.
> 	Create forwarding procedures for procedures that, according to the
> 	.opt file, have conditional reuse versions, but when generating target
> 	code we find has no reuse.
> compiler/structure_reuse.versions.m:
> 	Add predicates to create forwarding procedures.
> 	Record the origin of reuse procedures as `transform_structure_reuse'.
> 	Mark reuse versions of procedures as `status_local' if the original
> 	procedure was `opt_imported' so they don't get removed by dead proc
> 	elimination.
> compiler/intermod.m:
> 	If structure reuse is enabled, read in a module's own `.opt' file and
> 	keep any `:- pragma structure_reuse' declarations so that we can know
> 	whether we need to create forwarding procedures.
> compiler/mercury_compile.m:
> 	Perform higher-order specialisation, inlining and deforestation before
> 	CTGC passes when making intermodule optimisation or analysis files.
> 	This reduces the discrepancy between the CTGC results we get while
> 	making .opt/.trans_opt files and while making .c files.
> compiler/ctgc.util.m:
> 	Don't abort in get_type_substitution if the caller's actual arguments
> 	don't match the callee's argument types and some compiler-generated
> 	procedures are type-incorrect.
> compiler/hlds_pred.m:
> compiler/layout_out.m:
> 	Add `transform_structure_reuse' option for `pred_transformation'.

That looks fine.

mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au

More information about the reviews mailing list