Hey all,
I"ve been doing some work to finish up my prefetch patch that  I hope to
land in 7.8, and one design matter thats come up is what the optimization
semantics should be!

is it appropriate to duplicate prefetches? (probably yes)
is it appropriate to float OUT prefetched? (probably not?)

operations that are dupable which shouldn't float out are marked with the
can_fail= true
property,
operations which cannot be safely floated out and can't be duped are marked
as having side effects.

on the GHC irc channel, Duncan was patient enough to walk my through
understanding this, and this makes me lean towards the conclusion that
duplication is ok, but floating out isnt. Thus all the prefetch ops (pure
or not) should have the attribute "can fail", rather than no attribut or
"has effects".

this is exploiting that "can fail"  really just means "don't float out".

thoughts and counter points?

thanks

-Carter
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to