ghc-hetmet.git
15 years agoChange desugaring of PArr literals
Roman Leshchinskiy [Fri, 12 Sep 2008 01:56:09 +0000 (01:56 +0000)]
Change desugaring of PArr literals

15 years agoExpose the dph packages automatically if -dph-* is set
Roman Leshchinskiy [Fri, 12 Sep 2008 00:44:03 +0000 (00:44 +0000)]
Expose the dph packages automatically if -dph-* is set

15 years agoDon't panic on non-vectorisable expressions
Roman Leshchinskiy [Thu, 11 Sep 2008 05:43:33 +0000 (05:43 +0000)]
Don't panic on non-vectorisable expressions

15 years ago-Odph implies -fno-spec-constr-count
Roman Leshchinskiy [Wed, 10 Sep 2008 04:53:39 +0000 (04:53 +0000)]
-Odph implies -fno-spec-constr-count

15 years agoImprove warning for SpecConstr
simonpj@microsoft.com [Mon, 15 Sep 2008 15:49:08 +0000 (15:49 +0000)]
Improve warning for SpecConstr

15 years agoWhite space only
simonpj@microsoft.com [Mon, 15 Sep 2008 15:48:41 +0000 (15:48 +0000)]
White space only

15 years agoMinor refactoring to get rid of Type.splitNewTyConApp
simonpj@microsoft.com [Mon, 15 Sep 2008 07:29:46 +0000 (07:29 +0000)]
Minor refactoring to get rid of Type.splitNewTyConApp

15 years agoRefactor the desugaring of RULE lhss a bit
simonpj@microsoft.com [Mon, 15 Sep 2008 15:06:01 +0000 (15:06 +0000)]
Refactor the desugaring of RULE lhss a bit

This is just a tidy-up.  Previously we were calling occurAnalyse
twice on each LHS which was silly and a bit unclean too.

This patch should have no overall effect, though.

15 years agoDo not use the Static Arg Transformation by default with -O2
simonpj@microsoft.com [Mon, 15 Sep 2008 15:04:33 +0000 (15:04 +0000)]
Do not use the Static Arg Transformation by default with -O2

Max has some more heuristics to add, and is meanwhile worried
that having SAT on by default will make some highly-tuned array
programs worse.  So it's off by default.

Use -fstatic-argument-transformation to switch it on.

15 years agoComments, and a couple of asserts, only
simonpj@microsoft.com [Sun, 14 Sep 2008 11:46:41 +0000 (11:46 +0000)]
Comments, and a couple of asserts, only

15 years agoFix Trac #2587: take account of type lets
simonpj@microsoft.com [Sun, 14 Sep 2008 11:34:34 +0000 (11:34 +0000)]
Fix Trac #2587: take account of type lets

GHC allows a non-recursive let for type varaibles
let a = TYPE ty in ...
But the free-variable finder had not caught up with this
fact. This patch catches up.

15 years agoDon't try to float type-lets
simonpj@microsoft.com [Sun, 14 Sep 2008 11:33:24 +0000 (11:33 +0000)]
Don't try to float type-lets

A type let shouldn't really occur in SetLevels, but if it does,
this patch makes sure it is left alone.

15 years agoadd refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
Ross Paterson [Mon, 15 Sep 2008 10:47:57 +0000 (10:47 +0000)]
add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation

15 years agoGeneralise type of 'withExtendedLinkEnv'.
Thomas Schilling [Mon, 15 Sep 2008 08:57:38 +0000 (08:57 +0000)]
Generalise type of 'withExtendedLinkEnv'.

15 years agoUse 'GhcMonad' in ghci/InteractiveUI.
Thomas Schilling [Mon, 15 Sep 2008 08:56:33 +0000 (08:56 +0000)]
Use 'GhcMonad' in ghci/InteractiveUI.

15 years agoUse 'GhcMonad' in ghci/GhciTags.
Thomas Schilling [Mon, 15 Sep 2008 08:49:22 +0000 (08:49 +0000)]
Use 'GhcMonad' in ghci/GhciTags.

15 years agoUse 'GhcMonad' in ghci/Debugger.
Thomas Schilling [Mon, 15 Sep 2008 08:47:38 +0000 (08:47 +0000)]
Use 'GhcMonad' in ghci/Debugger.

