ghc-hetmet.git
13 years agomake validate work on Windows
Simon Marlow [Wed, 25 Jul 2007 13:57:51 +0000 (13:57 +0000)]
make validate work on Windows
This includes automatically adding --build=i386-unknown-mingw32 and
--with-gcc to ./configure, and disabling -j2 (see #1559).

Also: you can now say

  CPUS=3 ./validate

and the script will pass -jN to make (where N = $CPUS + 1).  In the
future, when we fix #1558, it can pass THREADS=N to the testsuite, too.

13 years agoFIX #1177, partially at least.
Simon Marlow [Wed, 25 Jul 2007 13:55:04 +0000 (13:55 +0000)]
FIX #1177, partially at least.
Now we don't wait for outstanding IO requests when shutting down at
program exit time, but we still wait when shutting down a DLL (via
hs_exit()).  There ought to be a better way to do this, but
terminating the threads forcibly is not a good idea (it never is: the
thread might be holding a mutex when it dies, for example).

I plan to add some docs to the user guide to describe how to shut
down a DLL properly.

13 years agohs_exit()/shutdownHaskell(): wait for outstanding foreign calls to complete before...
Simon Marlow [Tue, 24 Jul 2007 15:30:57 +0000 (15:30 +0000)]
hs_exit()/shutdownHaskell(): wait for outstanding foreign calls to complete before returning
This is pertinent to #1177.  When shutting down a DLL, we need to be
sure that there are no OS threads that can return to the code that we
are about to unload, and previously the threaded RTS was unsafe in
this respect.

When exiting a standalone program we don't have to be quite so
paranoid: all the code will disappear at the same time as any running
threads.  Happily exiting a program happens via a different path:
shutdownHaskellAndExit().  If we're about to exit(), then there's no
need to wait for foreign calls to complete.

13 years agoAdd unreg/tables-next-code output to +RTS --info
Ian Lynagh [Mon, 23 Jul 2007 10:01:35 +0000 (10:01 +0000)]
Add unreg/tables-next-code output to +RTS --info

13 years agoAdd a +RTS --info flag print various info; partially fixes trac #1517
Ian Lynagh [Sun, 22 Jul 2007 17:00:42 +0000 (17:00 +0000)]
Add a +RTS --info flag print various info; partially fixes trac #1517

13 years agoFIX #1215: GHC fails to respect the maximal munch rule while lexing "qualified reserv...
Simon Marlow [Tue, 24 Jul 2007 13:04:17 +0000 (13:04 +0000)]
FIX #1215: GHC fails to respect the maximal munch rule while lexing "qualified reservedids"

I didn't actually fix this to respect Haskell 98, instead I changed it
to follow the proposal for Haskell':

http://hackage.haskell.org/cgi-bin/haskell-prime/trac.cgi/wiki/QualifiedIdentifiers

Rationale:

  - We didn't respect Haskell 98 with respect to qualified symbols either
  - The Haskell' change makes things much cleaner
  - Obeying the Haskell 98 spec literally has some unintended
    consequences (e.g. M.where must lex as "M.wher" "e")
  - Any programs that compiled before this change and do not compile
    after it were illegal according to Haskell 98 anyway.

13 years agoFIX #1555: Remove "exp -> pat" production in stmts
Simon Marlow [Mon, 23 Jul 2007 14:10:23 +0000 (14:10 +0000)]
FIX #1555: Remove "exp -> pat" production in stmts
It looks like this was an experiment that accidentally got committed,
somewhere between 6.0 and 6.2.

13 years agoDocument the new -X flags in the flag reference
Ian Lynagh [Sun, 22 Jul 2007 15:19:34 +0000 (15:19 +0000)]
Document the new -X flags in the flag reference

13 years agoCheck for framework failures and unexpected passes in validate
Ian Lynagh [Sun, 22 Jul 2007 13:56:23 +0000 (13:56 +0000)]
Check for framework failures and unexpected passes in validate

13 years agoUse CLEANUP=1 when running the testsuite from validate
Ian Lynagh [Sun, 22 Jul 2007 12:54:31 +0000 (12:54 +0000)]
Use CLEANUP=1 when running the testsuite from validate

13 years agoin hpc-tools, removing the use of %error, to allow happy 1.15 to be used.
andy@galois.com [Sat, 21 Jul 2007 00:06:21 +0000 (00:06 +0000)]
in hpc-tools, removing the use of %error, to allow happy 1.15 to be used.

13 years agohpc-tools: improving flag processing and help messages, small bug fixes.
andy@galois.com [Fri, 20 Jul 2007 23:57:03 +0000 (23:57 +0000)]
hpc-tools: improving flag processing and help messages, small bug fixes.

13 years agoHack: copy ld.exe to compiler/gcc-lib so Cabal can find it
Ian Lynagh [Sat, 21 Jul 2007 20:00:43 +0000 (20:00 +0000)]
Hack: copy ld.exe to compiler/gcc-lib so Cabal can find it

13 years agoFix the Windows build
Ian Lynagh [Sat, 21 Jul 2007 01:18:17 +0000 (01:18 +0000)]
Fix the Windows build

13 years agoWhen registering base during installation, don't hide GHC.Prim
Ian Lynagh [Thu, 19 Jul 2007 16:39:20 +0000 (16:39 +0000)]
When registering base during installation, don't hide GHC.Prim

13 years agoCreate .hi-boot and .o-boot files in --make mode; fixes trac #1322
Ian Lynagh [Thu, 19 Jul 2007 11:27:36 +0000 (11:27 +0000)]
Create .hi-boot and .o-boot files in --make mode; fixes trac #1322
We were recompiling the .hs-boot files each time, as we were never
writing out the compilation results.

13 years agoFix -split-obj on Mac OS via -fasm
Clemens Fruhwirth [Fri, 6 Jul 2007 11:24:49 +0000 (11:24 +0000)]
Fix -split-obj on Mac OS via -fasm

The problem of the splitter was that it re-emitted section directives
for every dynamic label found. The following was torn apart

.symbol_stubs
.indirect <symbol>
L_<symbol>$stub:
jmp *...
L_<symbol>$stub_binder:
..somebinding code..

into

.symbol_stubs
.indirect_symbol <symbol>
L_<symbol>$stub:
jmp *...
.symbol_stubs <--- NEW
L_<symbol>$stub_binder:
..somebinding code..

This is incorrect as the Mac OS assembler enforces that every new code
section that goes into .symbol_stubs is associated with the linker
directive .indirect_symbol. This sanity check is obviously violated
when we reemit .symbol_stub in the splitter. The solution is to ignore
everything that ends with $stub_binder as new label, and chuck it into
a single label for $stub.

Also the splitter has to recognize .section __DATA... for the lazy_ptr
indirection symbol. Adds a reminder to PositionIndependentCode.hs to
take care of the splitter when the code generation is changed.

This should not affect -fvia-c as the code generated by the C compiler
is entirely different.

13 years agoMade the label generation in the Cmm parser more direct
Michael D. Adams [Wed, 18 Jul 2007 20:33:00 +0000 (20:33 +0000)]
Made the label generation in the Cmm parser more direct

13 years agoTypo fix in comment
Michael D. Adams [Mon, 16 Jul 2007 18:29:06 +0000 (18:29 +0000)]
Typo fix in comment

13 years agoDefault tick interval was 50ms, change it to 20ms
Simon Marlow [Wed, 18 Jul 2007 11:26:52 +0000 (11:26 +0000)]
Default tick interval was 50ms, change it to 20ms
I think 50ms was accidental, prior to 6.6 it used to be 20ms

13 years agoremove unused TICK_FREQUENCY
Simon Marlow [Wed, 18 Jul 2007 11:06:55 +0000 (11:06 +0000)]
remove unused TICK_FREQUENCY

13 years agowakeUpSleepingThreads: fix off by one
Simon Marlow [Wed, 18 Jul 2007 09:27:54 +0000 (09:27 +0000)]
wakeUpSleepingThreads: fix off by one
The symptom of this bug is after the time of a threadDelay has
expired, the RTS does a whole slew of extra select() calls.
This should help with #1523, but it's not the whole story.

13 years agoFixes for the unreg build
Ian Lynagh [Wed, 18 Jul 2007 11:17:51 +0000 (11:17 +0000)]
Fixes for the unreg build
* Fix code output order when printing C so things are defined before
  they are used.
* Generate _ret rather than _entry functions for INFO_TABLE_RET.
* Use "ASSIGN_BaseReg" rather than "BaseReg =".

13 years agoFactor 'callerSaveVolatileRegs' out of the NCG and into CgUtil
Michael D. Adams [Tue, 17 Jul 2007 01:42:57 +0000 (01:42 +0000)]
Factor 'callerSaveVolatileRegs' out of the NCG and into CgUtil

This is needed because CgForeign and parts of the CPS pass now use
'callerSaveVolatileRegs' and not all platforms have access to the NCG.

13 years agoRefactoring
Roman Leshchinskiy [Wed, 18 Jul 2007 04:55:53 +0000 (04:55 +0000)]
Refactoring

13 years agoBetter names for PArray instance coercions
Roman Leshchinskiy [Wed, 18 Jul 2007 04:50:51 +0000 (04:50 +0000)]
Better names for PArray instance coercions

13 years agoAdd generated PArray instances to instance environments
Roman Leshchinskiy [Wed, 18 Jul 2007 04:44:33 +0000 (04:44 +0000)]
Add generated PArray instances to instance environments

13 years agoNicer names for generated PArray instances
Roman Leshchinskiy [Wed, 18 Jul 2007 04:14:11 +0000 (04:14 +0000)]
Nicer names for generated PArray instances

13 years agoGenerate PArray instances of vectorised tycons
Roman Leshchinskiy [Wed, 18 Jul 2007 04:08:28 +0000 (04:08 +0000)]
Generate PArray instances of vectorised tycons

13 years agoGeneration of DataCons for implicit PArray instances
Roman Leshchinskiy [Wed, 18 Jul 2007 02:52:35 +0000 (02:52 +0000)]
Generation of DataCons for implicit PArray instances

13 years agoFix two typos
Roman Leshchinskiy [Wed, 18 Jul 2007 02:52:24 +0000 (02:52 +0000)]
Fix two typos

13 years agoMore vectorisation-related OccNames
Roman Leshchinskiy [Wed, 18 Jul 2007 02:51:59 +0000 (02:51 +0000)]
More vectorisation-related OccNames

13 years agodarcs-all: allow relative path for repo in local fs
Manuel M T Chakravarty [Wed, 18 Jul 2007 03:45:11 +0000 (03:45 +0000)]
darcs-all: allow relative path for repo in local fs

13 years agoImplement the RTS side of GHC.Environment.getFullArgs
Ian Lynagh [Tue, 17 Jul 2007 14:20:50 +0000 (14:20 +0000)]
Implement the RTS side of GHC.Environment.getFullArgs

13 years agoTypo
Ian Lynagh [Mon, 16 Jul 2007 23:56:35 +0000 (23:56 +0000)]
Typo

13 years agoCorrections for warnings in the user guide
Ian Lynagh [Mon, 16 Jul 2007 23:17:41 +0000 (23:17 +0000)]
Corrections for warnings in the user guide

13 years agoSync the UG entries for -Wall, -w etc with reality
Ian Lynagh [Mon, 16 Jul 2007 22:19:43 +0000 (22:19 +0000)]
Sync the UG entries for -Wall, -w etc with reality

13 years ago-w should turn off /all/ options, not just the -Wall ones
Ian Lynagh [Mon, 16 Jul 2007 22:14:42 +0000 (22:14 +0000)]
-w should turn off /all/ options, not just the -Wall ones

13 years agoImplement -fwarn-dodgy-imports
Ian Lynagh [Mon, 16 Jul 2007 22:06:35 +0000 (22:06 +0000)]
Implement -fwarn-dodgy-imports
You used to only be able to enable Opt_WarnDodgyImports with -W or -Wall.
This patch adds the flag to en/disable it by name.
(DodgyImports == importing T(..) when only T is exported).

13 years agoDoc tweaks
Ian Lynagh [Mon, 16 Jul 2007 21:28:13 +0000 (21:28 +0000)]
Doc tweaks

13 years agoRemove note that -E behaviour has changed (6.0 has the same note)
Ian Lynagh [Mon, 16 Jul 2007 18:36:24 +0000 (18:36 +0000)]
Remove note that -E behaviour has changed (6.0 has the same note)

13 years agoDoc tweaks
Ian Lynagh [Mon, 16 Jul 2007 18:35:40 +0000 (18:35 +0000)]
Doc tweaks

13 years agoUser guide tweaks
Ian Lynagh [Mon, 16 Jul 2007 18:03:52 +0000 (18:03 +0000)]
User guide tweaks

13 years agoDoc tweak
Ian Lynagh [Mon, 16 Jul 2007 17:47:35 +0000 (17:47 +0000)]
Doc tweak

13 years agoDoc tweak
Ian Lynagh [Mon, 16 Jul 2007 17:44:28 +0000 (17:44 +0000)]
Doc tweak

13 years agoCorrect user guide on when .ghci is read
Ian Lynagh [Mon, 16 Jul 2007 17:24:48 +0000 (17:24 +0000)]
Correct user guide on when .ghci is read

13 years agoTweak punctuation in the user guide
Ian Lynagh [Mon, 16 Jul 2007 17:15:50 +0000 (17:15 +0000)]
Tweak punctuation in the user guide

13 years agoghci command docs tweaks
Ian Lynagh [Mon, 16 Jul 2007 17:06:01 +0000 (17:06 +0000)]
ghci command docs tweaks

13 years agoFix alphabetical ordering in :? output
Ian Lynagh [Mon, 16 Jul 2007 16:51:49 +0000 (16:51 +0000)]
Fix alphabetical ordering in :? output

13 years agoFix alphabetical ordering in user guide
Ian Lynagh [Mon, 16 Jul 2007 15:55:44 +0000 (15:55 +0000)]
Fix alphabetical ordering in user guide

13 years agoTypo
Ian Lynagh [Mon, 16 Jul 2007 15:34:13 +0000 (15:34 +0000)]
Typo

13 years agoRemove another instance of the banner from the user guide
Ian Lynagh [Sun, 15 Jul 2007 22:14:44 +0000 (22:14 +0000)]
Remove another instance of the banner from the user guide

13 years agoIn user guide, don't claim that ghci never generates .hi files
Ian Lynagh [Sun, 15 Jul 2007 22:11:19 +0000 (22:11 +0000)]
In user guide, don't claim that ghci never generates .hi files
With -fobject-code it now can do.

13 years agoghci debugger documentation tweaks
Ian Lynagh [Sun, 15 Jul 2007 22:05:17 +0000 (22:05 +0000)]
ghci debugger documentation tweaks

13 years agoFix typo
Ian Lynagh [Sun, 15 Jul 2007 12:22:29 +0000 (12:22 +0000)]
Fix typo

13 years agoghci doc tweaks
Ian Lynagh [Sun, 15 Jul 2007 12:21:28 +0000 (12:21 +0000)]
ghci doc tweaks

13 years agoAdding pushing of hpc translation status through hi files.
andy@galois.com [Tue, 17 Jul 2007 07:35:10 +0000 (07:35 +0000)]
Adding pushing of hpc translation status through hi files.

Now, if a single module *anywhere* on the module tree is built with
-fhpc, the binary will enable reading/writing of <bin>.tix.

Previously, you needed to compile Main to allow coverage to operate.

This changes the file format for .hi files; you will need to recompile every library.

13 years agoHandle unlifted tycons and tuples correctly during vectorisation
Roman Leshchinskiy [Tue, 17 Jul 2007 06:48:16 +0000 (06:48 +0000)]
Handle unlifted tycons and tuples correctly during vectorisation

13 years agoInitialise global vectorisation environment properly
Roman Leshchinskiy [Tue, 17 Jul 2007 06:42:33 +0000 (06:42 +0000)]
Initialise global vectorisation environment properly

13 years agoVectorise type declarations
Roman Leshchinskiy [Tue, 17 Jul 2007 06:33:09 +0000 (06:33 +0000)]
Vectorise type declarations

13 years agoVectorisation of data declarations (incomplete)
Roman Leshchinskiy [Tue, 17 Jul 2007 06:13:06 +0000 (06:13 +0000)]
Vectorisation of data declarations (incomplete)

13 years agoAdd vectorisation environment transformers
Roman Leshchinskiy [Tue, 17 Jul 2007 05:49:43 +0000 (05:49 +0000)]
Add vectorisation environment transformers

13 years agoRefactor
Roman Leshchinskiy [Tue, 17 Jul 2007 05:28:35 +0000 (05:28 +0000)]
Refactor

13 years agoRemove mapping from tycons to PA dictionaries from vect environment
Roman Leshchinskiy [Tue, 17 Jul 2007 05:23:23 +0000 (05:23 +0000)]
Remove mapping from tycons to PA dictionaries from vect environment

13 years agoAdd datacons to vectorisation environment
Roman Leshchinskiy [Tue, 17 Jul 2007 05:22:39 +0000 (05:22 +0000)]
Add datacons to vectorisation environment

13 years agoAdd fixV
Roman Leshchinskiy [Tue, 17 Jul 2007 05:15:27 +0000 (05:15 +0000)]
Add fixV

13 years agoClassification of tycons for vectorisation
Roman Leshchinskiy [Tue, 17 Jul 2007 05:03:37 +0000 (05:03 +0000)]
Classification of tycons for vectorisation

13 years agoClean up
Roman Leshchinskiy [Tue, 17 Jul 2007 04:19:57 +0000 (04:19 +0000)]
Clean up

13 years agoMove type vectorisation code to a separate module
Roman Leshchinskiy [Tue, 17 Jul 2007 04:16:45 +0000 (04:16 +0000)]
Move type vectorisation code to a separate module

13 years agoPass correct dictionary to lengthPA for single-element environments
Roman Leshchinskiy [Mon, 16 Jul 2007 11:08:19 +0000 (11:08 +0000)]
Pass correct dictionary to lengthPA for single-element environments

13 years agoAbstract over all in-scope type variables when creating closures
Roman Leshchinskiy [Mon, 16 Jul 2007 10:58:47 +0000 (10:58 +0000)]
Abstract over all in-scope type variables when creating closures

13 years agoPass PA dictionaries after all type arguments
Roman Leshchinskiy [Mon, 16 Jul 2007 10:56:19 +0000 (10:56 +0000)]
Pass PA dictionaries after all type arguments

This makes the code slightly simpler but only works because we do not support
rank-n types.

13 years agoFix bug in lifted environment inspection code
Roman Leshchinskiy [Mon, 16 Jul 2007 07:23:38 +0000 (07:23 +0000)]
Fix bug in lifted environment inspection code

13 years agoLifting contexts have type Int#
Roman Leshchinskiy [Mon, 16 Jul 2007 06:51:55 +0000 (06:51 +0000)]
Lifting contexts have type Int#

This tracks the corresponding change in package ndp. With this patch, we
finally can vectorise something (f x = x).

13 years agoFix bug in vectorisation
Roman Leshchinskiy [Mon, 16 Jul 2007 06:35:48 +0000 (06:35 +0000)]
Fix bug in vectorisation

13 years agoFix bad bug in type vectorisation
Roman Leshchinskiy [Mon, 16 Jul 2007 06:28:33 +0000 (06:28 +0000)]
Fix bad bug in type vectorisation

13 years agoMake vectorisation part of the optimiser pipeline
Roman Leshchinskiy [Mon, 16 Jul 2007 06:19:00 +0000 (06:19 +0000)]
Make vectorisation part of the optimiser pipeline

13 years agoGet NDP prelnames from the right modules
Roman Leshchinskiy [Mon, 16 Jul 2007 06:18:16 +0000 (06:18 +0000)]
Get NDP prelnames from the right modules

13 years agoVectorise top-level bindings of a module
Roman Leshchinskiy [Mon, 16 Jul 2007 05:24:06 +0000 (05:24 +0000)]
Vectorise top-level bindings of a module

13 years agoVectorisation of top-level bindings
Roman Leshchinskiy [Mon, 16 Jul 2007 05:11:39 +0000 (05:11 +0000)]
Vectorisation of top-level bindings

13 years agoStore hoisted bindings in the global environment during vectorisation
Roman Leshchinskiy [Mon, 16 Jul 2007 05:00:19 +0000 (05:00 +0000)]
Store hoisted bindings in the global environment during vectorisation

13 years agoAdd support for name cloning to vectorisation monad
Roman Leshchinskiy [Mon, 16 Jul 2007 04:48:26 +0000 (04:48 +0000)]
Add support for name cloning to vectorisation monad

13 years agoRefactoring
Roman Leshchinskiy [Mon, 16 Jul 2007 04:48:01 +0000 (04:48 +0000)]
Refactoring

13 years agoAdapt interface file code for vectorisation
Roman Leshchinskiy [Mon, 16 Jul 2007 03:57:39 +0000 (03:57 +0000)]
Adapt interface file code for vectorisation

For the most part, this patch simply renames functions which had been used
for closure conversion and hence have CC in their name. It also changes the
OccNames generated by vectorisation.

13 years agoCollect hoisted vectorised functions
Roman Leshchinskiy [Mon, 16 Jul 2007 02:11:51 +0000 (02:11 +0000)]
Collect hoisted vectorised functions

13 years agoFirst incomplete version of closure vectorisation
Roman Leshchinskiy [Fri, 13 Jul 2007 07:33:18 +0000 (07:33 +0000)]
First incomplete version of closure vectorisation

13 years agoRefactor slightly
Roman Leshchinskiy [Fri, 13 Jul 2007 07:33:04 +0000 (07:33 +0000)]
Refactor slightly

13 years agoAdd utility function for vectorisation
Roman Leshchinskiy [Fri, 13 Jul 2007 07:32:27 +0000 (07:32 +0000)]
Add utility function for vectorisation

13 years agoAdd closedV
Roman Leshchinskiy [Fri, 13 Jul 2007 07:28:43 +0000 (07:28 +0000)]
Add closedV

13 years agoExport wrapFamInstBody and unwrapFamInstScrut
Roman Leshchinskiy [Thu, 12 Jul 2007 04:54:34 +0000 (04:54 +0000)]
Export wrapFamInstBody and unwrapFamInstScrut

13 years agoRefactoring
Roman Leshchinskiy [Wed, 11 Jul 2007 04:48:20 +0000 (04:48 +0000)]
Refactoring

13 years agoAdd whitespace
Roman Leshchinskiy [Wed, 11 Jul 2007 03:58:39 +0000 (03:58 +0000)]
Add whitespace

13 years agoOnly vectorise rank-1 expressions
Roman Leshchinskiy [Wed, 11 Jul 2007 03:56:16 +0000 (03:56 +0000)]
Only vectorise rank-1 expressions

13 years agoMove some vectorisation utility functions
Roman Leshchinskiy [Tue, 10 Jul 2007 14:09:34 +0000 (14:09 +0000)]
Move some vectorisation utility functions

13 years agoModify PA dictionary computation to work with the class-based scheme
Roman Leshchinskiy [Tue, 10 Jul 2007 14:02:21 +0000 (14:02 +0000)]
Modify PA dictionary computation to work with the class-based scheme

13 years agoClean up handling of PA dictionaries
Roman Leshchinskiy [Tue, 10 Jul 2007 13:31:24 +0000 (13:31 +0000)]
Clean up handling of PA dictionaries

13 years agoFIX problem with not using the compat lib for Set in hpc tools.
andy@galois.com [Sun, 15 Jul 2007 21:36:02 +0000 (21:36 +0000)]
FIX problem with not using the compat lib for Set in hpc tools.

13 years agoProperly parse GC blocks for functions with info tables
Michael D. Adams [Sun, 15 Jul 2007 20:41:16 +0000 (20:41 +0000)]
Properly parse GC blocks for functions with info tables

13 years agoRemoved 'allow_header_set' argument from 'pack_continuation'.
Michael D. Adams [Sun, 15 Jul 2007 20:22:35 +0000 (20:22 +0000)]
Removed 'allow_header_set' argument from 'pack_continuation'.
Because branches might now go to continuations and become calls to
continuations, 'allow_header_set' isn't always correct.
Removing that parameter makes the conservative approximation.
A better approximation might save one memory store is some cases.

13 years agoFixed conditional branches to proc points
Michael D. Adams [Sun, 15 Jul 2007 20:20:33 +0000 (20:20 +0000)]
Fixed conditional branches to proc points
These could occur due to GC checks.