ghc-hetmet.git
16 years agoAdd PatternGuards flag
Ian Lynagh [Sun, 8 Jul 2007 16:42:36 +0000 (16:42 +0000)]
Add PatternGuards flag

16 years agoAdd flags for TypeSynonymInstances and FlexibleInstances
Ian Lynagh [Sun, 8 Jul 2007 16:25:07 +0000 (16:25 +0000)]
Add flags for TypeSynonymInstances and FlexibleInstances

16 years agoImplement -XFunctionalDependencies
Ian Lynagh [Sun, 8 Jul 2007 15:32:36 +0000 (15:32 +0000)]
Implement -XFunctionalDependencies

16 years agoImplement -XRecursiveDo
Ian Lynagh [Sun, 8 Jul 2007 15:06:31 +0000 (15:06 +0000)]
Implement -XRecursiveDo

16 years agoImplement -XGeneralizedNewtypeDeriving
Ian Lynagh [Sun, 8 Jul 2007 14:43:54 +0000 (14:43 +0000)]
Implement -XGeneralizedNewtypeDeriving

16 years agoAdd -XParallelListComp
Ian Lynagh [Sun, 8 Jul 2007 13:42:52 +0000 (13:42 +0000)]
Add -XParallelListComp

16 years agoVectorise lets
Roman Leshchinskiy [Mon, 9 Jul 2007 06:37:53 +0000 (06:37 +0000)]
Vectorise lets

16 years agoSplit vectorisation environment into a global and a local part
Roman Leshchinskiy [Mon, 9 Jul 2007 06:25:05 +0000 (06:25 +0000)]
Split vectorisation environment into a global and a local part

16 years agoFirst cut at vectorisation of expressions
Roman Leshchinskiy [Mon, 9 Jul 2007 05:39:34 +0000 (05:39 +0000)]
First cut at vectorisation of expressions

16 years agoConstruction of PA dictionaries for vectorisation
Roman Leshchinskiy [Mon, 9 Jul 2007 05:39:18 +0000 (05:39 +0000)]
Construction of PA dictionaries for vectorisation

16 years agoVectorisation-specific imports
Roman Leshchinskiy [Mon, 9 Jul 2007 05:39:06 +0000 (05:39 +0000)]
Vectorisation-specific imports

16 years agoUtilities for handling closure types during vectorisation
Roman Leshchinskiy [Mon, 9 Jul 2007 05:38:19 +0000 (05:38 +0000)]
Utilities for handling closure types during vectorisation

16 years agoAdd orElse combinator for vectorisation monad
Roman Leshchinskiy [Mon, 9 Jul 2007 05:37:40 +0000 (05:37 +0000)]
Add orElse combinator for vectorisation monad

16 years agoExtend vectorisation environment
Roman Leshchinskiy [Mon, 9 Jul 2007 05:37:09 +0000 (05:37 +0000)]
Extend vectorisation environment

16 years agoAllow variables to be mapped to arbitrary CoreExprs in vectorisation monad
Roman Leshchinskiy [Mon, 9 Jul 2007 04:22:51 +0000 (04:22 +0000)]
Allow variables to be mapped to arbitrary CoreExprs in vectorisation monad

16 years agoAdd failure to vectorisation monad
Roman Leshchinskiy [Mon, 9 Jul 2007 04:04:06 +0000 (04:04 +0000)]
Add failure to vectorisation monad

16 years agoFixing native code generator for PowerPC
andy@galois.com [Sun, 8 Jul 2007 07:43:29 +0000 (07:43 +0000)]
Fixing native code generator for PowerPC

16 years agoAdd -XMultiParamTypeClasses flag
Ian Lynagh [Sun, 8 Jul 2007 12:27:53 +0000 (12:27 +0000)]
Add -XMultiParamTypeClasses flag

16 years agoImplement -XKindSignatures
Ian Lynagh [Sun, 8 Jul 2007 12:05:53 +0000 (12:05 +0000)]
Implement -XKindSignatures

16 years agoAdd -XEmptyDataDecls flag
Ian Lynagh [Sun, 8 Jul 2007 11:29:07 +0000 (11:29 +0000)]
Add -XEmptyDataDecls flag