15 years agoUse 'GhcMonad' in ghci/GhciMonad.
Thomas Schilling [Mon, 15 Sep 2008 08:46:46 +0000 (08:46 +0000)]
Use 'GhcMonad' in ghci/GhciMonad.

15 years agoUse 'GhcMonad' in ghc/Main.
Thomas Schilling [Sun, 14 Sep 2008 23:29:57 +0000 (23:29 +0000)]
Use 'GhcMonad' in ghc/Main.

15 years agoRequire PatternSignatures for bootstrapping compiler.
Thomas Schilling [Sun, 14 Sep 2008 23:26:42 +0000 (23:26 +0000)]
Require PatternSignatures for bootstrapping compiler.

15 years agoUse 'GhcMonad' in InteractiveEval.
Thomas Schilling [Sun, 14 Sep 2008 23:24:54 +0000 (23:24 +0000)]
Use 'GhcMonad' in InteractiveEval.

15 years agoUse 'GhcMonad' in GHC and split up checkModule into phases.
Thomas Schilling [Sun, 14 Sep 2008 23:20:44 +0000 (23:20 +0000)]
Use 'GhcMonad' in GHC and split up checkModule into phases.

I'm not sure I covered all the ways of throwing errors in the code.
Some functions throw ProgramErrors, some error messages.  It's still
quite a mess, but we're getting closer.  The missing cases are mostly
errors that cannot be fixed by the API client either or are a result
of wrong usage, so are in any case fatal.

One function, 'getModuleInfo', still returns a 'Maybe', but the
documentation suggests it should always succeed.  So I may change that
soon.

The spit-up of of 'checkModule' has pros and cons.  The various forms
of 'checkModule*' now become:

 checkAndLoadModule ms False ~~>
    loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)

 checkAndLoadModule ms True ~~>
   loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)

 checkModule mn False ~~>
   typecheckModule =<< parseModule mn

 checkModule mn True ~~>
   desugarModule =<< typecheckModule =<< parseModule mn

The old APIs cannot easily be provided, since the result type would be
different depending on the second argument.  However, a more
convenient API can be modelled on top of these four functions
({parse,typecheck,desugar,load}Module).

15 years agoUse 'GhcMonad' in DriverPipeline. Also haddockify a bit while we're at it.
Thomas Schilling [Sun, 14 Sep 2008 22:06:28 +0000 (22:06 +0000)]
Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.

15 years agoUse 'GhcMonad' in HscMain.
Thomas Schilling [Sun, 14 Sep 2008 21:36:55 +0000 (21:36 +0000)]
Use 'GhcMonad' in HscMain.

15 years agoUse 'GhcMonad' in DriverMkDepend.
Thomas Schilling [Sun, 14 Sep 2008 21:21:13 +0000 (21:21 +0000)]
Use 'GhcMonad' in DriverMkDepend.

15 years agoHaddockify DynFlags (partial).
Thomas Schilling [Sun, 14 Sep 2008 21:17:18 +0000 (21:17 +0000)]
Haddockify DynFlags (partial).

15 years agoHaddockify 'IE'.
Thomas Schilling [Sun, 14 Sep 2008 21:00:16 +0000 (21:00 +0000)]
Haddockify 'IE'.

15 years agoProvide accessors for 'ImportDecl'.
Thomas Schilling [Sun, 14 Sep 2008 20:58:11 +0000 (20:58 +0000)]
Provide accessors for 'ImportDecl'.

15 years agoStart haddockifying 'HsBindLR'.
Thomas Schilling [Sun, 14 Sep 2008 20:56:29 +0000 (20:56 +0000)]
Start haddockifying 'HsBindLR'.

15 years agoDocument 'parseStaticFlags'.
Thomas Schilling [Sun, 14 Sep 2008 20:53:16 +0000 (20:53 +0000)]
Document 'parseStaticFlags'.

15 years agoIntroduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
Thomas Schilling [Sun, 14 Sep 2008 20:49:30 +0000 (20:49 +0000)]
Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.

This monad will be required by most public API calls.

15 years agoGive the "Failing due to -Werror" message a name.
Thomas Schilling [Sun, 14 Sep 2008 17:39:04 +0000 (17:39 +0000)]
Give the "Failing due to -Werror" message a name.

