summaryrefslogtreecommitdiff
path: root/utils/hp2ps/HpFile.c
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2010-05-05 20:05:43 +0000
committersimonpj@microsoft.com <unknown>2010-05-05 20:05:43 +0000
commit9abe297285fe213ccd804f47d253055797cf667a (patch)
treebe54f8216eed361eb7d244d07ab989552e3f7a4e /utils/hp2ps/HpFile.c
parent0e04bfecd870305bdf5945ba3ab80f314c708265 (diff)
downloadhaskell-9abe297285fe213ccd804f47d253055797cf667a.tar.gz
Matching cases in SpecConstr and Rules
This patch has zero effect. It includes comments, a bit of refactoring, and a tiny bit of commment-out code go implement the "matching cases" idea below. In the end I've left it disabled because while I think it does no harm I don't think it'll do any good either. But I didn't want to lose the idea totally. There's a thread called "Storable and constant memory" on the libraries@haskell.org list (Apr 2010) about it. Note [Matching cases] ~~~~~~~~~~~~~~~~~~~~~ {- NOTE: This idea is currently disabled. It really only works if the primops involved are OkForSpeculation, and, since they have side effects readIntOfAddr and touch are not. Maybe we'll get back to this later . -} Consider f (case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) -> case touch# fp s# of { _ -> I# n# } } ) This happened in a tight loop generated by stream fusion that Roman encountered. We'd like to treat this just like the let case, because the primops concerned are ok-for-speculation. That is, we'd like to behave as if it had been case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) -> case touch# fp s# of { _ -> f (I# n# } } )
Diffstat (limited to 'utils/hp2ps/HpFile.c')
0 files changed, 0 insertions, 0 deletions