16 years agoSupport the MagicHash extension as a flag and LANGUAGE pragma
Ian Lynagh [Sun, 8 Jul 2007 11:10:41 +0000 (11:10 +0000)]
Support the MagicHash extension as a flag and LANGUAGE pragma

16 years agoTidy up comments in DynFlags
Ian Lynagh [Sun, 8 Jul 2007 10:23:22 +0000 (10:23 +0000)]
Tidy up comments in DynFlags

16 years agoFIX #1472 (also #249, which was not completely fixed previously): -caf-all bugs
Simon Marlow [Sat, 7 Jul 2007 19:21:02 +0000 (19:21 +0000)]
FIX #1472 (also #249, which was not completely fixed previously): -caf-all bugs

16 years agoallow build settings to be overriden by adding mk/validate.mk
Simon Marlow [Sat, 7 Jul 2007 19:18:53 +0000 (19:18 +0000)]
allow build settings to be overriden by adding mk/validate.mk

16 years agoRemove foldl' from Util; use the Data.List one instead
Ian Lynagh [Fri, 6 Jul 2007 20:54:10 +0000 (20:54 +0000)]
Remove foldl' from Util; use the Data.List one instead

16 years agoundo: Get the path right for :list
Simon Marlow [Fri, 6 Jul 2007 15:21:32 +0000 (15:21 +0000)]
undo: Get the path right for :list
This is breaking :list for someone.  If there's a problem here, we
should fix it another way.

16 years ago-ddump-hi-diffs shouldn't imply -fforce-recomp, that defeats the purpose
Simon Marlow [Thu, 5 Jul 2007 13:53:20 +0000 (13:53 +0000)]
-ddump-hi-diffs shouldn't imply -fforce-recomp, that defeats the purpose

16 years agoAdded comment to the Cmm parser showing code for use one CPS is enabled
Michael D. Adams [Thu, 5 Jul 2007 17:07:03 +0000 (17:07 +0000)]
Added comment to the Cmm parser showing code for use one CPS is enabled

16 years agoEliminated use of 'fromJust' from the CPS pass
Michael D. Adams [Thu, 5 Jul 2007 17:06:37 +0000 (17:06 +0000)]
Eliminated use of 'fromJust' from the CPS pass

16 years agoFixed a bug in the CPS pass
Michael D. Adams [Thu, 5 Jul 2007 17:05:15 +0000 (17:05 +0000)]
Fixed a bug in the CPS pass

16 years agoUpdated the call to the CPS pass for the factoring out of cmmToRawCmm
Michael D. Adams [Thu, 5 Jul 2007 14:50:31 +0000 (14:50 +0000)]
Updated the call to the CPS pass for the factoring out of cmmToRawCmm
That call was and is commented out, but it serves as documentation
for when the CPS pass will be turned on.

16 years agoAdded support for GC block declaration to the Cmm syntax
Michael D. Adams [Thu, 5 Jul 2007 14:48:20 +0000 (14:48 +0000)]
Added support for GC block declaration to the Cmm syntax

16 years agoEnsure no statements after CmmReturn are emitted
Michael D. Adams [Thu, 5 Jul 2007 09:47:02 +0000 (09:47 +0000)]
Ensure no statements after CmmReturn are emitted

16 years agoFIX BUILD (Windows)
Simon Marlow [Fri, 6 Jul 2007 07:59:31 +0000 (07:59 +0000)]
FIX BUILD (Windows)

16 years agoVectorise unlifted and tuple tycons
Roman Leshchinskiy [Wed, 4 Jul 2007 05:56:52 +0000 (05:56 +0000)]
Vectorise unlifted and tuple tycons

16 years agoVectorisation of types
Roman Leshchinskiy [Wed, 4 Jul 2007 05:52:39 +0000 (05:52 +0000)]
Vectorisation of types

16 years agoAdd TyCons to vectorisation monad
Roman Leshchinskiy [Wed, 4 Jul 2007 05:15:12 +0000 (05:15 +0000)]
Add TyCons to vectorisation  monad

16 years agoVectorisation monad
Roman Leshchinskiy [Wed, 4 Jul 2007 04:54:45 +0000 (04:54 +0000)]
Vectorisation monad

