[m-dev.] introduce box/unbox float operators in HLDS

Ralph Becket rbeck at microsoft.com
Thu Mar 15 22:08:48 AEDT 2001


> From: Peter Ross [mailto:peter.ross at miscrit.be]
> Sent: 15 March 2001 10:55
> >
> > > If that's the case, wouldn't it be simpler to just add SR versions
> > > of the float operations?
> >
> > That sounds to me like a much easier way of solving the problem
> > that Pete is trying to solve.
> >
> It doesn't help for the following code
> 
> swap(p(X, Y), p(Y, X)).
> 
> There is no floating point operation, yet we will still unbox and then
> box the X and Y cells on the MLDS backend, while the LLDS backend
> doesn't do the box and unbox and hence introduces aliases between the
> two headvars.

I don't understand why the MLDS would unbox either argument.  Either
(1) this code is polymorphic, in which case you don't need to unbox or
(2) in this case we know that X and Y are floats, and whether they're
boxed or not still doesn't make any difference that I can see.

Cheers,

Ralph
--------------------------------------------------------------------------
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