2009/3/9 Claus Reinke <claus.rei...@talk21.com>:
 But if you annotate all your unrolled and peeled new definitions as
> NOINLINE, do you still get the optimizations you want? There are probably a
> few GHC optimizations that can "look through" non-recursive
> lets, but RULES are not among those.

The benefit that comes immediately to mind is extra freedom for the
code generator. If we have several copies of the body of e.g. a loop
it may be able to schedule instructions much better. This is why GCC
unrolls loops, of course. Of course, Core may not be the best place to
do this sort of unrolling as Roman pointed out earlier in the thread.
But yeah, beyond this I don't /think/ that non-inlined duplications
would help GHC at all (it might be a different story if we did partial
inlining).

All the best,
Max
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to