16 years agoAdd ndp docs
Roman Leshchinskiy [Tue, 3 Jul 2007 06:37:38 +0000 (06:37 +0000)]
Add ndp docs

16 years agoInclude vectorisation into the simplifier pipeline
Roman Leshchinskiy [Fri, 29 Jun 2007 05:19:43 +0000 (05:19 +0000)]
Include vectorisation into the simplifier pipeline

16 years agoAdd vectorise subdirectory and dummy module
Roman Leshchinskiy [Fri, 29 Jun 2007 05:13:16 +0000 (05:13 +0000)]
Add vectorise subdirectory and dummy module

16 years agoAdd -fvectorise
Roman Leshchinskiy [Fri, 29 Jun 2007 04:32:46 +0000 (04:32 +0000)]
Add -fvectorise

16 years agoAdd NDP-related PrelNames
Roman Leshchinskiy [Fri, 29 Jun 2007 04:16:05 +0000 (04:16 +0000)]
Add NDP-related PrelNames

16 years agoMake package ndp wired-in
Roman Leshchinskiy [Fri, 29 Jun 2007 01:54:56 +0000 (01:54 +0000)]
Make package ndp wired-in

16 years agoFIX BUILD (OS X): Include correct gmp.h if using GMP.framework
Roman Leshchinskiy [Fri, 6 Jul 2007 04:56:49 +0000 (04:56 +0000)]
FIX BUILD (OS X): Include correct gmp.h if using GMP.framework

On OS X, we have to #include <GMP/gmp.h> if we are using GMP.framework. Before
the recent GMP changes, gcc (incorrectly) used the gmp.h supplied by ghc but
that is gone now.

16 years agohpc is now a corelib, so always build it
Ian Lynagh [Thu, 5 Jul 2007 22:31:37 +0000 (22:31 +0000)]
hpc is now a corelib, so always build it

16 years agoUpdate the in-tree GMP; fixes trac #832
Ian Lynagh [Thu, 5 Jul 2007 21:52:40 +0000 (21:52 +0000)]
Update the in-tree GMP; fixes trac #832
gmp is now in a top-level directory and we only have the tarball in the
darcs repo. It gets untarred if it is needed.

16 years agoFIX BUILD (with GHC 6.2.x): System.Directory.Internals is no more
Simon Marlow [Thu, 5 Jul 2007 19:46:47 +0000 (19:46 +0000)]
FIX BUILD (with GHC 6.2.x): System.Directory.Internals is no more
Update functions in Compat.Directory from originals in System.Directory

16 years agoWarning Police
Michael D. Adams [Thu, 5 Jul 2007 14:29:36 +0000 (14:29 +0000)]
Warning Police

16 years agoTidy up IsIrred (no need for argument any more)
simonpj@microsoft.com [Thu, 5 Jul 2007 07:59:37 +0000 (07:59 +0000)]
Tidy up IsIrred (no need for argument any more)

16 years agoFix Trace #1494
simonpj@microsoft.com [Wed, 4 Jul 2007 22:22:21 +0000 (22:22 +0000)]
Fix Trace #1494

A tricky bug to do with the way the implication constraints are
solved in TcSimplify.  See Note [Reducing implication constraints].

16 years agoThe standard SUBDIRS in the top level Makefile should include libraries
Ian Lynagh [Wed, 4 Jul 2007 14:08:55 +0000 (14:08 +0000)]
The standard SUBDIRS in the top level Makefile should include libraries

16 years agoRemove mapAccumL, mapAccumR, mapAccumB
Ian Lynagh [Mon, 2 Jul 2007 12:26:51 +0000 (12:26 +0000)]
Remove mapAccumL, mapAccumR, mapAccumB
mapAccumL and mapAccumR are in Data.List now.
mapAccumB is unused.

16 years agoRemove the unused "Eager monad"
Ian Lynagh [Mon, 2 Jul 2007 11:52:04 +0000 (11:52 +0000)]
Remove the unused "Eager monad"

16 years agoAdd a type signature
Ian Lynagh [Mon, 2 Jul 2007 11:49:24 +0000 (11:49 +0000)]
Add a type signature