15 years agoMake typechecker top-level functions also return messages instead of
Thomas Schilling [Sun, 14 Sep 2008 17:32:28 +0000 (17:32 +0000)]
Make typechecker top-level functions also return messages instead of
printing them.

15 years agoReflect changes of desugarer error reporting in VectMonad.
Thomas Schilling [Sun, 14 Sep 2008 17:27:11 +0000 (17:27 +0000)]
Reflect changes of desugarer error reporting in VectMonad.

15 years agoGeneralise 'handleGhcException' to work with any 'ExceptionMonad'.
Thomas Schilling [Sun, 14 Sep 2008 17:24:04 +0000 (17:24 +0000)]
Generalise 'handleGhcException' to work with any 'ExceptionMonad'.

15 years agoIntroduce an 'ExceptionMonad' class.
Thomas Schilling [Sun, 14 Sep 2008 17:21:54 +0000 (17:21 +0000)]
Introduce an 'ExceptionMonad' class.

This monad provides variants of 'catch', 'bracket', and 'finally', so
exceptions can be handled in monads that wrap IO.  The latter two
methods need to be part of the class definition, because GHC uses
'block' and 'unblock' which are used in the definition of those two
methods for the IO monad.  A perhaps better class interface would
consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
default to 'id' like is done for non-GHC implementations of 'bracket'
and 'finally'.

15 years agoProvide default MonadIO instance for IO.
Thomas Schilling [Sun, 14 Sep 2008 16:42:45 +0000 (16:42 +0000)]
Provide default MonadIO instance for IO.

15 years agoReturn instead of print warnings and errors in desugarer.
Thomas Schilling [Sun, 14 Sep 2008 16:36:41 +0000 (16:36 +0000)]
Return instead of print warnings and errors in desugarer.

15 years agoReturn parser errors and warnings instead of dying.
Thomas Schilling [Sun, 14 Sep 2008 16:26:44 +0000 (16:26 +0000)]
Return parser errors and warnings instead of dying.

15 years agoAdd aliases for bags of warnings and errors.
Thomas Schilling [Sun, 14 Sep 2008 16:03:37 +0000 (16:03 +0000)]
Add aliases for bags of warnings and errors.

15 years agoSlightly more helpful panic message in DynFlags
Tim Chevalier [Mon, 15 Sep 2008 08:06:50 +0000 (08:06 +0000)]
Slightly more helpful panic message in DynFlags

15 years agoComments only: ".core" => ".hcr"
Tim Chevalier [Sun, 14 Sep 2008 20:36:45 +0000 (20:36 +0000)]
Comments only: ".core" => ".hcr"

15 years agoWe need to tell ghc-pkg to --force if we've only built a profiling library
Ian Lynagh [Sat, 13 Sep 2008 15:31:42 +0000 (15:31 +0000)]
We need to tell ghc-pkg to --force if we've only built a profiling library

15 years agoIf we're profiling GHC, don't bother building the GHC package the vanilla way
Ian Lynagh [Sat, 13 Sep 2008 14:48:20 +0000 (14:48 +0000)]
If we're profiling GHC, don't bother building the GHC package the vanilla way

15 years agoRemove the duplicate show rule in libraries/Makefile
Ian Lynagh [Sat, 13 Sep 2008 14:44:13 +0000 (14:44 +0000)]
Remove the duplicate show rule in libraries/Makefile

15 years agoMove the "show" target from target.mk to boilerplate.mk
Ian Lynagh [Sat, 13 Sep 2008 14:13:12 +0000 (14:13 +0000)]
Move the "show" target from target.mk to boilerplate.mk
target.mk isn't included everywhere, but show is always handy

15 years agoChange how we detect if we are using the bootstrapping compiler or not
Ian Lynagh [Sat, 13 Sep 2008 10:46:58 +0000 (10:46 +0000)]
Change how we detect if we are using the bootstrapping compiler or not
I think looking for $(GHC_COMPILER_DIR_ABS) was failing on the Windows
buildbot due to different path separators. Now we just look for
"inplace".

15 years agowibble the distrib Makefile
Ian Lynagh [Fri, 12 Sep 2008 13:59:32 +0000 (13:59 +0000)]
wibble the distrib Makefile
We now need to install driver after ghc

