[m-rev.] for post-commit review: reduce overheads in recompute_instmap_delta_1

Julien Fischer jfischer at opturion.com
Sat Oct 24 01:45:19 AEDT 2020


On Fri, 23 Oct 2020, Zoltan Somogyi wrote:

> This gets rid of some overhead I noticed while fixing Mantis bug #512.
> For review by anyone.
>
> Reduce overheads in recompute_instmap_delta_1.
> 
> compiler/mode_util.m:
>     Instead of testing the form of a goal three times (does it have
>     subgoals, is it a rhs_lambda_goal unification, switch on goal_expr),
>     test it just once (in the switch on goal_expr).
>
>     Inline recompute_instmap_delta_2 into recompute_instmap_delta_1.
>
>     The update_module_info predicate did not really help with readability,
>     so delete it after inlining all the calls to it. This also avoids
>     the overheads of higher order calls at the default optimization level.

That's fine.

Julien.


More information about the reviews mailing list