16 years agoRemove unused functions (applyToPair, applyToFst, applyToSnd)
Ian Lynagh [Mon, 2 Jul 2007 11:48:12 +0000 (11:48 +0000)]
Remove unused functions (applyToPair, applyToFst, applyToSnd)

16 years agoRemove unused cfst (== const)
Ian Lynagh [Mon, 2 Jul 2007 11:47:09 +0000 (11:47 +0000)]
Remove unused cfst (== const)

16 years agoRemove prefixMatch and suffixMatch from Util
Ian Lynagh [Mon, 2 Jul 2007 11:42:08 +0000 (11:42 +0000)]
Remove prefixMatch and suffixMatch from Util
Use standard isPrefixOf/isSuffixOf instead.

16 years agoUse $(HC), not $(GHC) to compile ghc-inplace
Simon Marlow [Wed, 4 Jul 2007 13:57:04 +0000 (13:57 +0000)]
Use $(HC), not $(GHC) to compile ghc-inplace

$(GHC) is always the installed compiler, $(HC) changes depending on
the stage.  This has the nice effect that we build stage2/ghc-inplace
using the stage1 compiler, and get to take advantage of bugfixes in
stage1 relative to $(GHC) (in particular I want the non-blocking stdin
fix for stage2, otherwise piping the testsuite output through tee
fails).

16 years agoWe don't need a SIGCONT handler any more
Simon Marlow [Wed, 4 Jul 2007 12:36:06 +0000 (12:36 +0000)]
We don't need a SIGCONT handler any more
The SIGCONT handler was used to put stdin back in O_NONBLOCK mode,
after the process is resumed, but we don't want to do that now: the
standard handles are kept in blocking mode.

16 years agoAdd first cut of the validate script
Simon Marlow [Wed, 4 Jul 2007 12:22:41 +0000 (12:22 +0000)]
Add first cut of the validate script

16 years agoAdded support for update frames to the CPS pass
Michael D. Adams [Tue, 3 Jul 2007 21:44:13 +0000 (21:44 +0000)]
Added support for update frames to the CPS pass
(This required a bit of refactoring of CmmInfo.)

16 years agoFix error message in CPS pass
Michael D. Adams [Tue, 3 Jul 2007 21:25:55 +0000 (21:25 +0000)]
Fix error message in CPS pass

16 years agoFactor cmmToRawCmm completely out of CPS
Michael D. Adams [Tue, 3 Jul 2007 21:17:34 +0000 (21:17 +0000)]
Factor cmmToRawCmm completely out of CPS
This patch also fixes how the CPS handles functions with an empty body.
Factoring cmmToRawCmm out of the CPS pass made that fix easier.

16 years agoRemove dead code in the CPS pass
Michael D. Adams [Tue, 3 Jul 2007 09:47:35 +0000 (09:47 +0000)]
Remove dead code in the CPS pass

16 years agoMinor formatting cleanup.
Michael D. Adams [Tue, 3 Jul 2007 09:36:25 +0000 (09:36 +0000)]
Minor formatting cleanup.

16 years agoMoved 'continuationToProc' into a separate file, 'CmmCPSGen.hs'.
Michael D. Adams [Tue, 3 Jul 2007 09:34:44 +0000 (09:34 +0000)]
Moved 'continuationToProc' into a separate file, 'CmmCPSGen.hs'.

16 years agoFinished support for foreign calls in the CPS pass
Michael D. Adams [Tue, 3 Jul 2007 09:13:20 +0000 (09:13 +0000)]
Finished support for foreign calls in the CPS pass

16 years agoMultiple improvements to CPS algorithm.
Michael D. Adams [Mon, 2 Jul 2007 08:42:21 +0000 (08:42 +0000)]
Multiple improvements to CPS algorithm.
These include:
 - Stack size detection now includes function arguments.
 - Stack size detection now avoids stack checks just because of
   the GC block.
 - A CmmCall followed by a CmmBranch will no longer generate an extra
   continuation consisting just of the brach.
 - Multiple CmmCall/CmmBranch pairs that all go to the same place
   will try to use the same continuation.  If they can't (because
   the return value signature is different), adaptor block are built.
 - Function entry statements are now in a separate block.
   (Fixed bug with branches to the entry block having unintended effects.)
 - Other changes that I can't recall right now.

