[m-rev.] For review: eliminate some while loop labels

Julien Fischer jfischer at opturion.com
Thu Jan 23 18:18:04 AEDT 2014


On Wed, 22 Jan 2014, Zoltan Somogyi wrote:

> The average times are 9.70 and 9.61, which is a 1% speedup.
>
> For review by anyone.
>
> In low level grades, do not emit labels at which we start while loops
> if the only use of the label is backward branches from inside the loop,
> since all these get turned into "continue" statements.
> 
> Since the assembly code we now have to surround labels with inhibit
> optimization (they have to, at least to some extent, since they are designed
> to prevent gcc from optimizing them away), this change yields a speedup.
> On tools/speedtest, the speedup is about 1%.
> 
> compiler/llds_out_file.m:
>    Find out whether we can leave labels at which we start while loops
>    undefined.
>
>    Fix some formatting.
> 
> compiler/llds_out_instr.m:
>    Allow llds_out_file to tell us what it found out, by replacing a pair
>    with a tuple type with a field for this info. Use this type to consolidate
>    multiple arguments into one in some places.

That looks fine.

Cheers,
Julien.



More information about the reviews mailing list