Re: [GHC] #7520: Implement cardinality analysis

#7520: Implement cardinality analysis ---------------------------------+------------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.1 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by nfrisby): SPJ determined that this cardinality analysis could make some fragile fusion opportunities more robust. My experimentation with -fdicts-strict in `nofib/shootout/spectral-norm` was disrupting such a fusion. {{{ let x_aPi = build (\b c n -> eftIntFB c n 0 (...)) -- from "[0..n-1]" in Library.allocaArray n $ \ptr -> foldr (mapFB ...) (...) x_aPi -- from "forM_ ..." }}} If `allocaArray` is not inlined early enough (which my -fdicts-strict tinkering prevented), the `ptr` lambda is not identified as one-shot, so `x_aPi` will not be inlined under it and `foldr/build` won't fire. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7520#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC