News aggregator
Validate of GHC HEAD freezes on FreeBSD
Hello,
The "validate" script against GHC HEAD freezes on FreeBSD 9.1.
After sync-all, I did as follow:
----------------------------------------------------------------
% config_args="--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-gcc=/usr/local/bin/gcc47" CPUS=10 sh validate
----------------------------------------------------------------
This stopped quickly due to this problem:
http://hackage.haskell.org/trac/ghc/ticket/7592
Then I executed "validate" with "--no-clean" again.
----------------------------------------------------------------
% config_args="--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-gcc=/usr/local/bin/gcc47" CPUS=10 sh validate --no-clean
----------------------------------------------------------------
GHC could be compiled and tests started. But this result
Categories: Offsite Discussion
Global constant propagation
I'm curious about global constant propagation in GHC. It's a fairly basic optimization in the CFG-based compiler domain, and it's similar to constructor specialization, but it doesn't seem to be in GHC's repertoire. Perhaps it's usually subsumed by other optimizations or it's more complicated than I am thinking. Is this optimization worth implementing?
This optimization can help when a case expression returns a product, some fields of which are the same in all branches. The following program is a minimal example of an optimizable situation that GHC doesn't exploit.
{-# OPTIONS_GHC -O3 -funbox-strict-fields #-}
data D = D !Int !Int
foo n = if n > 0
then D 0 0
else D 0 n
main =
case foo $ read "7"
of D x y -> if x == 0 then return () else print y >> putStrLn "A"
After inlining and case-of-case transformation, GHC produces
main = let n = read "7"
k x y = case x of {0 -> return (); _ -> print y >> putStrLn "A"}
in if n > 0
Categories: Offsite Discussion
New gtk2hs 0.12.4 release
Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!
~d
Categories: Incoming News