[m-rev.] for review: Simplify away self-comparisons of int types in pregen grades.
Peter Wang
novalazy at gmail.com
Tue Oct 23 19:02:19 AEDT 2018
On Tue, 23 Oct 2018 18:32:03 +1100 (AEDT), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
>
> On Tue, 23 Oct 2018 17:03:23 +1100, Peter Wang <novalazy at gmail.com> wrote:
>
> > Previously we would simplify away self-comparisons of `int' and `uint'
> > variables in .pregen grades; rectify that now.
>
> Why would that need rectifying? I think you are missing a "not" somewhere.
Right, thanks.
> > +simplify_improve_int_type_comparison_call(_ModuleName, PredName, _ModeNum,
> > + Args, ImprovedGoalExpr) :-
> > + (
> > ( PredName = "<"
> > ; PredName = ">"
> > ),
> > Args = [X, X],
> > ImprovedGoalExpr = fail_goal_expr
> > ;
> > ( PredName = "=<"
> > ; PredName = ">="
> > ),
> > Args = [X, X],
> > --
> > 2.19.1
> >
> >
>
> Where is the rest of it, i.e. ImprovedGoalExpr = true_goal_expr?
Contained in the other diff.
Peter
More information about the reviews
mailing list