
#8901: (very) bad inline heuristics -------------------------------------+------------------------------------ Reporter: heisenbug | Owner: Type: bug | Status: new Priority: normal | Milestone: 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: -------------------------------------+------------------------------------ Comment (by heisenbug): Replying to [comment:3 simonpj]:
Can you explain what the bug in GHC is? And (as Ashley asks) why you believe it's a bug in GHC and not the library?
It is hard to pinpoint. There has been some rope-pulling between me and Ashley (on the dev list/in private) as he has not been keen of accepting my patch (so far) asking whether it could be a GHC bug. I tend to agree, as a quality inliner should not attempt to inline (e.g.) `formatTime` which has 8 alternatives and is called from 10+ sites. It would be interesting to see whether any bloat-controlling measures failed detecting this case, esp. as `Format.hs` appears to be a relatively benign source file. Some lessons might be learnt from this. OTOH, a library author should keep in eye how popular compilers digest the lib. I am ending up stuck between a rock and a hard place. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8901#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler