[m-rev.] for review: dead_pred_elim optimization

Peter Ross pro at missioncriticalit.com
Mon Mar 10 22:20:28 AEDT 2003


On Fri, Mar 07, 2003 at 04:40:47PM +0100, Peter Ross wrote:
> -predicate_table_restrict(OrigPredicateTable, PredIds, PredicateTable) :-
> +predicate_table_restrict(ModuleInfo,
> +		OrigPredicateTable, PredIds, PredicateTable) :-
>  	predicate_table_reset(OrigPredicateTable, PredicateTable0),
>  	predicate_table_get_preds(OrigPredicateTable, Preds),
> +	module_info_get_partial_qualifier_info(ModuleInfo, PartialQualInfo),
>  	PredicateTable = list__foldl(
>  			(func(PredId, Table0) = Table :-
>  				PredInfo = map__lookup(Preds, PredId),
> +				pred_info_get_markers(PredInfo, Markers),
> +				(
> +				    check_marker(Markers,
> +					only_accessible_via_fully_qualifed_name)
> +				->
> +				    NeedQual = may_be_unqualified,
> +				    MaybeQualInfo = yes(PartialQualInfo)
> +				;
> +				    NeedQual = must_be_qualified,
> +				    MaybeQualInfo = no
> +				),
> +

Woops, got the then and else sections the wrong way round.  I have fixed
this.

I also applied Simons other suggestion about passing the
partial_qual_info directly.

The new change is current bootchecking and will check it in when it
succeeds.

Pete
--------------------------------------------------------------------------
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