16 years agoAllow safety information on calls in Cmm files
Michael D. Adams [Thu, 28 Jun 2007 10:11:33 +0000 (10:11 +0000)]
Allow safety information on calls in Cmm files

16 years agoFIX BUILD (Windows): catch up with changes to .cmm syntax
Simon Marlow [Tue, 3 Jul 2007 20:52:34 +0000 (20:52 +0000)]
FIX BUILD (Windows): catch up with changes to .cmm syntax

16 years agoImprove formatting of errors, and fix a typo
simonpj@microsoft.com [Tue, 3 Jul 2007 16:28:14 +0000 (16:28 +0000)]
Improve formatting of errors, and fix a typo

16 years agoFix for function info tables: the SRT field cannot be omitted if there are fields...
Simon Marlow [Tue, 3 Jul 2007 14:05:06 +0000 (14:05 +0000)]
Fix for function info tables: the SRT field cannot be omitted if there are fields following it

16 years agopprTypeInfo: print slow entry pt
Simon Marlow [Tue, 3 Jul 2007 14:03:04 +0000 (14:03 +0000)]
pprTypeInfo: print slow entry pt

16 years agofix compilation for x86_64
Simon Marlow [Thu, 28 Jun 2007 12:45:44 +0000 (12:45 +0000)]
fix compilation for x86_64

16 years agoFix stack check amount for user declared continuation functions
Michael D. Adams [Thu, 28 Jun 2007 11:18:12 +0000 (11:18 +0000)]
Fix stack check amount for user declared continuation functions

16 years agoRemove unused parameter in force_gc_block for CPS
Michael D. Adams [Thu, 28 Jun 2007 10:17:34 +0000 (10:17 +0000)]
Remove unused parameter in force_gc_block for CPS

16 years agoFix a bug in the Cmm parser where formal params didn't get bound
Michael D. Adams [Thu, 28 Jun 2007 10:13:12 +0000 (10:13 +0000)]
Fix a bug in the Cmm parser where formal params didn't get bound

16 years agoMake CPS account for on-stack arguments when doing the stack check
Michael D. Adams [Thu, 28 Jun 2007 10:10:06 +0000 (10:10 +0000)]
Make CPS account for on-stack arguments when doing the stack check

16 years agoComment and formatting updates for the CPS pass
Michael D. Adams [Thu, 28 Jun 2007 08:25:43 +0000 (08:25 +0000)]
Comment and formatting updates for the CPS pass

16 years agoFix typo from amend-record
Michael D. Adams [Wed, 27 Jun 2007 16:05:55 +0000 (16:05 +0000)]
Fix typo from amend-record

16 years agoImplemented and fixed bugs in CmmInfo handling
Michael D. Adams [Wed, 27 Jun 2007 15:21:30 +0000 (15:21 +0000)]
Implemented and fixed bugs in CmmInfo handling

16 years agoFormatting only
Michael D. Adams [Wed, 27 Jun 2007 15:17:51 +0000 (15:17 +0000)]
Formatting only

16 years agoAdded stack checks to the CPS algorithm
Michael D. Adams [Wed, 27 Jun 2007 15:15:03 +0000 (15:15 +0000)]
Added stack checks to the CPS algorithm

This eliminates one of the panics introduced by
the previous patch:
'First pass at implementing info tables for CPS'

The other panic introduced by that patch still remains.
It was due to the need to convert from a
  ContinuationInfo to a CmmInfo.
  (codeGen/CgInfoTbls.hs:emitClosureCodeAndInfoTable)
  (codeGen/CgInfoTbls.hs:emitReturnTarget)

16 years agoFirst pass at implementing info tables for CPS
Michael D. Adams [Wed, 27 Jun 2007 15:12:57 +0000 (15:12 +0000)]
First pass at implementing info tables for CPS

This is a fairly complete implementation, however
two 'panic's have been placed in the critical path
where the implementation is still a bit lacking so
do not expect it to run quite yet.

One call to panic is because we still need to create
a GC block for procedures that don't have them yet.
(cmm/CmmCPS.hs:continuationToProc)

The other is due to the need to convert from a
ContinuationInfo to a CmmInfo.
(codeGen/CgInfoTbls.hs:emitClosureCodeAndInfoTable)
(codeGen/CgInfoTbls.hs:emitReturnTarget)

