[Issue 4383] Optimizer doesn't keep floating point values on the stack if used more than once

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 25 07:07:24 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4383



--- Comment #3 from BCS <shro8822 at vandals.uidaho.edu> 2010-06-25 07:07:22 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > Sounds like a prime case for a keyhole optimization. Does DMD have the
> > infrastructure in place to do that?
> 
> Yes, there's pinholeopt() in cod3.c. But this optimisation should be done
> earlier.

Agreed, but (done wrong now) + (done right later) > (done right later)

> Although it seems as though you could replace:
> fstp XXX; fld XXX;  with fst XXX; there's unfortunately no fst instruction for
> 80-bit reals, and for doubles and floats it can change the rounding.

I was primarily thinking of removing total nop cases (store+load+never used
again). Also you could include a speed/accuracy trade-off flag. Or not.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list