[GHC] #490: object code blow up by minor source code change
GHC
trac at galois.com
Fri Feb 10 08:41:11 EST 2006
#490: object code blow up by minor source code change
-----------------------+----------------------------------------------------
Reporter: c_maeder | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.4.1
Severity: normal | Resolution: None
Keywords: | Os: Unknown
Difficulty: Unknown | Architecture: Unknown
-----------------------+----------------------------------------------------
Comment (by simonpj):
Here are some follow-ups from Christian:
Thanks, for looking into it. For our code bloat, related to the
ShATermConvertible instances, there are no associative operations. I've
included the basic class and a few instances that pose no problem until
very late in our final big binary (with many more instances).
Currently, I simply set "-fvia-C -O0" in parts of our code and hope that
-optc-O1 helps a bit.
Cheers Christian
P.S. I've changed infixl to infixr
{{{
infixr 6 <>
infixr 6 <+>
infixr 5 $$, $+$
}}}
The numbers are much better with infixr:
{{{
Linking ...
real 5m30.666s
user 4m56.950s
sys 0m9.262s
maeder at turing:~/haskell/examples> ll a.out HasCASL/PrintLe.o
-rwxr-xr-x 1 maeder wimi 4812378 2006-01-26 20:01 a.out
-rw-r--r-- 1 maeder wimi 139828 2006-01-26 19:58 HasCASL/PrintLe.o
}}}
------------------
The code bloat goes away again when I now change back to infixl!
Is this now a better patch for HughesPJ.hs?
{{{
Linking ...
real 5m18.860s
user 4m56.663s
sys 0m9.168s
maeder at turing:~/haskell/examples> ll a.out HasCASL/PrintLe.o
-rwxr-xr-x 1 maeder wimi 4808498 2006-01-26 20:23 a.out
-rw-r--r-- 1 maeder wimi 140820 2006-01-26 20:21 HasCASL/PrintLe.o
}}}
Christian Maeder wrote:
> When I also swap the corresponding equations the code bloat comes back:
{{{
> above_ p _ Empty = p
> above_ Empty _ q = q
>
> beside_ p _ Empty = p
> beside_ Empty _ q = q
>
>
> Linking ...
>
> real 7m10.727s
> user 6m25.456s
> sys 0m10.698s
> maeder at turing:~/haskell/examples> ll a.out HasCASL/PrintLe.o
> -rwxr-xr-x 1 maeder wimi 6213885 2006-01-26 20:11 a.out
> -rw-r--r-- 1 maeder wimi 1762784 2006-01-26 20:09 HasCASL/PrintLe.o
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/490>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list