[GHC] #8256: adding locality levels to prefetch# and friends

GHC ghc-devs
Wed Oct 2 20:23:13 UTC 2013


#8256: adding locality levels to prefetch# and friends
-------------------------------------+------------------------------------
        Reporter:  carter            |            Owner:  carter
            Type:  task              |           Status:  closed
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Compiler          |          Version:  7.7
      Resolution:  fixed             |         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):

 Hey Simon, excellent questions

 1) the motivation for the can_fail attribute is the following: anyone
 using prefetch (or at least using prefetch appropriately) are treating the
 CPU's memory bandwidth as a resource, and accordingly (and
 conservatively), can_fail prevents let floating/hoisting (if i've read the
 docs correctly), while still making it "cheap" to inline.   It need not
 have the can_fail attribute, but since prefetches should/will only be used
 in pretty perf sensitive code, it seems like its a decent arbitrary choice
 that will help make "when" prefetch happens a bit easier to understand.

 2) good points, i'll hack out a patch to docs later this week when i'm not
 buried with my consulting work

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8256#comment:36>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list