
#9370: unfolding info as seen when building a module depends on flags in a previously-compiled module -------------------------------------+------------------------------------- Reporter: carter | Owner: richardfung Type: bug | Status: new Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: newcomer, | Inlining Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #8635 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by richardfung): There has been some discussion on the code review: https://phabricator.haskell.org/D2485 To summarize, turning off all inlining with -O0 and always reading in interface pragmas causes a performance regression. Simon Marlow has suggested two other solutions: "Lazily load the pragma info, so that it doesn't cost anything if we don't use it. The simplifier should use -fignore-interface-pragmas to decide whether to use the pragma info from external Ids or not. Predict whether we'll need the pragma info by determining whether *any* module in the current set will be compiled with optimisation turned on. This info is available after we've done the downsweep in the compilation manager. This approach doesn't really work in general because a user of the GHC API might load more modules later with -O and we can't predict that, but it fixes the common case." I would rather do things the right way and thus try my hand at the first solution. Is this something that is still suitable for a newcomer? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9370#comment:40 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler