simonpj@microsoft.com [Thu, 9 Apr 2009 14:09:59 +0000 (14:09 +0000)]
Use return instead of returnM, and similar tidy-ups
Ian Lynagh [Sat, 4 Apr 2009 00:34:45 +0000 (00:34 +0000)]
Don't use thread local storage on x86/not-Linux
With the
On x86, use thread-local storage instead of stealing a reg for gct
patch, on Windows and OS X:
error: thread-local storage not supported for this target
Ian Lynagh [Tue, 31 Mar 2009 18:19:48 +0000 (18:19 +0000)]
Make some showSDoc's use OneLineMode rather than PageMode
Ian Lynagh [Tue, 31 Mar 2009 17:41:03 +0000 (17:41 +0000)]
Make the showSDoc definition more explicit
dias@eecs.tufts.edu [Fri, 3 Apr 2009 20:34:29 +0000 (20:34 +0000)]
eliminate warnings
dias@eecs.tufts.edu [Fri, 3 Apr 2009 20:15:04 +0000 (20:15 +0000)]
Debugging by Sesame Street:
One of these things is not like the others:
stdPattern :: [LRep] -> Maybe StgHalfWord
stdPattern reps
= case reps of
[] -> Just ARG_NONE -- just void args, probably
[N] -> Just ARG_N
[P] -> Just ARG_N
[F] -> Just ARG_F
[D] -> Just ARG_D
[L] -> Just ARG_L
Today's debugging session was brought to you by the letter P.
dias@eecs.tufts.edu [Tue, 31 Mar 2009 14:46:39 +0000 (14:46 +0000)]
Buggy optimizations caused function-call return to share the function's entry point
- Block concat and branch-chain elimination were allowing a function call
to return to the caller's entry point. But that doesn't leave anywhere
for the infotable on the stack, since the SP on return must be the same
as the SP on entry to the procedure.
dias@eecs.tufts.edu [Wed, 25 Mar 2009 16:38:15 +0000 (16:38 +0000)]
Better handling of node parameter in calling conventions
- Previously, the node was taken as a parameter, then ignored,
for static closures. Goofy. Now, the vestigial node parameters
are gone.
dias@eecs.tufts.edu [Mon, 23 Mar 2009 20:47:44 +0000 (20:47 +0000)]
When calling gc, avoid saving node in static closures
dias@eecs.tufts.edu [Mon, 23 Mar 2009 20:11:40 +0000 (20:11 +0000)]
Code simplifications due to call/return separation; some improvements to how node argument is managed
dias@eecs.tufts.edu [Mon, 23 Mar 2009 18:22:14 +0000 (18:22 +0000)]
Code simplification due to separate call/return conventions
dias@eecs.tufts.edu [Mon, 23 Mar 2009 17:47:00 +0000 (17:47 +0000)]
Calls with and without passing node arguments more clearly separated
dias@eecs.tufts.edu [Mon, 23 Mar 2009 17:28:37 +0000 (17:28 +0000)]
Another small step: call and return conventions specified separately when making calls
dias@eecs.tufts.edu [Mon, 23 Mar 2009 17:07:06 +0000 (17:07 +0000)]
Small step toward call-conv improvement: separate out calls and returns
Simon Marlow [Fri, 3 Apr 2009 12:18:16 +0000 (12:18 +0000)]
On x86, use thread-local storage instead of stealing a reg for gct
Benchmarks show that using TLS instead of stealing a register is
better by a few percent on x86, due to the lack of registers.
This only affects -threaded; without -threaded we're (now) using
static storage for the GC data.
Simon Marlow [Fri, 3 Apr 2009 12:14:43 +0000 (12:14 +0000)]
in the non-threaded RTS, use a static gc_thread structure
Simon Marlow [Fri, 3 Apr 2009 08:37:08 +0000 (08:37 +0000)]
small GC optimisation
Simon Marlow [Thu, 2 Apr 2009 10:56:43 +0000 (10:56 +0000)]
add -funroll-loops when compiling the parallel version of Evac.c too
Simon Marlow [Thu, 2 Apr 2009 10:55:40 +0000 (10:55 +0000)]
PACKAGE_CPP_OPTS += -DPAPI_INCLUDE_DIR=""
unbreaks ghc-pkg check in an installed GHC
simonpj@microsoft.com [Fri, 3 Apr 2009 08:46:34 +0000 (08:46 +0000)]
Adjust inlining heursitics
This patch is the result of a long series of nofib-based experiments
to improve GHC's inlining heuristics.
In the end, I'm not sure how worthwhile it all was: I only got a
1% decrease in code size
1% decrease in allocation
and I don't trust the runtime statistics enough to quote.
Still, in doing all this I tidied up the code quite a bit, and
I understand it much better now, so I'm going to commit it.
The main changes are in CoreUnfold, which has lots of new comments.
Other changes:
- litSize moves from Literal to CoreUnfold
- interestingArg moves from SimplUtils to CoreUnfold
- the default unfolding threshold (in StaticFlags)
reduces from 8 to 6 (since the size calculation
has changed a bit)
simonpj@microsoft.com [Fri, 3 Apr 2009 08:43:33 +0000 (08:43 +0000)]
Worker/wrapper should make INLINE if it doesn't w/w
If worker/wrapper decides not to w/w something on the grounds that
it's too small, it should add an INLINE pragma. Otherwise, later
in the day that small thing might now be big, and we'd wish we'd
done the w/w after all. This only made a difference in one nofib
program (bspt), but it's an easy change.
See Note [Don't w/w inline things (a) and (b)]
simonpj@microsoft.com [Fri, 3 Apr 2009 08:36:55 +0000 (08:36 +0000)]
Rewrite a good chunk of CoreArity
I found a couple of shortcomings in arity computation, and did
quite a bit of refactoring as a result. Regrettably, I have
forgotten the details, but I do remember that one part was to
do with the infamous "state hack". If we're going to use the
state-hack at all, we'd better do it right.
Anyway I think this is an improvement. The comments are more
up to date too, and more voluminous.
simonpj@microsoft.com [Thu, 2 Apr 2009 16:52:26 +0000 (16:52 +0000)]
Comments only; record remarks about removing 'type' nonterminal
simonpj@microsoft.com [Thu, 2 Apr 2009 16:51:01 +0000 (16:51 +0000)]
Don't float case expressions in full laziness
See Note [Case MFEs]; don't float case expressions from
a strict context.
simonpj@microsoft.com [Thu, 2 Apr 2009 15:28:34 +0000 (15:28 +0000)]
Fix Trac #3118: missing alternative
This patch fixes a rather obscure bug, whereby it's possible
for (case C a b of <alts>) to have altenatives that do not inclue
(C a b)! See Note [Unreachable code] in CoreUtils.
simonpj@microsoft.com [Thu, 2 Apr 2009 15:22:46 +0000 (15:22 +0000)]
Use a local interestingDict function instead of importing SimplUtils.interestingArg
I'm changing the details of SimplUtils.interstingArg, and don't want to
mess up the way Specialise works, so this patch makes a specilialised
(ha) function, Specialise.interestingDict, that is used locally.
simonpj@microsoft.com [Thu, 2 Apr 2009 15:18:46 +0000 (15:18 +0000)]
Better panic reporting
Make idDetails and idInfo into proper functions, rather than record
fields, so that we can report more informatively if you use thenm on
a non-Id.
simonpj@microsoft.com [Thu, 2 Apr 2009 15:16:16 +0000 (15:16 +0000)]
Fix pragmas in binder-swapping
In the case binder-swap operation (which is done in OccurAnal),
we deliberately use shadowing. But the new shadowing binder should
not inherit any fancy INLINE or NOINLINE pragmas from its parent.
simonpj@microsoft.com [Thu, 2 Apr 2009 15:14:06 +0000 (15:14 +0000)]
Float constants to top-level even in first full laziness pass
This patch changes the compilation pipeline flags so that constants
are floated to the top level even in the first full laziness pass.
For some reason this was not done before. Fixing this makes a big
improvement in 'spectral/rewrite', and has zero effect on any other
nofib benchmark.
Simon Marlow [Wed, 1 Apr 2009 10:52:56 +0000 (10:52 +0000)]
update the intro section
Simon Marlow [Wed, 1 Apr 2009 10:34:18 +0000 (10:34 +0000)]
Remove the "Installing GHC" section
1. it was out of date in various ways
2. this is not the place people look for installation instructions
3. we have installation instructions elsewhere (e.g. the INSTALL
file in a binary distribution)
4. the section "layout of installed files" is now on the wiki under
Building/Installing.
Ben.Lippmeier@anu.edu.au [Tue, 31 Mar 2009 04:51:45 +0000 (04:51 +0000)]
SPARC: Fix ffi019 split load/store of HsInt64 into two parts to respect alignment constraints
Ben.Lippmeier@anu.edu.au [Mon, 30 Mar 2009 05:17:32 +0000 (05:17 +0000)]
SPARC NCG: Fix 64 bit addition, carry bit wasn't getting set.
Ben.Lippmeier@anu.edu.au [Mon, 30 Mar 2009 05:03:46 +0000 (05:03 +0000)]
SPARC NCG: When getting a 64 bit word, promote halves to 64 bit before shifting
Ben.Lippmeier@anu.edu.au [Tue, 31 Mar 2009 05:19:00 +0000 (05:19 +0000)]
SPARC NCG: HpLim is now always stored on the stack, not in a register
This fixes the out of memory errors we were getting on sparc
after the following patch:
Fri Mar 13 03:45:16 PDT 2009 Simon Marlow <marlowsd@gmail.com>
* Instead of a separate context-switch flag, set HpLim to zero
Ignore-this:
6c5bbe1ce2c5ef551efe98f288483b0
This reduces the latency between a context-switch being triggered and
the thread returning to the scheduler, which in turn should reduce the
cost of the GC barrier when there are many cores.
David Waern [Tue, 31 Mar 2009 21:23:06 +0000 (21:23 +0000)]
Allow Haddock comments in type synonyms
We now use `ctypedoc` instead of `ctype` for type synonyms. `ctypedoc` was
previously only used for top-level type signatures. This change means that type
synonyms now can contain comments, just like top-level type signatures.
Note:
* I've modified `ctypedoc` so it allows implicit parameters and equational
constraints, just like ctype.
* Since `ctypedoc` allows nested foralls, we now allow that in type synonyms.
* I have inlined some productions into gentypedoc so that there is now a
non-doc version of every production with a 'doc' suffix. (Stylistic change
only, which should make the code easier to follow).
* It would have been nice to simplify the grammar by unifying `ctype` and
ctypedoc` into one production, allowing comments on types everywhere (and
rejecting them after parsing, where necessary). This is however not possible
since it leads to ambiguity. The reason is the support for comments on record
fields:
> data R = R { field :: Int -- ^ comment on the field }
If we allow comments on types here, it's not clear if the comment applies
to 'field' or to 'Int'. So we must use `ctype` to describe the type.
Ian Lynagh [Tue, 31 Mar 2009 13:40:58 +0000 (13:40 +0000)]
mkErrorAppDs now takes an SDoc rather than a String
This avoids some showSDoc's where the String then gets converted back
into an SDoc.
Simon Marlow [Mon, 30 Mar 2009 08:44:14 +0000 (08:44 +0000)]
FIX #1779 and qq005: export hs_hpc_module
Simon Marlow [Mon, 30 Mar 2009 08:30:32 +0000 (08:30 +0000)]
go back to using $CPUS + 1 for the number of threads to use
Simon Marlow [Mon, 30 Mar 2009 08:29:57 +0000 (08:29 +0000)]
use a UniqSet for is MathFun, this list is getting quite large
simonpj@microsoft.com [Mon, 30 Mar 2009 08:49:12 +0000 (08:49 +0000)]
Fix an nasty black hole, concerning computation of isRecursiveTyCon
Fixing #246 (pattern-match order in record patterns) made GHC go into
a black hole, by changing the order of patterm matching in
TyCon.isProductTyCon! It turned out that GHC had been avoiding the
black hole only by the narrowest of margins up to now!
The black hole concerned the computation of which type constructors
are recursive, in TcTyDecls.calcRecFlags. We now refrain from using
isProductTyCon there, since it triggers the black hole (very
indirectly). See the "YUK YUK" comment in the body of calcRecFlags.
As it turns out, the fact that TyCon.isProductTyCon matched on the
algTcRec field was quite redundant, so I removed that too. However,
without the fix to calcRecFlags, this wouldn't fix the black hole
because of the use of isRecursiveTyCon in BuildTyCl.mkNewTyConRhs.
Anyway, it's fine now.
simonpj@microsoft.com [Mon, 30 Mar 2009 08:48:35 +0000 (08:48 +0000)]
Add an extra print to -ddump-tc-trace
simonpj@microsoft.com [Mon, 30 Mar 2009 08:47:39 +0000 (08:47 +0000)]
Remove dead code (dataConsStupidTheta)
simonpj@microsoft.com [Mon, 30 Mar 2009 08:37:36 +0000 (08:37 +0000)]
Fix Trac #246: order of matching in record patterns
While I was looking at the desugaring of pattern matching (fixing
Trac #3126) I finally got around to fixing another long-standing bug:
when matching in a record pattern, GHC should match left-to-right in
the programmer-specfied order, *not* left-to-right positionally in
the original record declaration.
Needless to say, that requires a little more code.
See Note [Record patterns] in MatchCon.lhs
simonpj@microsoft.com [Mon, 30 Mar 2009 08:34:35 +0000 (08:34 +0000)]
Fix Trac #3126: matching overloaded literals
Claus Reinke uncovered a long-standing bug in GHC, whereby we were
combining the pattern-match on overloaded literals, missing the fact
that an intervening pattern (for a different literal) might also
match. (If someone had a very odd implementation of fromInteger!)
See Note [Grouping overloaded literal patterns] in Match.lhs
If this merges smoothly to 6.10, go for it, but it's very much
a corner case.
Thank you Claus!
simonpj@microsoft.com [Mon, 30 Mar 2009 08:31:03 +0000 (08:31 +0000)]
White space cosmetics only
simonpj@microsoft.com [Wed, 25 Mar 2009 09:52:05 +0000 (09:52 +0000)]
Improve mkDupableCont; and fix Trac #3116
It turns out that, as a result of a change I made a few months ago to
the representation of SimplCont, it's easy to solve the optimisation
challenge posed by Trac #3116. Hurrah.
Extensive comments in Note [Duplicating StrictArg].
simonpj@microsoft.com [Mon, 23 Mar 2009 10:38:26 +0000 (10:38 +0000)]
Avoid quadratic complexity in occurrence analysis (fix Trac #1969)
The occurrence analyser could go out to lunch in bad cases, because
of its clever loop-breaking algorithm. This patch makes it bale out
in bad cases. Somewhat ad-hoc: a nicer solution would be welcome.
See Note [Complexity of loop breaking] for the details.
simonpj@microsoft.com [Mon, 23 Mar 2009 10:16:14 +0000 (10:16 +0000)]
Improve arity propagation in the specialiser
This patch makes the specialiser propagate arities a bit more
eagerly, which avoids a spurious warning in the simplifier.
See Note [Arity decrease] in Simplify.lhs
Simon Marlow [Thu, 26 Mar 2009 14:03:43 +0000 (14:03 +0000)]
check for ThreadRelocated in checkBlackHoles()
Ian Lynagh [Thu, 26 Mar 2009 13:05:17 +0000 (13:05 +0000)]
syb no longer needs to be wired in
Manuel M T Chakravarty [Thu, 26 Mar 2009 10:02:08 +0000 (10:02 +0000)]
Template Haskell: added bang patterns
Manuel M T Chakravarty [Thu, 26 Mar 2009 08:55:20 +0000 (08:55 +0000)]
Template Haskell: support for kind annotations
Bertram Felgenhauer [Mon, 23 Mar 2009 18:36:30 +0000 (18:36 +0000)]
update list of C math functions
Fix via C compilation of modules that import, say, log1p from math.h (#3117)
The list is based on preprocessing Stg.h with glibc 2.6.1 headers, and
cross-checked with the ISO C 99 standard (draft).
Manuel M T Chakravarty [Wed, 25 Mar 2009 03:34:47 +0000 (03:34 +0000)]
Template Haskell: make reify aware of type families
- Reifying a type family returns a TH family declaration
- Reifying a data constructor from a data instance attributes that
constructor to the family (not the representation tycon)
- Ideally, we should have facilities to reify all type/data instances of a
given family (and the same for instances of a class). I haven't added that
here as it involves some API design.
Manuel M T Chakravarty [Tue, 24 Mar 2009 23:29:40 +0000 (23:29 +0000)]
Template Haskell: support for INLINE and SPECIALISE pragmas
Simon Marlow [Sun, 22 Mar 2009 19:54:41 +0000 (19:54 +0000)]
fix an fprintf that should be fputs (quiets gcc)
Simon Marlow [Sun, 22 Mar 2009 19:53:19 +0000 (19:53 +0000)]
check return value of write (quiets gcc)
Simon Marlow [Mon, 23 Mar 2009 09:29:53 +0000 (09:29 +0000)]
Fix locking in evacuate_large() (FIX openfile008(threaded2))
Austin Seipp [Fri, 20 Mar 2009 12:48:46 +0000 (12:48 +0000)]
Please the -Wall police by moving a variable declaration; really FIX getNumberOfProcessors() for MacOS X
Austin Seipp [Fri, 20 Mar 2009 12:00:43 +0000 (12:00 +0000)]
wibble in setExecutable
Austin Seipp [Wed, 18 Mar 2009 02:31:27 +0000 (02:31 +0000)]
FIX getNumberOfProcessors() on MacOS X
This checks if darwin_HOST_OS is defined and, if so, we call
sysctlbyname() on the "hw.ncpu" property to get the processor count.
Ian Lynagh [Thu, 19 Mar 2009 17:15:01 +0000 (17:15 +0000)]
Work around Solaris's grep not supporting -q
Ian Lynagh [Thu, 19 Mar 2009 16:59:16 +0000 (16:59 +0000)]
Some wording wibbles from Thorkil
Simon Marlow [Fri, 20 Mar 2009 10:04:46 +0000 (10:04 +0000)]
Fix bug in setThreadAffinity() (Linux)
Manuel M T Chakravarty [Fri, 20 Mar 2009 07:13:47 +0000 (07:13 +0000)]
Implement setThreadAffinity for Mac OS X (from 10.5)
Simon Marlow [Thu, 19 Mar 2009 12:49:32 +0000 (12:49 +0000)]
Fix warnings with older versions of gcc (3.4.5)
Simon Marlow [Wed, 18 Mar 2009 16:59:36 +0000 (16:59 +0000)]
wibble for getNumberOfProcessors
Simon Marlow [Wed, 18 Mar 2009 15:47:19 +0000 (15:47 +0000)]
Set thread affinity with +RTS -qa (only on Linux so far)
Manuel M T Chakravarty [Thu, 19 Mar 2009 13:23:47 +0000 (13:23 +0000)]
Template Haskell support for equality constraints
Simon Marlow [Thu, 19 Mar 2009 10:21:26 +0000 (10:21 +0000)]
add missing case in ENTER() (fixes readwrite002(profasm) crash)
Simon Marlow [Thu, 19 Mar 2009 10:09:54 +0000 (10:09 +0000)]
FIX unregisterised build
Manuel M T Chakravarty [Thu, 19 Mar 2009 08:43:06 +0000 (08:43 +0000)]
Template Haskell: support for type family declarations
dias@eecs.tufts.edu [Wed, 18 Mar 2009 21:01:38 +0000 (21:01 +0000)]
Comment explaining use of seq in DFMonad
Simon Marlow [Wed, 18 Mar 2009 15:12:55 +0000 (15:12 +0000)]
FIX unregisterised target by #ifdefing targetPlatform stuff
I'm not sure if this is the correct fix. If targetPlatform is really
NCG-specific, then maybe we should call it asmTargetPlatform or
something.
dias@eecs.tufts.edu [Wed, 18 Mar 2009 15:13:43 +0000 (15:13 +0000)]
Removed a trace
dias@eecs.tufts.edu [Tue, 17 Mar 2009 20:42:38 +0000 (20:42 +0000)]
Calling convention bug and cleanup
- yet another wrong calling convention; this one was a special case for returning one
value.
dias@eecs.tufts.edu [Mon, 16 Mar 2009 21:46:54 +0000 (21:46 +0000)]
Inconsistent type and arguments in safe foreign calls...
- The function argument was stripped from the argument list but not from the type.
Now they're both stripped.
dias@eecs.tufts.edu [Mon, 16 Mar 2009 21:35:06 +0000 (21:35 +0000)]
stack overflows and out of memory's
1. Stack overflow fixed by making dataflow monad strict in the state.
2. Out of memory fixed by "forgetting" lastoutfacts in the dataflow monad
where we should. We were creating an unnecessarily long list that grew
exponentially...
simonpj@microsoft.com [Wed, 18 Mar 2009 10:59:11 +0000 (10:59 +0000)]
Add the notion of "constructor-like" Ids for rule-matching
This patch adds an optional CONLIKE modifier to INLINE/NOINLINE pragmas,
{-# NOINLINE CONLIKE [1] f #-}
The effect is to allow applications of 'f' to be expanded in a potential
rule match. Example
{-# RULE "r/f" forall v. r (f v) = f (v+1) #-}
Consider the term
let x = f v in ..x...x...(r x)...
Normally the (r x) would not match the rule, because GHC would be scared
about duplicating the redex (f v). However the CONLIKE modifier says to
treat 'f' like a constructor in this situation, and "look through" the
unfolding for x. So (r x) fires, yielding (f (v+1)).
The main changes are:
- Syntax
- The inlinePragInfo field of an IdInfo has a RuleMatchInfo
component, which records whether or not the Id is CONLIKE.
Of course, this needs to be serialised in interface files too.
- The occurrence analyser (OccAnal) and simplifier (Simplify) treat
CONLIKE thing like constructors, by ANF-ing them
- New function coreUtils.exprIsExpandable is like exprIsCheap, but
additionally spots applications of CONLIKE functions
- A CoreUnfolding has a field that caches exprIsExpandable
- The rule matcher consults this field. See
Note [Expanding variables] in Rules.lhs.
On the way I fixed a lurking variable bug in the way variables are
expanded. See Note [Do not expand locally-bound variables] in
Rule.lhs. I also did a bit of reformatting and refactoring in
Rules.lhs, so the module has more lines changed than are really
different.
Simon Marlow [Wed, 18 Mar 2009 11:18:47 +0000 (11:18 +0000)]
Fixes to "Retract Hp *before* checking for HpLim==0"
Simon Marlow [Tue, 17 Mar 2009 16:42:14 +0000 (16:42 +0000)]
Add fast event logging
Generate binary log files from the RTS containing a log of runtime
events with timestamps. The log file can be visualised in various
ways, for investigating runtime behaviour and debugging performance
problems. See for example the forthcoming ThreadScope viewer.
New GHC option:
-eventlog (link-time option) Enables event logging.
+RTS -l (runtime option) Generates <prog>.eventlog with
the binary event information.
This replaces some of the tracing machinery we already had in the RTS:
e.g. +RTS -vg for GC tracing (we should do this using the new event
logging instead).
Event logging has almost no runtime cost when it isn't enabled, though
in the future we might add more fine-grained events and this might
change; hence having a link-time option and compiling a separate
version of the RTS for event logging. There's a small runtime cost
for enabling event-logging, for most programs it shouldn't make much
difference.
(Todo: docs)
Simon Marlow [Tue, 17 Mar 2009 14:49:39 +0000 (14:49 +0000)]
FIX biographical profiling (#3039, probably #2297)
Since we introduced pointer tagging, we no longer always enter a
closure to evaluate it. However, the biographical profiler relies on
closures being entered in order to mark them as "used", so we were
getting spurious amounts of data attributed to VOID. It turns out
there are various places that need to be fixed, and I think at least
one of them was also wrong before pointer tagging (CgCon.cgReturnDataCon).
Simon Marlow [Tue, 17 Mar 2009 09:33:09 +0000 (09:33 +0000)]
Add getNumberOfProcessors(), FIX MacOS X build problem (hopefully)
Somebody needs to implement getNumberOfProcessors() for MacOS X,
currently it will return 1.
Simon Marlow [Mon, 16 Mar 2009 20:34:37 +0000 (20:34 +0000)]
FIX #3093: stub filenames when using -osuf
Also remove some unused cruft
Simon Marlow [Mon, 16 Mar 2009 16:05:34 +0000 (16:05 +0000)]
Don't call processHeapClosureForDead on pinned blocks
Fixes heapprof001(prof_hp) after fix for #2917
Simon Marlow [Mon, 16 Mar 2009 16:05:00 +0000 (16:05 +0000)]
Retract Hp *before* checking for HpLim==0
Fixes heapprof001(prof_hp) following the recent HpLim patch, which
depended on the lack of slop in the heap.
Simon Marlow [Fri, 13 Mar 2009 15:56:19 +0000 (15:56 +0000)]
eliminate some not-quite-duplicate code
Simon Marlow [Fri, 13 Mar 2009 15:56:02 +0000 (15:56 +0000)]
start finalizers on the current Capability rather than last_free_capability
Simon Marlow [Tue, 17 Feb 2009 13:27:57 +0000 (13:27 +0000)]
cope with ThreadRelocated on the sleeping_queue
simonpj@microsoft.com [Mon, 16 Mar 2009 17:47:06 +0000 (17:47 +0000)]
Fix Trac #3095, and make RdrHsSyn warning-clean
simonpj@microsoft.com [Mon, 16 Mar 2009 16:46:19 +0000 (16:46 +0000)]
Layout only
simonpj@microsoft.com [Mon, 16 Mar 2009 16:45:02 +0000 (16:45 +0000)]
Reject foralls in constructor args in 'deriving', except for Functor etc
simonpj@microsoft.com [Mon, 16 Mar 2009 16:40:49 +0000 (16:40 +0000)]
Fix Trac #3092
We were't checking that a 'data/type instance' was extending a family
type constructor.
Merge to 6.10 if we ever release 6.10.3 (or do it for 6.10.2).
Manuel M T Chakravarty [Sun, 15 Mar 2009 06:57:09 +0000 (06:57 +0000)]
Ensure the orientation of var-var equalities is correct for instatiation
- During fianlisation we use to occasionally swivel variable-variable equalities
- Now, normalisation ensures that they are always oriented as appropriate for
instantation.
- Also fixed #1899 properly; the previous fix fixed a symptom, not the cause.
Simon Marlow [Fri, 13 Mar 2009 13:51:16 +0000 (13:51 +0000)]
Use work-stealing for load-balancing in the GC
New flag: "+RTS -qb" disables load-balancing in the parallel GC
(though this is subject to change, I think we will probably want to do
something more automatic before releasing this).
To get the "PARGC3" configuration described in the "Runtime support
for Multicore Haskell" paper, use "+RTS -qg0 -qb -RTS".
The main advantage of this is that it allows us to easily disable
load-balancing altogether, which turns out to be important in parallel
programs. Maintaining locality is sometimes more important that
spreading the work out in parallel GC. There is a side benefit in
that the parallel GC should have improved locality even when
load-balancing, because each processor prefers to take work from its
own queue before stealing from others.
simonpj@microsoft.com [Fri, 13 Mar 2009 13:44:36 +0000 (13:44 +0000)]
Fix Trac #3087: derived Data now defines dataCast1/2
This patch generates code in deriving(Data) for dataCast1 or 2 as
appropriate.
While I was there I did some refactoring (of course), pulling out
the TcDeriv.inferConstraints as a separate function.
I don't think it's worth merging this to 6.10.2, even though it's a bugfix,
because it modifies code that I added in the HEAD only (for deriving Functor)
so the merge will be sligtly awkward. And there's an easy workaround.
simonpj@microsoft.com [Fri, 13 Mar 2009 13:44:02 +0000 (13:44 +0000)]
Adjust error message slightly to make it clearer
Simon Marlow [Fri, 13 Mar 2009 13:23:39 +0000 (13:23 +0000)]
just comment formatting
Simon Marlow [Fri, 13 Mar 2009 11:46:46 +0000 (11:46 +0000)]
Add "+RTS -N" to determine the -N value automatically (see #1741)