[GHC] #9370: unfolding info as seen when building a module depends on flags in a previously-compiled module

GHC ghc-devs at haskell.org
Wed Sep 14 23:05:23 UTC 2016


#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):

 No problem at all, I managed to figure it out on my own! Thank you for all
 the help so far.

 I suspect I'm overthinking this or am missing something, but won't we
 still have this issue if we have multiple modules but one explicitly
 specifies -fignore-interface-pragmas?

 My understanding is that the issue can manifest itself in two ways: either
 we load an optimized module first and unoptimized second, thus using
 inlinings even with -O0, or unoptimized first and optimized second, in
 which case we should inline with -O but we can't because we did not read
 in the pragmas.

 Couldn't the second case still happen with the suggested fix if the
 unoptimized module also specified -fignore-interface-pragmas explicitly?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9370#comment:36>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list