16 years agoAdded an SRT to each CmmCall and added the current SRT to the CgMonad
Michael D. Adams [Wed, 27 Jun 2007 15:09:03 +0000 (15:09 +0000)]
Added an SRT to each CmmCall and added the current SRT to the CgMonad

16 years agoAdded pointerhood to LocalReg
Michael D. Adams [Wed, 27 Jun 2007 15:01:33 +0000 (15:01 +0000)]
Added pointerhood to LocalReg
This version should compile but is still incomplete as it introduces
potential bugs at the places marked 'TODO FIXME NOW'.
It is being recorded to help keep track of changes.

16 years agoFix bug relating to the return values of prim ops
Michael D. Adams [Tue, 26 Jun 2007 19:23:52 +0000 (19:23 +0000)]
Fix bug relating to the return values of prim ops
The return values were getting put in a LocalReg
but that LocalReg needed to be stored into the enclosing
expression's return register (e.g. R1).

16 years agoRemoved trailing whitespace
Michael D. Adams [Thu, 21 Jun 2007 08:40:47 +0000 (08:40 +0000)]
Removed trailing whitespace

16 years agoFixed typo in comment
Michael D. Adams [Tue, 19 Jun 2007 08:58:34 +0000 (08:58 +0000)]
Fixed typo in comment

16 years agoAdd forgotten compiler/cmm/CmmInfo.hs
Michael D. Adams [Wed, 13 Jun 2007 10:56:43 +0000 (10:56 +0000)]
Add forgotten compiler/cmm/CmmInfo.hs

16 years agoAdd formal parameters to the Cmm parser
Michael D. Adams [Wed, 6 Jun 2007 09:05:10 +0000 (09:05 +0000)]
Add formal parameters to the Cmm parser
This patch is incomplete and will probably not compile by itself
but it is being recorded to help keep track of later changes.

16 years agoMinor comment update
Michael D. Adams [Wed, 6 Jun 2007 08:53:28 +0000 (08:53 +0000)]
Minor comment update

16 years agoChanged C-- parser to allow multiple return values
Michael D. Adams [Tue, 29 May 2007 17:45:53 +0000 (17:45 +0000)]
Changed C-- parser to allow multiple return values

16 years agoAdded early draft of parameter passing to the CPS converter
Michael D. Adams [Tue, 29 May 2007 15:06:16 +0000 (15:06 +0000)]
Added early draft of parameter passing to the CPS converter

16 years agoMinor code cleanup
Michael D. Adams [Tue, 29 May 2007 15:04:36 +0000 (15:04 +0000)]
Minor code cleanup

16 years agoFix bug with proc-point detection (only a temporary fix)
Michael D. Adams [Tue, 29 May 2007 15:02:06 +0000 (15:02 +0000)]
Fix bug with proc-point detection (only a temporary fix)

16 years agoMove global register saving from the backend to codeGen (CPS specific parts)
Michael D. Adams [Fri, 25 May 2007 19:57:32 +0000 (19:57 +0000)]
Move global register saving from the backend to codeGen (CPS specific parts)

16 years agoMoved global register saving from the backend to codeGen
Michael D. Adams [Fri, 25 May 2007 19:38:04 +0000 (19:38 +0000)]
Moved global register saving from the backend to codeGen

This frees the Cmm data type from keeping a list of live global registers
in CmmCall which helps prepare for the CPS conversion phase.

CPS conversion does its own liveness analysis and takes input that should
not directly refer to parameter registers (e.g. R1, F5, D3, L2).  Since
these are the only things which could occur in the live global register
list, CPS conversion makes that field of the CmmCall constructor obsolite.

Once the CPS conversion pass is fully implemented, global register saving
will move from codeGen into the CPS pass.  Until then, this patch
is worth scrutinizing and testing to ensure it doesn't cause any performance
or correctness problems as the code passed to the backends by the CPS
converting will look very similar to the code that this patch makes codeGen
pass to the backend.

16 years agoFormatting changes for CPS code.
Michael D. Adams [Fri, 25 May 2007 17:08:45 +0000 (17:08 +0000)]
Formatting changes for CPS code.