[GHC] #4096: New primops for indexing: index*OffAddrUsing# etc
GHC
cvs-ghc at haskell.org
Sun Jul 18 00:40:56 EDT 2010
#4096: New primops for indexing: index*OffAddrUsing# etc
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.16.1
Component: Compiler | Version: 6.12.2
Keywords: | Difficulty:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by rl):
I implemented this and it gives very nice speedups (up to 1.5) for the
vector benchmarks. The patch is attached. It has one big problem, though.
The new primops must be ok-for-speculation regardless of their first
argument (the boxed term that is being touched). I hacked this by
explicitly testing for these primops (all 16 of them) in
`exprOkForSpeculation` but that's really just a hack. I'm not sure how to
handle this properly. The situation is somewhat similar to division
primops which are also hardwired in `exprOkForSpeculation`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4096#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list