Int division

Simon Peyton-Jones simonpj at microsoft.com
Fri Dec 14 04:10:51 EST 2007


| But no constant folding for divInt# until phase 0. I suspect that
| constant folding is more important than rules.

Sorry don't understand.  You mean you don't want constant folding until P0?  Or what?

I've remembered that of course constant folding etc is baked into PrelRules, but you could add stuff for divInt.

Simon

| -----Original Message-----
| From: Roman Leshchinskiy [mailto:rl at cse.unsw.edu.au]
| Sent: 14 December 2007 09:05
| To: Simon Peyton-Jones
| Cc: Stefan O'Rear; cvs-ghc at haskell.org
| Subject: Re: Int division
|
| Simon Peyton-Jones wrote:
| > | Anyway, I don't think it's an inliner bug because divInt# and friends
| > | aren't marked INLINE. If nobody objects, I'll go ahead and add the
| > | INLINE pragmas at least. We lose the opportunity to have rewrite rules
| > | for divInt# this way, though, which is a pity.
| >
| > You could still have a RULE for divInt# and arrange to inline it in a late phase (like Phase 0).  That way
| you'd get the best of both worlds.
|
| But no constant folding for divInt# until phase 0. I suspect that
| constant folding is more important than rules.
|
| Roman



More information about the Cvs-ghc mailing list