[m-rev.] for review: dead_pred_elim optimization

Peter Ross pro at missioncriticalit.com
Wed Apr 23 20:44:52 AEST 2003


On Wed, Apr 16, 2003 at 11:00:58AM +1000, Fergus Henderson wrote:
> On 15-Apr-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> > Fix a bug in the implementation of predicate_table_restrict where we
> > were assuming that because a procedure was not accessible by
> > unqualified name that it was also not accessible by partially
> > qualified names.
> > 
> > compiler/hlds_pred.m:
> > 	Replace the marker only_accessible_via_fully_qualifed_name 
> > 	with the markers not_accessible_by_unqualifed_name and
> > 	not_accessible_by_partially_qualified_names.
> 
> Isn't this just going to fail in cases involving nested modules
> which are nested one more level?
> 
I don't believe so and I my testing indicates that it doesn't.
All we are doing is making sure that we call predicate_table_do_insert with 
same values as the first time we called it, so we should get the same
behaviour.

predicate_table_do_insert makes two seperate decisions, one on based on
the value of the type need_qualifer and the other based on the value of
the type maybe_partial_qualifier_info.  Previously we were assuming that
there was a relationship between the value of need_qualifer and the
value of maybe_partial_qualifier_info; this is not true.

The actual qualified names which an entity is accessible via depends on
the value of the partial_qualifier_info.  This is constant for the
module so we don't need to record that value in the marker.

> E.g. consider a name "a.b.c.d.e.f", where "a", "b", and "d"
> have been imported using "import_module", and "c" and "e" have
> been imported using "use_module".  Valid ways to refer to this
> name are "c.d.e.f", "b.c.d.e.f", and "a.b.c.d.e.f",
> but not "d.e.f", "e.f", or "f".
> Will your code handle this case correctly?
> 
Yes.

Does my explaination help?

PS. I have been trying to bootcheck this on the CS machines and I keep
getting problems with

Error reading options file `/usr/local/mercury-DEV/lib/mercury/conf/Mercury.config'.

Has anyone else been having the same problem?  Have I done something
stupid?
--------------------------------------------------------------------------
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