[GHC] #8256: adding locality levels to prefetch# and friends
GHC
ghc-devs at haskell.org
Tue Oct 29 18:50:07 UTC 2013
#8256: adding locality levels to prefetch# and friends
-------------------------------------+------------------------------------
Reporter: carter | Owner: carter
Type: task | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets: #8252 ,#8107
-------------------------------------+------------------------------------
Comment (by carter):
Simon, good points.
No i don't have a benchmark showing that adding the 0-3 levels is
justified, though I could probably cook up one that shows a measurable
(albeit small) difference when I have time. The prior LLVM only prefetch
operation was equivalent to the {{{ prefetch*3# }}} family of operations.
The 0-3 stuff also in part motivated as having a simple concrete thorn to
motivate the "Static literal data" extension I think we need so as to
properly support some other interesting primops in a somewhat type safe
way, and prefetch is the simplest example, where exposing only 4 variants
would still be useful. So assuming I work out that Static data extension
right, We could have something like {{{ prefetchByteArray :: Static Int#
-> ByteArray# -> Int# ->ByteArray# }}} rather than the 0-3 variants for
7.10. So yes, I agree that the number suffix stuff is a bit of a hack, and
its one that motivates some more systemic solutions going forward.
On the can_fail, explained that way, I think you're absolutely right (or
at least more likely right than I).
I'll adjust that branch accordingly later today/tomorrow and link to the
diff again.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8256#comment:43>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list