rl at cse.unsw.edu.au
Fri Dec 14 04:19:27 EST 2007
Simon Peyton-Jones wrote:
> | 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 mean I we don't *get* constant folding until P0. That's might be a bit
too late as we might miss subsequent optimisations in earlier phases.
> I've remembered that of course constant folding etc is baked into PrelRules, but you could add stuff for divInt.
Hmm... Can built-in and user-defined rules for the same function
coexist? If so, this would probably work (with a bit more effort than if
divInt# was a primop, though).
More information about the Cvs-ghc