Simon Marlow [Wed, 31 Oct 2007 13:07:18 +0000 (13:07 +0000)]
Initial parallel GC support
eg. use +RTS -g2 -RTS for 2 threads. Only major GCs are parallelised,
minor GCs are still sequential. Don't use more threads than you
have CPUs.
It works most of the time, although you won't see much speedup yet.
Tuning and more work on stability still required.
Simon Marlow [Wed, 31 Oct 2007 12:51:36 +0000 (12:51 +0000)]
Refactoring of the GC in preparation for parallel GC
This patch localises the state of the GC into a gc_thread structure,
and reorganises the inner loop of the GC to scavenge one block at a
time from global work lists in each "step". The gc_thread structure
has a "workspace" for each step, in which it collects evacuated
objects until it has a full block to push out to the step's global
list. Details of the algorithm will be on the wiki in due course.
At the moment, THREADED_RTS does not compile, but the single-threaded
GC works (and is 10-20% slower than before).
Simon Marlow [Tue, 30 Oct 2007 14:45:09 +0000 (14:45 +0000)]
also count total dispatch stalls in +RTS -as
Simon Marlow [Tue, 30 Oct 2007 13:00:52 +0000 (13:00 +0000)]
move GetRoots() to GC.c
Ian Lynagh [Mon, 16 Jun 2008 22:52:48 +0000 (22:52 +0000)]
Tweak a comment to talk about UnboxedTuples rather than -fglasgow-exts
Ian Lynagh [Mon, 16 Jun 2008 21:34:38 +0000 (21:34 +0000)]
Suggest -XRelaxedPolyRec rather than -fglasgow-exts in an error message
Ian Lynagh [Wed, 11 Jun 2008 12:28:37 +0000 (12:28 +0000)]
Fix the splitter with perl 5.10; patch from Audrey Tang
Ian Lynagh [Mon, 16 Jun 2008 18:14:25 +0000 (18:14 +0000)]
Remove some build system code that can't happen
ghc_ge_601 is no longer defined
simonpj@microsoft.com [Sat, 14 Jun 2008 12:39:39 +0000 (12:39 +0000)]
Fix Trac #2358: 1-tuples in Template Haskell
fons points out that TH was treating 1-tuples inconsistently. Generally
we make a 1-tuple into a no-op, so that (e) and e are the same. But
I'd forgotten to do this for types.
It is possible to have a type with an un-saturated 1-tuple type
constructor. That now elicits an error message when converting from
TH syntax to Hs syntax
simonpj@microsoft.com [Sat, 14 Jun 2008 02:39:37 +0000 (02:39 +0000)]
Fix nasty Simplifier scoping bug
This bug was somehow tickled by the new code for desugaring
polymorphic bindings, but the bug has been there a long time. The
bindings floated out in simplLazyBind, generated by abstractFloats,
were getting processed by postInlineUnconditionally. But that was
wrong because part of their scope has already been processed.
That led to a bit of refactoring in the simplifier. See comments
with Simplify.addPolyBind.
In principle this might happen in 6.8.3, but in practice it doesn't seem
to, so probably not worth merging.
simonpj@microsoft.com [Sat, 14 Jun 2008 02:38:09 +0000 (02:38 +0000)]
CoreLint should check for out-of-scope worker
Ian Lynagh [Mon, 16 Jun 2008 14:29:17 +0000 (14:29 +0000)]
More commandline flag improvements
* Allow -ffoo flags to be deprecated
* Mark some -ffoo flags as deprecated
* Avoid using deprecated flags in error messages, in the build system, etc
* Add a flag to en/disable the deprecated flag warning
Ian Lynagh [Mon, 16 Jun 2008 11:11:14 +0000 (11:11 +0000)]
Remove an ifdef
Ian Lynagh [Sun, 15 Jun 2008 13:46:36 +0000 (13:46 +0000)]
Add ghc_ge_609
Ian Lynagh [Sun, 15 Jun 2008 13:37:43 +0000 (13:37 +0000)]
Remove an ifdef
Ian Lynagh [Sun, 15 Jun 2008 01:08:26 +0000 (01:08 +0000)]
Don't compile Cabal with -cpp -fffi
Instead rely on the sources having suitable pragmas
Ian Lynagh [Sun, 15 Jun 2008 00:59:56 +0000 (00:59 +0000)]
Remove a typo
Ian Lynagh [Sun, 15 Jun 2008 00:00:41 +0000 (00:00 +0000)]
Allow -X flags to be deprecated, and deprecate RecordPuns; fixes #2320
Ian Lynagh [Sat, 14 Jun 2008 21:53:46 +0000 (21:53 +0000)]
Fix a warning in DsForeign
Ian Lynagh [Sat, 14 Jun 2008 21:26:27 +0000 (21:26 +0000)]
Fix warnings in Linker
Ian Lynagh [Sat, 14 Jun 2008 21:15:39 +0000 (21:15 +0000)]
Use the right set of linkables in unload_wkr
Ian Lynagh [Sat, 14 Jun 2008 21:14:14 +0000 (21:14 +0000)]
Use bracket_ rather than bracket in withExtendedLinkEnv
Ian Lynagh [Sat, 14 Jun 2008 20:51:31 +0000 (20:51 +0000)]
Remove more ifdeffery
Ian Lynagh [Sat, 14 Jun 2008 20:42:34 +0000 (20:42 +0000)]
Remove more ifdeffery
Ian Lynagh [Sat, 14 Jun 2008 20:32:15 +0000 (20:32 +0000)]
Remove more ifdeffery
Ian Lynagh [Sat, 14 Jun 2008 20:26:40 +0000 (20:26 +0000)]
Remove some ifdeffery
Ian Lynagh [Sat, 14 Jun 2008 20:15:58 +0000 (20:15 +0000)]
Fix some warnings in ParsePkgConf
Ian Lynagh [Sat, 14 Jun 2008 20:08:20 +0000 (20:08 +0000)]
Fix warnings in DsForeign
Ian Lynagh [Sat, 14 Jun 2008 19:56:11 +0000 (19:56 +0000)]
Fix warnings in PprCore
Ian Lynagh [Sat, 14 Jun 2008 19:41:20 +0000 (19:41 +0000)]
Fix warnings in Main
Ian Lynagh [Sat, 14 Jun 2008 19:35:36 +0000 (19:35 +0000)]
Set -Wall in compiler/Makefile.ghcbin
Ian Lynagh [Sat, 14 Jun 2008 19:05:05 +0000 (19:05 +0000)]
Use maybePrefixMatch in StaticFlags rather than redefining it ourselves
Ian Lynagh [Sat, 14 Jun 2008 18:17:40 +0000 (18:17 +0000)]
Use -fforce-recomp rather than -no-recomp
Ian Lynagh [Sat, 14 Jun 2008 17:48:50 +0000 (17:48 +0000)]
Tweak the deprecated flags warning
Ian Lynagh [Sat, 14 Jun 2008 17:12:56 +0000 (17:12 +0000)]
Use -O0 rather than -Onot in compiler/Makefile
Ian Lynagh [Sat, 14 Jun 2008 16:56:49 +0000 (16:56 +0000)]
Don't use -recomp whem compiling GHC, as it's the default (and now deprecated)
Ian Lynagh [Sat, 14 Jun 2008 16:19:27 +0000 (16:19 +0000)]
Use -fforce-recomp rather than -no-recomp when building genapply
Ian Lynagh [Sat, 14 Jun 2008 16:18:51 +0000 (16:18 +0000)]
Get -recomp and -no-recomp the right way round
Ian Lynagh [Sat, 14 Jun 2008 15:23:37 +0000 (15:23 +0000)]
Fix conversions between Double/Float and simple-integer
Ian Lynagh [Tue, 3 Jun 2008 17:29:47 +0000 (17:29 +0000)]
Use unified diff
Ian Lynagh [Sat, 14 Jun 2008 15:21:31 +0000 (15:21 +0000)]
Use -O0 rather than the deprecated -Onot
Ian Lynagh [Sat, 14 Jun 2008 14:58:40 +0000 (14:58 +0000)]
Handle errors in an OPTIONS pragma when preprocessing
Ian Lynagh [Sat, 14 Jun 2008 14:48:29 +0000 (14:48 +0000)]
Allow flags to be marked as deprecated
Ian Lynagh [Sat, 14 Jun 2008 14:20:56 +0000 (14:20 +0000)]
eta-reduce a Monad type synonym, so we can use it non-applied
Ian Lynagh [Sat, 14 Jun 2008 13:38:48 +0000 (13:38 +0000)]
Use a proper datatype, rather than pairs, for flags
Ian Lynagh [Sat, 14 Jun 2008 13:32:24 +0000 (13:32 +0000)]
Fix warnings in DriverMkDepend
Ian Lynagh [Sat, 14 Jun 2008 13:29:14 +0000 (13:29 +0000)]
Fix whitespace in DriverMkDepend
Ian Lynagh [Sat, 14 Jun 2008 12:50:33 +0000 (12:50 +0000)]
Fix the last warnings in DynFlags
We might want to put the values initSysTools finds in their own type,
rather than having them flattened into DynFlags
Ian Lynagh [Sat, 14 Jun 2008 12:34:27 +0000 (12:34 +0000)]
Pass dynflags down to loadPackageConfig rather than using defaultDynFlags
Ian Lynagh [Sat, 14 Jun 2008 12:28:34 +0000 (12:28 +0000)]
Make initSysTools use the dflags it is passed, rather than defaultDynFlags
Ian Lynagh [Sat, 14 Jun 2008 12:20:57 +0000 (12:20 +0000)]
Remove some unused bindings from HaddockLex
Ian Lynagh [Sat, 14 Jun 2008 12:11:56 +0000 (12:11 +0000)]
Pass dynflags down through to pragState
so we no longer need to use defaultDynFlags there
Ian Lynagh [Sat, 14 Jun 2008 12:03:16 +0000 (12:03 +0000)]
Whitespace only in DynFlags
Ian Lynagh [Fri, 13 Jun 2008 20:35:53 +0000 (20:35 +0000)]
Define and use is_decdigit for lexing escapes; fixes trac #2304
Ian Lynagh [Thu, 12 Jun 2008 14:17:38 +0000 (14:17 +0000)]
Make SysTools warning-free
Ian Lynagh [Thu, 12 Jun 2008 00:27:11 +0000 (00:27 +0000)]
Remove some CPPery with the help of a new value isWindowsHost in Util
isWindowsHost is True iff mingw32_HOST_OS is defined.
Ian Lynagh [Thu, 12 Jun 2008 00:19:36 +0000 (00:19 +0000)]
Remove unused FFI import GetTempPathA (getTempPath)
Ian Lynagh [Wed, 11 Jun 2008 23:31:29 +0000 (23:31 +0000)]
Whitespace only, in SysTools
Ian Lynagh [Wed, 11 Jun 2008 23:04:33 +0000 (23:04 +0000)]
Get rid of the last remnants of PROJECT_DIR
This disappeared when we stopped being "fptools" and became just "ghc"
Ian Lynagh [Wed, 11 Jun 2008 15:54:56 +0000 (15:54 +0000)]
Tell the testsuite how many threads we want it to use when validating
Ian Lynagh [Tue, 10 Jun 2008 12:53:17 +0000 (12:53 +0000)]
Fix warnings in LexCore
Ian Lynagh [Tue, 10 Jun 2008 12:42:23 +0000 (12:42 +0000)]
Fix warnings in Ctype
Ian Lynagh [Tue, 10 Jun 2008 12:33:43 +0000 (12:33 +0000)]
Fix warnings in TcPat
Ian Lynagh [Tue, 10 Jun 2008 12:18:19 +0000 (12:18 +0000)]
Fix warnings in TcEnv
Ian Lynagh [Fri, 6 Jun 2008 23:47:04 +0000 (23:47 +0000)]
Fix warnings in TcRnTypes
Ian Lynagh [Fri, 6 Jun 2008 21:32:39 +0000 (21:32 +0000)]
Fix warnings in TcTyClsDecls
Ian Lynagh [Fri, 6 Jun 2008 20:48:54 +0000 (20:48 +0000)]
Fix warnings in TcHsType
Ian Lynagh [Fri, 6 Jun 2008 20:24:35 +0000 (20:24 +0000)]
Fix warnings in TcSimplify
Ian Lynagh [Fri, 6 Jun 2008 20:08:00 +0000 (20:08 +0000)]
Fix warnings in TcRules
Ian Lynagh [Fri, 6 Jun 2008 20:05:34 +0000 (20:05 +0000)]
Fix warnings in TcInstDcls
Ian Lynagh [Fri, 6 Jun 2008 19:49:31 +0000 (19:49 +0000)]
Fix warnings in TcMType
Ian Lynagh [Fri, 6 Jun 2008 19:26:10 +0000 (19:26 +0000)]
Fix warnings in TcForeign
Ian Lynagh [Fri, 6 Jun 2008 19:14:13 +0000 (19:14 +0000)]
Fix warnings in TcClassDcl
Ian Lynagh [Fri, 6 Jun 2008 18:46:31 +0000 (18:46 +0000)]
Fix a bug in eqPatType
One of the conditions we were checking was
t2 `eqPatLType` t2
rather than
t1 `eqPatLType` t2
Ian Lynagh [Fri, 6 Jun 2008 18:44:15 +0000 (18:44 +0000)]
Show whether DEBUG is on in ghc --info
Ian Lynagh [Fri, 6 Jun 2008 13:38:17 +0000 (13:38 +0000)]
Use -fno-toplevel-reorder with gcc >= 4.2 on sparc-solaris; fixes trac #2312
Ian Lynagh [Fri, 6 Jun 2008 13:09:55 +0000 (13:09 +0000)]
Teach configure about amd64/NetBSD; fixes trac #2348
Ian Lynagh [Fri, 6 Jun 2008 13:07:06 +0000 (13:07 +0000)]
Enable the mangler for netbsd/amd64; fixes trac #2347
simonpj@microsoft.com [Fri, 6 Jun 2008 12:24:59 +0000 (12:24 +0000)]
Improve documentation for standalone deriving
simonpj@microsoft.com [Fri, 6 Jun 2008 12:17:30 +0000 (12:17 +0000)]
Fix Trac #2334: validity checking for type families
When we deal with a family-instance declaration (TcTyClsDecls.tcFamInstDecl)
we must check the TyCon for validity; for example, that a newtype has exactly
one field. That is done all-at-once for normal declarations, and had been
forgotten altogether for families.
I also refactored the interface to tcFamInstDecl1 slightly.
A slightly separate matter: if there's an error in family instances
(e.g. overlap) we get a confusing error message cascade if we attempt to
deal with 'deriving' clauses too; this patch bales out earlier in that case.
Another slightly separate matter: standalone deriving for family
instances can legitimately have more specific types, just like normal
data decls. For example
data instance F [a] = ...
deriving instance (Eq a, Eq b) => Eq (F [(a,b)])
So tcLookupFamInstExact can a bit more forgiving than it was.
simonpj@microsoft.com [Thu, 5 Jun 2008 16:54:34 +0000 (16:54 +0000)]
Vital follow-up to fix of Trac #2045
Sorry -- my 'validate' didn't work right and I missed a trick.
This patch must accompany
* Fix Trac #2045: use big-tuple machiney for implication constraints
simonpj@microsoft.com [Thu, 5 Jun 2008 14:56:17 +0000 (14:56 +0000)]
Fix Trac #2045: use big-tuple machiney for implication constraints
simonpj@microsoft.com [Thu, 5 Jun 2008 13:47:43 +0000 (13:47 +0000)]
Comments only
simonpj@microsoft.com [Thu, 5 Jun 2008 12:44:23 +0000 (12:44 +0000)]
Desugar multiple polymorphic bindings more intelligently
Occasionally people write very large recursive groups of definitions.
In general we desugar these to a single definition that binds tuple,
plus lots of tuple selectors. But that code has quadratic size, which
can be bad.
This patch adds a new case to the desugaring of bindings, for the
situation where there are lots of polymorphic variables, but no
dictionaries. (Dictionaries force us into the general case.)
See Note [Abstracting over tyvars only].
The extra behaviour can be disabled with the (static) flag
-fno-ds-multi-tyvar
in case we want to experiment with switching it on or off. There is
essentially-zero effect on the nofib suite though.
I was provoked into doing this by Trac #1136. In fact I'm not sure
it's the real cause of the problem there, but it's a good idea anyway.
simonpj@microsoft.com [Thu, 5 Jun 2008 12:36:12 +0000 (12:36 +0000)]
Add non-recursive let-bindings for types
This patch adds to Core the ability to say
let a = Int in <body>
where 'a' is a type variable. That is: a type-let.
See Note [Type let] in CoreSyn.
* The binding is always non-recursive
* The simplifier immediately eliminates it by substitution
So in effect a type-let is just a delayed substitution. This is convenient
in a couple of places in the desugarer, one existing (see the call to
CoreTyn.mkTyBind in DsUtils), and one that's in the next upcoming patch.
The first use in the desugarer was previously encoded as
(/\a. <body>) Int
rather that eagerly substituting, but that was horrid because Core Lint
had do "know" that a=Int inside <body> else it would bleat. Expressing
it directly as a 'let' seems much nicer.
simonpj@microsoft.com [Wed, 4 Jun 2008 15:02:07 +0000 (15:02 +0000)]
Fix Trac #2339: reify (mkName "X")
simonpj@microsoft.com [Wed, 4 Jun 2008 14:51:15 +0000 (14:51 +0000)]
Fix Trac #2310: result type signatures are not supported any more
We have not supported "result type signatures" for some time, but
using one in the wrong way caused a crash. This patch tidies it up.
simonpj@microsoft.com [Wed, 4 Jun 2008 14:40:49 +0000 (14:40 +0000)]
Sort modules and packages in debug print (reduce test wobbles)
This affects only the debug print TcRnDriver.pprTcGblEnv, and eliminates
test-suite wobbling (affected me for tc168, tc231)
Simon Marlow [Wed, 4 Jun 2008 11:30:02 +0000 (11:30 +0000)]
Fix #2334: tyvar binders can have Names inside (equality predicates)
Simon Marlow [Wed, 4 Jun 2008 10:54:58 +0000 (10:54 +0000)]
fix pointer tagging bug in removeIndirections (fixes stableptr003)
Simon Marlow [Wed, 4 Jun 2008 09:36:53 +0000 (09:36 +0000)]
Fix unreg build
Simon Marlow [Wed, 4 Jun 2008 09:12:44 +0000 (09:12 +0000)]
tiny tweak to the stack squeezing heuristic (fixes cg060)
Manuel M T Chakravarty [Wed, 4 Jun 2008 02:13:21 +0000 (02:13 +0000)]
MacOS installer: don't quote XCODE_EXTRA_CONFIGURE_ARGS
Manuel M T Chakravarty [Wed, 4 Jun 2008 02:01:55 +0000 (02:01 +0000)]
MacOS installer: terminate build on intermediate failure
simonpj@microsoft.com [Tue, 3 Jun 2008 13:46:45 +0000 (13:46 +0000)]
Fix Trac #2331 (error message suggestion)
simonpj@microsoft.com [Fri, 30 May 2008 15:51:37 +0000 (15:51 +0000)]
Improve documentation of RULES
simonpj@microsoft.com [Fri, 30 May 2008 13:33:07 +0000 (13:33 +0000)]
Improve documentation for INLINE pragma
Simon Marlow [Tue, 3 Jun 2008 11:20:30 +0000 (11:20 +0000)]
add debugDumpTcRn and use it for some debugging output
Simon Marlow [Tue, 3 Jun 2008 10:54:31 +0000 (10:54 +0000)]
Turn "NOTE: Simplifier still going..." message into a WARN()
Simon Marlow [Tue, 3 Jun 2008 09:45:46 +0000 (09:45 +0000)]
remove the "expanding to size" messages