15 years agoReinstate the driver/ghc directory, to create a versioned GHC program
Ian Lynagh [Fri, 12 Sep 2008 11:36:19 +0000 (11:36 +0000)]
Reinstate the driver/ghc directory, to create a versioned GHC program
e.g. $(bindir)/ghc-6.9.20080911

15 years agoIf USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags
Ian Lynagh [Fri, 12 Sep 2008 11:03:16 +0000 (11:03 +0000)]
If USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags

15 years agoUse --force-local when calling tar in bindisttest/
Ian Lynagh [Fri, 12 Sep 2008 01:28:55 +0000 (01:28 +0000)]
Use --force-local when calling tar in bindisttest/
Otherwise it thinks that c:/foo is a remote file

15 years agoFix #2586, bug in THUNK_SELECTORs (again)
Simon Marlow [Fri, 12 Sep 2008 13:04:04 +0000 (13:04 +0000)]
Fix #2586, bug in THUNK_SELECTORs (again)
This time, we had forgetten the write barrier in one place.

15 years agoFix crash in biographical heap profiling (#2576) 2008-09-12 2008-09-12_2
Simon Marlow [Fri, 12 Sep 2008 11:25:44 +0000 (11:25 +0000)]
Fix crash in biographical heap profiling (#2576)

15 years agoFix retainer profiling (#2576)
Simon Marlow [Fri, 12 Sep 2008 11:06:43 +0000 (11:06 +0000)]
Fix retainer profiling (#2576)

15 years agoFix some bugs in the stack-reducing code (#2571)
Simon Marlow [Fri, 12 Sep 2008 10:01:40 +0000 (10:01 +0000)]
Fix some bugs in the stack-reducing code (#2571)

15 years agoext-core library: Add dead code eliminator for Core
Tim Chevalier [Fri, 12 Sep 2008 04:41:47 +0000 (04:41 +0000)]
ext-core library: Add dead code eliminator for Core

Added code for dead code elimination to the ext-core library. This can be used in concert with Language.Core.Merge to produce a single self-contained module without unnecessary cruft.

15 years agoext-core library: expose some more modules
Tim Chevalier [Fri, 12 Sep 2008 03:45:15 +0000 (03:45 +0000)]
ext-core library: expose some more modules

15 years agoext-core library: Change syntax for primitive coercions
Tim Chevalier [Fri, 12 Sep 2008 03:33:47 +0000 (03:33 +0000)]
ext-core library: Change syntax for primitive coercions

Changed the ext-core syntax to include primitive coercions (left, right, sym, trans, etc.) as syntax rather than referring them to their names as in GHC. (I hope I updated the docs to reflect this...)

15 years agoext-core library: Export a lot more things from Prims
Tim Chevalier [Fri, 12 Sep 2008 03:22:19 +0000 (03:22 +0000)]
ext-core library: Export a lot more things from Prims

See comments for details.

15 years agoext-core library: Extend Core preprocessor
Tim Chevalier [Fri, 12 Sep 2008 03:14:52 +0000 (03:14 +0000)]
ext-core library: Extend Core preprocessor

See comments for details.

15 years agoext-core library: Export a bunch more stuff from the parser
Tim Chevalier [Fri, 12 Sep 2008 02:56:15 +0000 (02:56 +0000)]
ext-core library: Export a bunch more stuff from the parser

15 years agoext-core library: Fix performance bug
Tim Chevalier [Fri, 12 Sep 2008 02:53:14 +0000 (02:53 +0000)]
ext-core library: Fix performance bug

isUtupleTy was implemented inefficiently (and is called a lot by the typechecker). Replaced with uglier but faster code.

15 years agoext-core library: Remove some cruft
Tim Chevalier [Fri, 12 Sep 2008 02:38:42 +0000 (02:38 +0000)]
ext-core library: Remove some cruft

15 years agoext-core library: Add code for merging multiple Core modules into a single module
Tim Chevalier [Fri, 12 Sep 2008 02:15:35 +0000 (02:15 +0000)]
ext-core library: Add code for merging multiple Core modules into a single module

I added a new module, Merge, to the ext-core library that combines a list of ext-core modules into a new, uniquely renamed module.

See comments in Merge.hs for more details.

15 years agoUse OSThreadProcAttr for workerStart
Ian Lynagh [Thu, 11 Sep 2008 15:38:27 +0000 (15:38 +0000)]
Use OSThreadProcAttr for workerStart

15 years agoInclude docs in the bindists
Ian Lynagh [Thu, 11 Sep 2008 14:05:19 +0000 (14:05 +0000)]
Include docs in the bindists

15 years agoDon't install pwd
Ian Lynagh [Thu, 11 Sep 2008 12:54:22 +0000 (12:54 +0000)]
Don't install pwd

15 years agoIn stgReallocForGMP, we need to copy min(old_size,new_size)
Ian Lynagh [Thu, 11 Sep 2008 12:08:06 +0000 (12:08 +0000)]
In stgReallocForGMP, we need to copy min(old_size,new_size)
We used to always copy old_size

15 years agoTell perl to autoflush output in darcs-all. Suggested by Claus Reinke
Ian Lynagh [Thu, 11 Sep 2008 00:13:48 +0000 (00:13 +0000)]
Tell perl to autoflush output in darcs-all. Suggested by Claus Reinke

15 years agoRemove dataConInstOrigDictsAndArgTys
simonpj@microsoft.com [Wed, 10 Sep 2008 15:42:00 +0000 (15:42 +0000)]
Remove dataConInstOrigDictsAndArgTys

This suspicious function had just one call, in BuildTyCl.mkNewTyConRhs.
I've done it another way now, which is tidier.

15 years agoWe always install stage2, so we need to always put stage2 into bindists
Ian Lynagh [Tue, 9 Sep 2008 22:16:27 +0000 (22:16 +0000)]
We always install stage2, so we need to always put stage2 into bindists

15 years agoAdd a do-nothing install-docs rule in ext-core/ when LATEX_DOCS=NO
Ian Lynagh [Tue, 9 Sep 2008 11:39:29 +0000 (11:39 +0000)]
Add a do-nothing install-docs rule in ext-core/ when LATEX_DOCS=NO

15 years agoLink to core.pdf, not core.ps.gz
Ian Lynagh [Tue, 9 Sep 2008 11:35:43 +0000 (11:35 +0000)]
Link to core.pdf, not core.ps.gz

15 years agoFix debug message formatting on Windows
simonpj@microsoft.com [Wed, 10 Sep 2008 14:20:42 +0000 (14:20 +0000)]
Fix debug message formatting on Windows

15 years agoCheck the *right* set of type variables for escape!
simonpj@microsoft.com [Wed, 10 Sep 2008 09:58:16 +0000 (09:58 +0000)]
Check the *right* set of type variables for escape!

I did the wrong checkSigTyVars, which (happily) triggered an ASSERT
failure.  This should fix it.

15 years agoMore refactoring of instance declarations (fixes Trac #2572)
simonpj@microsoft.com [Wed, 10 Sep 2008 08:51:21 +0000 (08:51 +0000)]
More refactoring of instance declarations (fixes Trac #2572)

In refactoring instance declarations I'd taken a short cut over
scoped type variables, but it wasn't right as #2572 shows.

Fixing it required a significant chunk of further refactoring,
alas. But it's done!  Quite tidily as it turns out.

The main issue is that when typechecking a default method, we
need two sets of type variables in scope
class C a where
      op :: forall b. ...
  op = e
In 'e', *both* 'a' and 'b' are in scope.  But the type of the
default method has a nested flavour
op :: forall a. C a => forall b. ....
and our normal scoping mechanisms don't bring 'b' into scope.
(And probably shouldn't.)

Solution (which is done for instance methods too) is to use
a local defintion, like this:

  $dmop :: forall a. C a => forall b. ....
  $dmop a d = let
                 op :: forall b. ...
                 op = e
              in op

and now the scoping works out.  I hope I have now see the
last of this code for a bit!

15 years agoFix Trac #2581: inlining of record selectors
simonpj@microsoft.com [Wed, 10 Sep 2008 08:30:14 +0000 (08:30 +0000)]
Fix Trac #2581: inlining of record selectors

Bryan discovered that a non-trivial record selector (non-trivial in
the sense that it has to reconstruct the result value because of
UNPACK directives) weren't being inlined.  The reason was that the
unfolding generated by MkId.mRecordSelId was never being optimised
*at all*, and hence looked big, and hence wasn't inlined.

(The out-of-line version *is* put into the code of the module
and *is* optimised, which made this bug pretty puzzling.  But the
unfolding inside the record-selector-Id itself, which is a GlobalId
and hence does not get its inlining updated like LocalIds, was
big and fat.)

Solution: I wrote a very simple optimiser, CoreUnfold.simplOptExpr,
which does enough optimisation to solve this particular problem.
It's short, simple, and will be useful in other contexts.

15 years agoFix Trac #2573; and explanatory comment
simonpj@microsoft.com [Wed, 10 Sep 2008 08:23:13 +0000 (08:23 +0000)]
Fix Trac #2573; and explanatory comment

15 years agoFix the zonking of HsWrappers
simonpj@microsoft.com [Wed, 10 Sep 2008 08:20:03 +0000 (08:20 +0000)]
Fix the zonking of HsWrappers

HsWrappers are horribly inconsistent at the moment. I intended that
  WpLam, WpApp     are for evidence abstraction/application
  WpTyLam, WpTyApp are for type abstraction/application

But when we zonk (WpApp co), where co is a coercion variable, we
get a *coercion* not a coercion *variable*.   So for now I'm making
it into a WpTyApp, which the desugarer handles perfectly well.

(I'd forgotten to zonk it properly at all; that is the bug that
this patch fixes.)

15 years agoAdd newDictOcc, newDictOccs
simonpj@microsoft.com [Wed, 10 Sep 2008 08:19:13 +0000 (08:19 +0000)]
Add newDictOcc, newDictOccs

15 years agoLayout and type synonyms only
simonpj@microsoft.com [Wed, 10 Sep 2008 08:18:15 +0000 (08:18 +0000)]
Layout and type synonyms only

15 years agoRobustify the setting of implied flags
simonpj@microsoft.com [Wed, 10 Sep 2008 08:15:28 +0000 (08:15 +0000)]
Robustify the setting of implied flags

When setting implied flags, do so recursively.  So if -Xa implies -Xb,
and -Xb implies -Xc, we do the right thing.

I thought we needed this, but we don't.  But it seems like a good idea
anyway.

15 years agoRename a variable
simonpj@microsoft.com [Wed, 10 Sep 2008 08:15:10 +0000 (08:15 +0000)]
Rename a variable

15 years agoComments only
simonpj@microsoft.com [Wed, 10 Sep 2008 06:50:30 +0000 (06:50 +0000)]
Comments only

15 years agoSimplify the type signature for tcPolyBinds
simonpj@microsoft.com [Wed, 10 Sep 2008 07:35:29 +0000 (07:35 +0000)]
Simplify the type signature for tcPolyBinds

15 years agoTell GHC which module nON_EXHAUSTIVE_GUARDS_ERROR_ID comes from
simonpj@microsoft.com [Tue, 9 Sep 2008 16:21:07 +0000 (16:21 +0000)]
Tell GHC which module nON_EXHAUSTIVE_GUARDS_ERROR_ID comes from

This one was missed when the error-ids all moved to Control.Exception.Base
(The nofib test 'fluid' showed it up.)

15 years agoImprove float-in somewhat
simonpj@microsoft.com [Tue, 9 Sep 2008 15:57:09 +0000 (15:57 +0000)]
Improve float-in somewhat

See Note [Floating in past a lambda group]. The new thing
here is that we previously were not floating in past a group
that had (\(a:*) \(x:State# a). e), with a type var *and* a
one-shot lambda.

The fix makes wave4main allocate 2% less, and doesn't change any other
nofib number, so it's not a big deal.

15 years agoImportant performance wibble to callSiteInline (the n_vals_wanted > 0 thing)
simonpj@microsoft.com [Tue, 9 Sep 2008 15:50:11 +0000 (15:50 +0000)]
Important performance wibble to callSiteInline (the n_vals_wanted > 0 thing)

See Note [Inlining in ArgCtxt].  This very small change gives quite a
big performance win. Just showing the bigger ones:

        Program           Size    Allocs   Runtime
--------------------------------------------------------------------------------
           anna          -0.7%     -4.3%      0.15
       cichelli          -0.6%     -6.4%      0.15
         fulsom          -0.4%    -18.5%     -8.1%
            gcd          -0.6%    -12.0%      0.06
        integer          -0.6%    -16.2%     -8.4%
          power          -0.7%    -19.3%     -4.8%
--------------------------------------------------------------------------------
            Min          -0.7%    -19.3%    -15.7%
            Max          -0.1%     +0.1%     +5.7%
 Geometric Mean          -0.6%     -1.9%     -4.3%

The original change was to improve a case that Roman found (see test
eyeball/inline1) but that seems to work ok now anyway.

15 years agowhen a memory leak is detected, report which blocks are unreachable
Simon Marlow [Tue, 9 Sep 2008 14:51:22 +0000 (14:51 +0000)]
when a memory leak is detected, report which blocks are unreachable

15 years agoSeparate pruning from marking of spark pools
Simon Marlow [Tue, 9 Sep 2008 13:52:51 +0000 (13:52 +0000)]
Separate pruning from marking of spark pools
Fixes crash when using compacting GC in parallel programs

15 years agoun-disable warnings in some modules
Simon Marlow [Tue, 9 Sep 2008 13:43:02 +0000 (13:43 +0000)]
un-disable warnings in some modules

15 years agoFix warnings
Simon Marlow [Tue, 9 Sep 2008 13:42:47 +0000 (13:42 +0000)]
Fix warnings

15 years agoMore sanity checking for the TSO write barrier
Simon Marlow [Tue, 9 Sep 2008 13:37:48 +0000 (13:37 +0000)]
More sanity checking for the TSO write barrier
Check that all threads marked as dirty are really on the mutable list.

15 years agoMove checkGlobalTSOList() call from GarbageCollect() to checkSanity()
Simon Marlow [Tue, 9 Sep 2008 13:34:53 +0000 (13:34 +0000)]
Move checkGlobalTSOList() call from GarbageCollect() to checkSanity()

15 years agosmall bugfix in traverseBlackHoleQueue()
Simon Marlow [Tue, 9 Sep 2008 13:33:07 +0000 (13:33 +0000)]
small bugfix in traverseBlackHoleQueue()

15 years agoFix race condition in wakeupThreadOnCapability() (#2574)
Simon Marlow [Tue, 9 Sep 2008 13:32:23 +0000 (13:32 +0000)]
Fix race condition in wakeupThreadOnCapability() (#2574)
wakeupThreadOnCapbility() is used to signal another capability that
there is a thread waiting to be added to its run queue.  It adds the
thread to the (locked) wakeup queue on the remote capability.  In
order to do this, it has to modify the TSO's link field, which has a
write barrier.  The write barrier might put the TSO on the mutable
list, and the bug was that it was using the mutable list of the
*target* capability, which we do not have exclusive access to.  We
should be using the current Capabilty's mutable list in this case.

15 years agoFix compacting GC bug: don't forget to thread the blackhole_queue
Simon Marlow [Tue, 9 Sep 2008 13:22:34 +0000 (13:22 +0000)]
Fix compacting GC bug: don't forget to thread the blackhole_queue

15 years agoCapability stopping when waiting for GC
berthold@mathematik.uni-marburg.de [Tue, 19 Aug 2008 15:18:42 +0000 (15:18 +0000)]
Capability stopping when waiting for GC

15 years agoScheduler code cleanup
berthold@mathematik.uni-marburg.de [Tue, 2 Sep 2008 16:13:13 +0000 (16:13 +0000)]
Scheduler code cleanup

This patch removes old code from the Schedule.c file.

I removed GRAN code for GranSim, a simulator for parallel Haskell execution with GpH model.
This code is inactive since ghc-4.x.

Code for PARALLEL_HASKELL has been partially removed. The remaining code is valid, but can
refer to nonexisting functionality in other files.

15 years agoFix parallel GC bug (crash in concprog001(threaded2))
Simon Marlow [Mon, 8 Sep 2008 14:56:52 +0000 (14:56 +0000)]
Fix parallel GC bug (crash in concprog001(threaded2))
Two threads were trying to move the same TSO.  I like this test, it
has caught plenty of bugs in the past.