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

GHC ghc-devs at haskell.org
Fri Aug 1 06:51:28 UTC 2014


#9370: unfolding info as seen when building a module depends on flags in a
previously-compiled module
-------------------------------------+-------------------------------------
              Reporter:  carter      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  high        |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Compile-    |       Blocked By:
  time performance bug               |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Replying to [comment:11 rwbarton]:
 > I would guess it's to avoid the very code size explosion (inlining 4000
 copies of Text's `fromString`)

 I would guess so too.  But WHY is 4000 copies of `fromString` getting
 inlined.  I doubt GHC is doing that unaided.  I bet it's an INLINE pragma
 or RULE in Text. And if so, it's a landmine waiting to kill new victims.

 > The same scenario could apply in reverse, right? In the actual xmlhtml
 package, `Text.XmlHtml.HTML.Meta` is the first module built and it is
 built with `-O0` so any interface files that are read while compiling that
 module will not have unfoldings attached. Then those modules will not have
 unfoldings during the compilation of any subsequent module either, even
 though those are built with `-O`.

 No, that part at least is not so.  The interface file built for
 `Text.XmlHtml.HTML.Meta` will not have unfoldings in it, but that only
 affects functions actually defined in `Text.XmlHtml.HTML.Meta`.  Later
 modules, built with `-O` will certainly get interface files with
 unfoldings in them.

 Simon

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


More information about the ghc-tickets mailing list