|sincos CSE (was: quot/mod CSE...) firstname.lastname@example.org (1996-02-09)|
|Re: sincos CSE (was: quot/mod CSE...) email@example.com (1996-02-09)|
|Re: sincos CSE (was: quot/mod CSE...) firstname.lastname@example.org (1996-02-13)|
|Re: sincos CSE (was: quot/mod CSE...) email@example.com (1996-02-14)|
|Re: sincos CSE (was: quot/mod CSE...) firstname.lastname@example.org (1996-02-16)|
|From:||email@example.com (Jeff Jackson)|
|Date:||9 Feb 1996 17:18:27 -0500|
|Organization:||I would rather be windsurfing.|
> I can understand how the above optimizations work, but I now don't
> understand how a sin(x) or cos(x) _by itself_ gets optimized. Perhaps
> the tree gets decorated with 'reference count' information saying how
> many nodes depend upon the sincos(x) node, so that if this refcount =
> 1, then the expression 'sinpart(sincos(x))' => 'sin(x)', as before ??
One approach is that the sincos(x) is treated as an operator that
generates a 16-byte value that has both sinpart and cospart. This
gets a cse created for it, so in this case, the actual code looks like:
When such a CSE isn't created, then the sinpart(sincos(x)) gets folded
down to sin(x) and a regular sin operation takes place.
Jeffrey Glen Jackson
Return to the
Search the comp.compilers archives again.