[m-rev.] for review: dead_pred_elim optimization

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Apr 7 15:25:13 AEST 2003

On 07-Mar-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> Fix a performance bug where dead_pred_elim was taking a significant
> amount of time to delete entries from the predicate_table.  With this
> change dead_pred_elim goes from 12 minutes to 55 seconds CPU time in
> the IL grade when compiling accumulator.m with
> --intermodule-optimization turned on.

I'm still seeing a number of test case failures with intermodule
optimization enabled, in particular for the tests of nested modules,
and I think this patch is responsible.

> compiler/hlds_pred.m:
> 	Add a new pred_marker which indicates whether or not a
> 	predicate can only be accessed by its fully qualified name.

I don't think this is handling the situation with nested modules where
the parent module is imported using `import_module' but the child module
is imported using `use_module'.  In that case, the symbols in the child
module must be qualified with the child module, but do not need to be
fully qualified, since the parent module prefix can be omitted.

The symptom for one of the failing test cases (tests/hard_coded/parent)
is that it reports a spurious error for this case:

parent.m:028: In clause for predicate `parent.main/2':
parent.m:028:   error: undefined predicate `child2.hello/2'

Pete, could you please either fix the bug or back out this change?

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe

More information about the reviews mailing list