#5352: Very slow (nonterminating?) compilation if libraries compiled with
-fexpose-all-unfoldings
---------------------------------+------------------------------------------
    Reporter:  batterseapower    |       Owner:                              
        Type:  bug               |      Status:  new                         
    Priority:  normal            |   Component:  Compiler                    
     Version:  7.0.3             |    Keywords:                              
    Testcase:                    |   Blockedby:                              
          Os:  Unknown/Multiple  |    Blocking:                              
Architecture:  Unknown/Multiple  |     Failure:  Compile-time performance bug
---------------------------------+------------------------------------------
 I built the libraries with -fexpose-all-unfoldings. The stage 1 compiler
 then failed to terminate within ~20 minutes on InstalledPackageInfo.hs and
 PackageDescription.hs. The memory usage of the compiler did not grow
 appreciably (at all?) during this time, which makes me suspect that the
 problem is a loop rather than the extra unfoldings leading to code bloat
 (somehow).

 An example of an offending invocation is:

 {{{
 "inplace/bin/ghc-stage1"   -H64m -O -fasm    -package-name Cabal-1.11.2
 -hide-all-packages -i -ilibraries/Cabal/cabal/. -ilibraries/Cabal/cabal
 /dist-install/build -ilibraries/Cabal/cabal/dist-install/build/autogen
 -Ilibraries/Cabal/cabal/dist-install/build -Ilibraries/Cabal/cabal/dist-
 install/build/autogen -Ilibraries/Cabal/cabal/.    -optP-include
 -optPlibraries/Cabal/cabal/dist-install/build/autogen/cabal_macros.h
 -package array-0.3.0.3 -package base-4.4.0.0 -package containers-0.4.1.0
 -package directory-1.1.0.1 -package filepath-1.2.0.1 -package old-
 time-1.0.0.7 -package pretty-1.1.0.0 -package process-1.1.0.0 -package
 unix-2.5.0.0  -fwarn-tabs -Wall -fno-ignore-asserts -XHaskell98 -XCPP -O
 -dcore-lint -fexpose-all-unfoldings -no-user-package-conf -rtsopts
 -odir libraries/Cabal/cabal/dist-install/build -hidir
 libraries/Cabal/cabal/dist-install/build -stubdir libraries/Cabal/cabal
 /dist-install/build -hisuf hi -osuf  o -hcsuf hc -c
 libraries/Cabal/cabal/./Distribution/InstalledPackageInfo.hs -o
 libraries/Cabal/cabal/dist-
 install/build/Distribution/InstalledPackageInfo.o
 }}}

 The workaround is to build these two files with -O0.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5352>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to