[m-rev.] for review: dead_pred_elim optimization
Simon Taylor
stayl at cs.mu.OZ.AU
Thu Mar 6 20:39:58 AEDT 2003
On 06-Mar-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> On Thu, Mar 06, 2003 at 04:17:37PM +1100, Simon Taylor wrote:
> > On 05-Mar-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> > > Estimated hours taken: 4
> > > Branches: main
> > >
> > > 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.
Is that 55 seconds for the entire compilation or just for
dead_pred_elim?
> > > Index: compiler/hlds_module.m
> > > ===================================================================
> > > @@ -1756,22 +1765,45 @@
> > >
> > > %-----------------------------------------------------------------------------%
> > >
> > > +predicate_table_restrict(OrigPredicateTable, PredIds, PredicateTable) :-
> > > + predicate_table_reset(OrigPredicateTable, PredicateTable0),
> > > + predicate_table_get_preds(OrigPredicateTable, Preds),
> > > + PredicateTable = list__foldl(
> > > + (func(PredId, Table0) = Table :-
> > > + PredInfo = map__lookup(Preds, PredId),
> > > + predicate_table_insert_2(Table0,
> > > + yes(PredId), PredInfo,
> > > + must_be_qualified,
> > > + no, _, Table)
> > > +
> > > + ), PredIds, PredicateTable0).
> >
> > The `must_be_qualified' here looks wrong.
> >
> On second thoughts, I think you are right, I have changed it to
> may_be_unqualified.
That's wrong too. You need to use the same value that was passed
when the predicate was originally added to the predicate table.
Simon.
--------------------------------------------------------------------------
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