SpecConstr should exploit cases where there is exactly one call pattern
On x86/Linux, with this mk/build.mk
:
GhcLibWays = v p dyn
SRC_HC_OPTS = -O -H64m -Rghc-timing
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O2 -fasm
GhcHcOpts = -Rghc-timing
GhcLibHcOpts = -O2 -XGenerics
#SplitObjs = YES
SplitObjs = NO
HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS = NO
BUILD_DOCBOOK_PDF = NO
# -----------------------------------------------------------------------------
# Other settings that might be useful
# profiled RTS
#GhcRtsCcOpts = -pg -g
# Optimised/profiled RTS
#GhcRtsCcOpts = -O2 -pg
#GhcRtsWithFrontPanel = YES
#SRC_HC_OPTS += `gtk-config --libs`
# NoFib settings
NoFibWays =
STRIP=:
and these commands:
$ sh boot
$ ./configure --prefix=/opt/ghc-6.13
$ make
and a 1GB memory limit (ulimit -v 1024000
), the build fails with:
"inplace/bin/ghc-stage1" -O -H64m -Rghc-timing -package-name terminfo-0.3.1.1 -hide-all-packages -i -ilibraries/terminfo/. -ilibraries/terminfo/dist-install/build -ilibraries/terminfo/dist-install/build/autogen -Ilibraries/terminfo/dist-install/build -Ilibraries/terminfo/dist-install/build/autogen -Ilibraries/terminfo/. -optP-include -optPlibraries/terminfo/dist-install/build/autogen/cabal_macros.h -package base-4.2.0.0 -package extensible-exceptions-0.1.1.1 -Wall -XForeignFunctionInterface -XDeriveDataTypeable -XEmptyDataDecls -XScopedTypeVariables -XFlexibleInstances -O2 -XGenerics -fno-warn-deprecated-flags -odir libraries/terminfo/dist-install/build -hidir libraries/terminfo/dist-install/build -stubdir libraries/terminfo/dist-install/build -hisuf hi -osuf o -hcsuf hc -c libraries/terminfo/./System/Console/Terminfo/Effects.hs -o libraries/terminfo/dist-install/build/System/Console/Terminfo/Effects.o
ghc-stage1: out of memory (requested 1048576 bytes)
make[1]: *** [libraries/terminfo/dist-install/build/System/Console/Terminfo/Effects.o] Error 1
make: *** [all] Error 2
With -v
:
Glasgow Haskell Compiler, Version 6.13.20100120, for Haskell 98, stage 1 booted
by GHC version 6.8.2
Using binary package database: /home/ian/qq/ghc/inplace/lib/package.conf.d/packa
ge.cache
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-inplace
wired-in package integer-gmp mapped to integer-gmp-0.2.0.0-inplace
wired-in package base mapped to base-4.2.0.0-inplace
wired-in package rts mapped to builtin_rts
wired-in package haskell98 mapped to haskell98-1.0.1.1-inplace
wired-in package template-haskell mapped to template-haskell-2.4.0.0-inplace
wired-in package dph-seq mapped to dph-seq-0.4.0-inplace
wired-in package dph-par mapped to dph-par-0.4.0-inplace
Hsc static flags: -static
Created temporary directory: /tmp/ghc1791_0
*** Checking old interface for terminfo-0.3.1.1:System.Console.Terminfo.Effects:
*** Parser:
*** Renamer/typechecker:
*** Desugar:
Result size = 1076
*** Simplifier gentle[rules,no inline] max-iterations=4:
Result size = 802
Result size = 758
Result size = 758
*** Specialise:
Result size = 758
*** Float out(not lambdas, constants):
Result size = 826
*** Float inwards:
Result size = 826
*** Simplifier Phase 2 [main] max-iterations=4:
Result size = 1499
Result size = 2190
Result size = 2994
Result size = 2380
Result size = 2380
*** Simplifier Phase 1 [main] max-iterations=4:
Result size = 2145
Result size = 2115
*** Simplifier Phase 0 [main] max-iterations=4:
Result size = 2115
*** Demand analysis:
Result size = 2115
*** Worker Wrapper binds:
Result size = 2115
*** Glom binds:
*** GlomBinds:
Result size = 2115
*** Simplifier Phase 0 [post-worker-wrapper] max-iterations=4:
Result size = 2115
*** Float out(not lambdas, constants):
Result size = 2121
*** Common sub-expression:
Result size = 2102
*** Float inwards:
Result size = 2102
*** Liberate case:
Result size = 2102
*** Simplifier Phase 0 [post-liberate-case] max-iterations=4:
Result size = 2082
Result size = 2082
*** SpecConstr:
ghc-stage1: out of memory (requested 1048576 bytes)
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | high |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |