[GHC] #9583: Simplifier ticks exhausted while compiling Cabal HEAD

GHC ghc-devs at haskell.org
Wed Sep 17 16:39:33 UTC 2014


#9583: Simplifier ticks exhausted while compiling Cabal HEAD
-------------------------------------+-------------------------------------
              Reporter:  ezyang      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  highest     |        Milestone:
             Component:  Compiler    |          Version:  7.9
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Compile-    |       Blocked By:
  time crash                         |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by JohnWiegley):

 Simon and I had a look at this, and we found a few more data points:

 1. Manually implementing {{{get}}} and {{{put}}} for the instance, even if
 just to copy the default definitions, causes the test case above to pass.

 2. The following data type also reproduces the problem:

 {{{
 data T = A T T T T T T T T T T T T | B T
   deriving (Data, Typeable, Generic)
 }}}

 3. If you implement {{{get}}} for the instance, but not {{{put}}}, the
 error still occurs; but the converse works.

 4. If you set {{{put = gdmput}}}, and then define it in its own module,
 marking it INLINE works, but INLINEABLE fails:

 {{{
 gdmput :: (Generic t, GBinary (Rep t)) => t -> Put
 gdmput = gput . from
 {-# INLINABLE gdmput #-}
 }}}

 5. Displaying inlining information with {{{-ddump-inlinings -ddump-rule-
 firings}}} shows that after the first few unfoldings, the following
 repeats continually up until the failure.  Increasing the tick cause
 simply causes more of this occurrence to display:

 {{{
 Rule fired: Class op gput
 Rule fired: Class op gput
 Rule fired: Class op gput
 Rule fired: Class op gput
 Inlining done: Data.Binary.Generic.unTagged
 Inlining done: Data.Binary.Generic.unTagged1
 Inlining done: GHC.Base.id
 Inlining done: GHC.Word.$fOrdWord64_$c<=
 Inlining done: GHC.Word.$fNumWord64_$c-
 Inlining done: Data.Binary.Generic.$fSumSizeM1_$csumSize
 Inlining done: Data.Binary.Generic.$fSumSizeM1_$csumSize
 Rule fired: plusWord#
 Inlining done: GHC.Word.$fBitsWord64_$cfromInteger
 Rule fired: integerToWord
 Rule fired: minusWord#
 Rule fired: leWord#
 Rule fired: tagToEnum#
 Inlining done: GHC.Word.$fBitsWord8_$cfromInteger
 Rule fired: integerToWord
 Rule fired: narrow8Word#
 Inlining done: Data.Binary.Generic.$fSumSizeM1_$csumSize
 Inlining done: Data.Binary.Generic.$fSumSizeM1_$csumSize
 Rule fired: plusWord#
 Inlining done: GHC.Base.id
 Rule fired: narrow8Word#
 Inlining done: GHC.Word.$fBitsWord8_$cshiftR
 Rule fired: >=#
 Rule fired: tagToEnum#
 Rule fired: uncheckedShiftRL#
 Rule fired: Class op putSum
 Inlining done: Data.Binary.Put.$fApplicativePutM_$c*>
 Inlining done: Data.Binary.Put.$fApplicativePutM2
 Rule fired: Class op put
 Inlining done: Data.Binary.Put.putWord8
 Inlining done: GHC.Base.$
 Inlining done: GHC.Base.returnIO
 Inlining done: GHC.Base.returnIO1
 Inlining done: GHC.Base.bindIO
 Inlining done: GHC.Base.bindIO1
 Inlining done: GHC.Base.flip
 Inlining done: Foreign.Storable.$fStorableWord8_$cpoke
 Inlining done: Foreign.Storable.$fStorableWord19
 Rule fired: Class op gput
 Inlining done: GHC.Word.$fNumWord8_$c+
 Rule fired: plusWord#
 Rule fired: narrow8Word#
 Inlining done: GHC.Word.$fNumWord8_$c-
 Rule fired: minusWord#
 Rule fired: narrow8Word#
 Rule fired: Class op putSum
 Inlining done: Data.Binary.Put.$fApplicativePutM_$c*>
 Inlining done: Data.Binary.Put.$fApplicativePutM2
 Rule fired: Class op put
 Inlining done: Data.Binary.Put.putWord8
 Inlining done: GHC.Base.$
 Inlining done: GHC.Base.returnIO
 Inlining done: GHC.Base.returnIO1
 Inlining done: GHC.Base.bindIO
 Inlining done: GHC.Base.bindIO1
 Inlining done: GHC.Base.flip
 Inlining done: Foreign.Storable.$fStorableWord8_$cpoke
 Inlining done: Foreign.Storable.$fStorableWord19
 }}}

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


More information about the ghc-tickets mailing list