[m-rev.] diff: minor ml_optimize.m improvements

Julien Fischer jfischer at opturion.com
Wed Jan 11 14:16:42 AEDT 2017


Hi Zoltan,

On Wed, 11 Jan 2017, Zoltan Somogyi wrote:

> Minor improvements.

...

> Use complete switches.
>
> compiler/ml_optimize.m:
>    Replace semidet disjunctions with require_complete_switch scopes,
>    with some switch arms being `fail'. This should allow us to optimize
>    some MLDS code we previously didn't, because the disjunctions weren't
>    updated when static common data structures were added to the MLDS.

It may be useful if we add a new informational message
'--inform-incomplete-switch' which prints out where this is happening.
(Also, if the coding standard doesn't already specify it we should
require that all switch be complete, precisely to avoid the above
situation.)

Julien.


More information about the reviews mailing list