[m-dev.] for review: use shift and mask in lookup switches

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 14 18:30:07 AEDT 2000


On 10-Nov-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> compiler/lookup_switch.m:
> 	Use shifts and masks rather than unsigned division and
> 	unsigned modulus.  There's two reasons for this change.
> 	The main one is to reduce the number of places where we
> 	depend on `cast_to_unsigned'.  The other reason is so
> 	that we generate better code for the IL back-end (and
> 	for any future back-ends like it, e.g. the JVM back-end).

I'll go ahead and commit that one.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list