[m-rev.] for post-commit review: special LLDS code generation for ground terms

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jan 5 23:29:04 AEDT 2009


On Mon, 5 Jan 2009, Zoltan Somogyi wrote:

> Speed up the LLDS code generator's handling of code that constructs large
> ground terms by specializing it.
>
> This diff reduces the compilation time for training_cars_full.m by a further
> 38% or so, for an overall reduction by about a factor of five since I started.

Great work!

> The time on tools/speedtest stays pretty much the same.
>
> compiler/unify_gen.m:
> 	Add a mechanism to construct code for from_ground_term_construct
> 	scopes directly.
>
> compiler/code_gen.m:
> 	Invoke the new mechanism in unify_gen.m for from_ground_term_construct
> 	scopes.
>
> 	Reorganize some trace goal by duplicating some common support code
> 	inside them. The compiler wasn't optimizing it away as it should have.
>
> compiler/code_info.m:
> 	Export a predicate for use by the new code in unify_gen.m.
>
> 	Add some debugging predicates.
>
> compiler/opt_debug.m:
> 	Rename a predicate to better reflect its function.

...

> @@ -1241,6 +1248,200 @@
>
> %---------------------------------------------------------------------------%
>
> +:- type active_ground_term == pair(rval, llds_type).

One small stylistic issue, I would use:

 	:- type active_ground_term
 		--->	active_ground_term(rval, llds_type).

rather than the definition in the diff.

The diff looks okay otherwise.

Julien.
--------------------------------------------------------------------------
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