ghc-hetmet.git
13 years agoThe hash table implementation had some static free lists that were
Simon Marlow [Thu, 14 Apr 2011 15:40:35 +0000 (16:40 +0100)]
The hash table implementation had some static free lists that were
not protected by locks in the threaded RTS.  This moves the free lists
to the individual hash tables and removes the static variables.

Spotted by Marcin Orczyk <orczykm@dcs.gla.ac.uk>, thanks!  This could
definitely cause actual crashes.

13 years agofix a shutdown memory leak
Simon Marlow [Thu, 14 Apr 2011 15:38:00 +0000 (16:38 +0100)]
fix a shutdown memory leak

13 years agoRevert "Generalized assignment rewriting pass."
Edward Z. Yang [Fri, 15 Apr 2011 09:32:33 +0000 (10:32 +0100)]
Revert "Generalized assignment rewriting pass."

This reverts commit 2ec796239b782505cfb305af2789abcfa820baaf.

13 years agoMerge branch 'master' of /Users/benl/devel/ghc/ghc-head
Ben Lippmeier [Fri, 15 Apr 2011 05:24:42 +0000 (15:24 +1000)]
Merge branch 'master' of /Users/benl/devel/ghc/ghc-head

13 years agoGeneralized assignment rewriting pass.
Edward Z. Yang [Wed, 13 Apr 2011 10:16:36 +0000 (11:16 +0100)]
Generalized assignment rewriting pass.

This assignment rewriting pass subsumes the previous reload
sinking pass, and also performs basic inlining.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoDisable check word address lint check, due to inlined pointer tags.
Edward Z. Yang [Wed, 13 Apr 2011 10:14:34 +0000 (11:14 +0100)]
Disable check word address lint check, due to inlined pointer tags.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoAdd GenCmmGraph, which is a generic version of CmmGraph.
Edward Z. Yang [Wed, 13 Apr 2011 10:08:44 +0000 (11:08 +0100)]
Add GenCmmGraph, which is a generic version of CmmGraph.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoCheck for ^M in packages file when booting
Ian Lynagh [Thu, 14 Apr 2011 21:45:02 +0000 (22:45 +0100)]
Check for ^M in packages file when booting

If we find one then we print an error message and fail.

13 years agoFix typo in docs; spotted by Rustom Mody in beginners@
Ian Lynagh [Thu, 14 Apr 2011 19:45:55 +0000 (20:45 +0100)]
Fix typo in docs; spotted by Rustom Mody in beginners@

13 years agoMake the boot script complain if mk/build.mk doesn't exist
Ian Lynagh [Thu, 14 Apr 2011 18:56:51 +0000 (19:56 +0100)]
Make the boot script complain if mk/build.mk doesn't exist

If we aren't validating and mk/build.mk doesn't exist then boot
prints a warning, pointing at instructions for setting up mk/build.mk.

13 years agoRefactor how dependencies are included; fixes #5109
Ian Lynagh [Thu, 14 Apr 2011 18:42:51 +0000 (19:42 +0100)]
Refactor how dependencies are included; fixes #5109

This avoids duplicating some logic around the build system.

13 years agoAdd a final newline to the link-time C file that we generate,
Simon Marlow [Thu, 14 Apr 2011 09:40:17 +0000 (10:40 +0100)]
Add a final newline to the link-time C file that we generate,
otherwise some versions of gcc complain about a missing final newline.

13 years agoAvoid accumulating slop in the pinned_object_block.
Simon Marlow [Thu, 14 Apr 2011 07:59:39 +0000 (08:59 +0100)]
Avoid accumulating slop in the pinned_object_block.

The pinned_object_block is where we allocate small pinned ByteArray#
objects.  At a GC the pinned_object_block was being treated like other
large objects and promoted to the next step/generation, even if it was
only partly full.  Under some ByteString-heavy workloads this would
accumulate on average 2k of slop per GC, and this memory is never
released until the ByteArray# objects in the block are freed.

So now, we keep allocating into the pinned_object_block until it is
completely full, at which point it is handed over to the GC as before.
The pinned_object_block might therefore contain objects which a large
range of ages, but I don't think this is any worse than the situation
before.  We still have the fragmentation issue in general, but the new
scheme can improve the memory overhead for some workloads
dramatically.

13 years agoDon't -dsuppress-uniques with -dsuppress-all
Ben Lippmeier [Thu, 14 Apr 2011 03:15:11 +0000 (13:15 +1000)]
Don't -dsuppress-uniques with -dsuppress-all

13 years agoAdmonish the user to read the wiki page!
Edward Z. Yang [Wed, 13 Apr 2011 14:58:02 +0000 (15:58 +0100)]
Admonish the user to read the wiki page!

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoFor BC labels, emit empty data section instead of empty proc.
Edward Z. Yang [Wed, 13 Apr 2011 14:29:48 +0000 (15:29 +0100)]
For BC labels, emit empty data section instead of empty proc.

This fixes two bugs:

    - The new code generator doesn't like procedures with
      empty graphs, and panicked in labelAGraph.

    - LLVM optimizes away empty procedures but not empty
      data sections, so now the backwards-compatibility
      labels actually work with -fllvm.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Wed, 13 Apr 2011 22:47:45 +0000 (23:47 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

13 years agoNow that -fvia-C is gone, we don't need -march=i686 on i386 Darwin
Ian Lynagh [Wed, 13 Apr 2011 22:36:29 +0000 (23:36 +0100)]
Now that -fvia-C is gone, we don't need -march=i686 on i386 Darwin

This fixes #5106 (objc compilation was failing on i386 Darwin).

13 years agoAdd adjustUFM, adjustUFM_Directly and joinUFM to UniqFM.
Edward Z. Yang [Wed, 13 Apr 2011 10:09:37 +0000 (11:09 +0100)]
Add adjustUFM, adjustUFM_Directly and joinUFM to UniqFM.

Renamed adjustUFM in GraphOps to adjustUFM_C, to account
for alternate argument order.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoAlways support optimization fuel.
Edward Z. Yang [Wed, 13 Apr 2011 11:54:53 +0000 (12:54 +0100)]
Always support optimization fuel.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoUpdate CmmRegOff shorthand for CmmMachOp.
Edward Z. Yang [Wed, 13 Apr 2011 10:09:09 +0000 (11:09 +0100)]
Update CmmRegOff shorthand for CmmMachOp.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agofix a bug introduced in 1fb38442d3a55ac92795aa6c5ed4df82011df724,
Simon Marlow [Wed, 13 Apr 2011 10:27:20 +0000 (11:27 +0100)]
fix a bug introduced in 1fb38442d3a55ac92795aa6c5ed4df82011df724,
symptom was 2047(threaded2) was crashing.

13 years agoFix compiling on linux-powerpc.
Erik de Castro Lopo [Mon, 4 Apr 2011 12:40:15 +0000 (22:40 +1000)]
Fix compiling on linux-powerpc.

13 years agoChange the way module initialisation is done (#3252, #4417)
Simon Marlow [Tue, 12 Apr 2011 12:49:09 +0000 (13:49 +0100)]
Change the way module initialisation is done (#3252, #4417)

Previously the code generator generated small code fragments labelled
with __stginit_M for each module M, and these performed whatever
initialisation was necessary for that module and recursively invoked
the initialisation functions for imported modules.  This appraoch had
drawbacks:

 - FFI users had to call hs_add_root() to ensure the correct
   initialisation routines were called.  This is a non-standard,
   and ugly, API.

 - unless we were using -split-objs, the __stginit dependencies would
   entail linking the whole transitive closure of modules imported,
   whether they were actually used or not.  In an extreme case (#4387,
   #4417), a module from GHC might be imported for use in Template
   Haskell or an annotation, and that would force the whole of GHC to
   be needlessly linked into the final executable.

So now instead we do our initialisation with C functions marked with
__attribute__((constructor)), which are automatically invoked at
program startup time (or DSO load-time).  The C initialisers are
emitted into the stub.c file.  This means that every time we compile
with -prof or -hpc, we now get a stub file, but thanks to #3687 that
is now invisible to the user.

There are some refactorings in the RTS (particularly for HPC) to
handle the fact that initialisers now get run earlier than they did
before.

The __stginit symbols are still generated, and the hs_add_root()
function still exists (but does nothing), for backwards compatibility.

13 years agoCleanup sweep and fix a bug in RTS flag processing.
Simon Marlow [Tue, 12 Apr 2011 12:21:41 +0000 (13:21 +0100)]
Cleanup sweep and fix a bug in RTS flag processing.

This code has accumulated a great deal of cruft over the years, this
pass cleans up a lot of the surrounding cruft but leaves the actual
argument processing alone - so there's still more that could be done.

Bug fixed:

  - ghc_rts_opts should not be subject to the --rtsopts setting.  If
    the programmer explicitly declares options with ghc_rts_opts, they
    shouldn't also have to accept command-line RTS options to make them
    work.

13 years agoisAlive: re-apply the tag if we find a forwarding pointer. This is a
Simon Marlow [Tue, 12 Apr 2011 08:41:01 +0000 (09:41 +0100)]
isAlive: re-apply the tag if we find a forwarding pointer. This is a
real bug, spotted by Marcin Orczyk (thanks!).  I'm not sure if it lead
to any actual crashes.

13 years agoRemove debugging CmmComment from old code generator.
Edward Z. Yang [Mon, 11 Apr 2011 14:33:15 +0000 (15:33 +0100)]
Remove debugging CmmComment from old code generator.

Warning: This change seems to tickle a bug in ghc-stage1 compiler
built with GHC 6.12.1 during validates.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoFlag for defaulting the codegen GhcStageXDefaultNewCodegen.
Edward Z. Yang [Mon, 4 Apr 2011 11:56:00 +0000 (12:56 +0100)]
Flag for defaulting the codegen GhcStageXDefaultNewCodegen.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoImplement mapUFM_Directly.
Edward Z. Yang [Mon, 11 Apr 2011 15:04:14 +0000 (16:04 +0100)]
Implement mapUFM_Directly.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoUnsafe foreign calls (fat machine instructions) do not kill all registers.
Edward Z. Yang [Mon, 11 Apr 2011 10:54:34 +0000 (11:54 +0100)]
Unsafe foreign calls (fat machine instructions) do not kill all registers.

The new code generator was doing some interesting spilling across
unsafe foreign calls:

     _c1ao::I32 = Hp - 4;
     I32[Sp - 20] = _c1ao::I32;
     foreign "ccall"
       newCAF((BaseReg, PtrHint), (R1, PtrHint))[_unsafe_call_];
     _c1ao::I32 = I32[Sp - 20];

This is fairly unnecessary, and resulted from over-conservative
liveness analysis from CmmLive.  We can see that the old code
generator only saved volatile registers across unsafe foreign calls:
spilling variables was done by saveVolatileVarsAndRegs, which was
only performed for ordinary calls.

This commit removes the excess kill from the liveness analysis, as well
as the *redundant* excess kill from spilling-and-reloading, and adds a
note to CmmNode to this effect.  The only registers we need to kill
are the ones that the foreign call assigns to, just like any other
machine instruction.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoRefactoring and tidy up
Simon Marlow [Mon, 11 Apr 2011 13:48:49 +0000 (14:48 +0100)]
Refactoring and tidy up

This is a port of some of the changes from my private local-GC branch
(which is still in darcs, I haven't converted it to git yet).  There
are a couple of small functional differences in the GC stats: first,
per-thread GC timings should now be more accurate, and secondly we now
report average and maximum pause times. e.g. from minimax +RTS -N8 -s:

                                    Tot time (elapsed)  Avg pause  Max pause
  Gen  0      2755 colls,  2754 par   13.16s    0.93s     0.0003s    0.0150s
  Gen  1       769 colls,   769 par    3.71s    0.26s     0.0003s    0.0059s

13 years agoghc-pkg dependency on ghc-cabal should be an order-only dependency,
Simon Marlow [Tue, 5 Apr 2011 19:17:37 +0000 (20:17 +0100)]
ghc-pkg dependency on ghc-cabal should be an order-only dependency,
otherwise we repeatedly try to rebuild ghc-pkg if ghc-cabal is newer.

13 years agotweak to cleanTempFilesExcept
Simon Marlow [Mon, 7 Mar 2011 12:27:05 +0000 (12:27 +0000)]
tweak to cleanTempFilesExcept

13 years agoadd casMutVar#
Simon Marlow [Tue, 15 Feb 2011 20:43:34 +0000 (20:43 +0000)]
add casMutVar#

13 years agoWhitespace only in main/Finder.lhs
Ian Lynagh [Sat, 9 Apr 2011 14:52:40 +0000 (15:52 +0100)]
Whitespace only in main/Finder.lhs

13 years agoAdd "./sync-all reset" command
Ian Lynagh [Sat, 9 Apr 2011 14:16:01 +0000 (15:16 +0100)]
Add "./sync-all reset" command

13 years agoSupport fat archives on OS X
Ian Lynagh [Sat, 9 Apr 2011 13:29:28 +0000 (14:29 +0100)]
Support fat archives on OS X

Based on the darcs patch from Greg Wright in #4828.

13 years agoAdd "./sync-all config" command
Ian Lynagh [Sat, 9 Apr 2011 13:42:08 +0000 (14:42 +0100)]
Add "./sync-all config" command

13 years agorts/Linker.c tidyups and debug belches
Ian Lynagh [Fri, 8 Apr 2011 20:05:17 +0000 (21:05 +0100)]
rts/Linker.c tidyups and debug belches

Part of the patch from #5062, from Greg Wright.

13 years agogen_contents_index: Improve parsing of packages file
Ian Lynagh [Fri, 8 Apr 2011 18:48:26 +0000 (19:48 +0100)]
gen_contents_index: Improve parsing of packages file

We are now more lenient in parsing the packages file, and
we don't use any GNUisms. Based on a patch from Matthias Kilian.

13 years ago- disable shared lib support on Solaris 10 and older (fixes #4973)
Karel Gardas [Fri, 8 Apr 2011 16:53:42 +0000 (18:53 +0200)]
- disable shared lib support on Solaris 10 and older (fixes #4973)

13 years agoForce re-linking if the options have changed (#4451)
Simon Marlow [Fri, 8 Apr 2011 14:54:50 +0000 (15:54 +0100)]
Force re-linking if the options have changed (#4451)

A common sequence of commands (at least for me) is this:

$ ghc hello
1 of 1] Compiling Main             ( hello.hs, hello.o )
Linking hello ...
$ ./hello +RTS -s
hello: Most RTS options are disabled. Link with -rtsopts to enable them.
$ ghc hello -rtsopts
$

grr, nothing happened.  I could use -fforce-recomp, but if this was a
large program I probably don't want to recompile it all again, so:

$ rm hello
removed `hello'
$ ghc hello -rtsopts
Linking hello ...
$ ./hello +RTS -s
./hello +RTS -s
Hello World!
          51,264 bytes allocated in the heap
           2,904 bytes copied during GC
          43,808 bytes maximum residency (1 sample(s))
          17,632 bytes maximum slop
etc.

With this patch, GHC notices when the options have changed and forces
a relink, so you don't need to rm the binary or use -fforce-recomp.
This is done by adding the pertinent stuff to the binary in a special
section called ".debug-ghc-link-info":

$ readelf -p .debug-ghc-link-info ./hello
String dump of section 'ghc-linker-opts':
  [     0]  (["-lHSbase-4.3.1.0","-lHSinteger-gmp-0.2.0.2","-lgmp","-lHSghc-prim-0.2.0.0","-lHSrts","-lm","-lrt","-ldl","-u","ghczmprim_GHCziTypes_Izh_static_info","-u","ghczmprim_GHCziTypes_Czh_static_info","-u","ghczmprim_GHCziTypes_Fzh_static_info","-u","ghczmprim_GHCziTypes_Dzh_static_info","-u","base_GHCziPtr_Ptr_static_info","-u","base_GHCziWord_Wzh_static_info","-u","base_GHCziInt_I8zh_static_info","-u","base_GHCziInt_I16zh_static_info","-u","base_GHCziInt_I32zh_static_info","-u","base_GHCziInt_I64zh_static_info","-u","base_GHCziWord_W8zh_static_info","-u","base_GHCziWord_W16zh_static_info","-u","base_GHCziWord_W32zh_static_info","-u","base_GHCziWord_W64zh_static_info","-u","base_GHCziStable_StablePtr_static_info","-u","ghczmprim_GHCziTypes_Izh_con_info","-u","ghczmprim_GHCziTypes_Czh_con_info","-u","ghczmprim_GHCziTypes_Fzh_con_info","-u","ghczmprim_GHCziTypes_Dzh_con_info","-u","base_GHCziPtr_Ptr_con_info","-u","base_GHCziPtr_FunPtr_con_info","-u","base_GHCziStable_StablePtr_con_info","-u","ghczmprim_GHCziTypes_False_closure","-u","ghczmprim_GHCziTypes_True_closure","-u","base_GHCziPack_unpackCString_closure","-u","base_GHCziIOziException_stackOverflow_closure","-u","base_GHCziIOziException_heapOverflow_closure","-u","base_ControlziExceptionziBase_nonTermination_closure","-u","base_GHCziIOziException_blockedIndefinitelyOnMVar_closure","-u","base_GHCziIOziException_blockedIndefinitelyOnSTM_closure","-u","base_ControlziExceptionziBase_nestedAtomically_closure","-u","base_GHCziWeak_runFinalizzerBatch_closure","-u","base_GHCziTopHandler_runIO_closure","-u","base_GHCziTopHandler_runNonIO_closure","-u","base_GHCziConcziIO_ensureIOManagerIsRunning_closure","-u","base_GHCziConcziSync_runSparks_closure","-u","base_GHCziConcziSignal_runHandlers_closure","-lHSffi"],Nothing,RtsOptsAll,False,[],[])

And GHC itself uses the readelf command to extract it when deciding
whether to relink.  The reason for the name ".debug-ghc-link-info" is
that sections beginning with ".debug" are removed automatically by
strip.

This currently only works on Linux; Windows and OS X still have the
old behaviour.

13 years agoHandle '\r's in boot-pkgs files
Ian Lynagh [Fri, 8 Apr 2011 11:47:23 +0000 (12:47 +0100)]
Handle '\r's in boot-pkgs files

By default, git will clone in autocrlf mode, which on Windows means
we get '\r's added to the ghc-packages files.

13 years agobugfix for stub generation: create the directory for the _stub.h file,
Simon Marlow [Thu, 7 Apr 2011 08:41:09 +0000 (09:41 +0100)]
bugfix for stub generation: create the directory for the _stub.h file,
not the _stub.c file, because the latter is now created as a temporary
file.

13 years agosync-all: Push doesn't take a repo path either
Ian Lynagh [Thu, 7 Apr 2011 19:53:06 +0000 (20:53 +0100)]
sync-all: Push doesn't take a repo path either

13 years agoMerge remote branch 'origin/patch-4404'
Ian Lynagh [Thu, 7 Apr 2011 18:40:06 +0000 (19:40 +0100)]
Merge remote branch 'origin/patch-4404'

13 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Wed, 6 Apr 2011 17:16:20 +0000 (18:16 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

13 years agosync-all: Don't give remote repo paths and branches to git pull
Ian Lynagh [Wed, 6 Apr 2011 10:31:06 +0000 (11:31 +0100)]
sync-all: Don't give remote repo paths and branches to git pull

You can set up remotes and give them as an argument
"./sync-all pull someremote" instead. The old way meant
that the patches would be pulled, but remotes/origin/master
wouldn't be updated.

13 years agoAdd "commit" to the list of commands sync-all supports
Ian Lynagh [Tue, 5 Apr 2011 16:26:20 +0000 (17:26 +0100)]
Add "commit" to the list of commands sync-all supports

13 years agoFix bug in X86 codegen: use GMOV instead of MOV for F64 w/o SSE2.
Edward Z. Yang [Wed, 6 Apr 2011 15:31:44 +0000 (16:31 +0100)]
Fix bug in X86 codegen: use GMOV instead of MOV for F64 w/o SSE2.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoMerge remote branch 'origin'
Simon Marlow [Wed, 6 Apr 2011 13:33:30 +0000 (14:33 +0100)]
Merge remote branch 'origin'

* origin:
  Revert "Suppress dumpTcRn when -dno-debug-output is enabled."

13 years agoMerge branch 'trac_5025' of https://github.com/thoughtpolice/ghc
Simon Marlow [Wed, 6 Apr 2011 13:30:59 +0000 (14:30 +0100)]
Merge branch 'trac_5025' of https://github.com/thoughtpolice/ghc

* 'trac_5025' of https://github.com/thoughtpolice/ghc:
  Teach GHC to compile objective-c files; trac #5025

Conflicts:
compiler/main/DriverPipeline.hs

13 years agoRevert "Suppress dumpTcRn when -dno-debug-output is enabled."
Edward Z. Yang [Wed, 6 Apr 2011 10:52:17 +0000 (11:52 +0100)]
Revert "Suppress dumpTcRn when -dno-debug-output is enabled."

This reverts commit 12929a219671cd7794b5a533cebdfef11d2f8ff4.

13 years agoMerge branch 'master' of /home/simonmar/ghc-git/.
Simon Marlow [Wed, 6 Apr 2011 10:27:03 +0000 (11:27 +0100)]
Merge branch 'master' of /home/simonmar/ghc-git/.

13 years agoAdd 'sync-all grep'
Johan Tibell [Wed, 6 Apr 2011 09:39:29 +0000 (11:39 +0200)]
Add 'sync-all grep'

13 years agoremove debugging output
Simon Marlow [Wed, 6 Apr 2011 07:42:04 +0000 (08:42 +0100)]
remove debugging output

13 years agoFix -split-objs: there was a bad interaction with the recent changes
Simon Marlow [Wed, 6 Apr 2011 09:31:58 +0000 (10:31 +0100)]
Fix -split-objs: there was a bad interaction with the recent changes
to the way stub files were handled.

13 years agodoc fix: -package-name is more static than dynamic. It can't be used
Simon Marlow [Wed, 6 Apr 2011 08:30:37 +0000 (09:30 +0100)]
doc fix: -package-name is more static than dynamic.  It can't be used
in a LANGUAGE pragma, but it is parsed by parseDynamicFlags, and it
can be set per-session in the GHC API.  We don't have a name for this
type of flag, but from the user's point of view "static" is probably
less confusing.

13 years agoAdd 'sync-all status' as an alias for 'sync-all whatsnew' (to match git syntax)
Johan Tibell [Wed, 6 Apr 2011 07:29:46 +0000 (09:29 +0200)]
Add 'sync-all status' as an alias for 'sync-all whatsnew' (to match git syntax)

13 years agoMake sync-all work with the GitHub mirror over HTTPS
Johan Tibell [Wed, 6 Apr 2011 07:28:39 +0000 (09:28 +0200)]
Make sync-all work with the GitHub mirror over HTTPS

13 years agoMake sync-all work with the GitHub mirror.
Thomas Schilling [Mon, 4 Apr 2011 13:00:54 +0000 (14:00 +0100)]
Make sync-all work with the GitHub mirror.

13 years agoCmmOpt cannot assume single assignment for hand-written or new codegen Cmm.
Edward Z. Yang [Mon, 4 Apr 2011 11:56:57 +0000 (12:56 +0100)]
CmmOpt cannot assume single assignment for hand-written or new codegen Cmm.

This change may constitute a substantial performance hit, due to the new
creation of a set for every instruction we emit.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoSuppress dumpTcRn when -dno-debug-output is enabled.
Edward Z. Yang [Tue, 5 Apr 2011 16:38:51 +0000 (17:38 +0100)]
Suppress dumpTcRn when -dno-debug-output is enabled.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoMerge branch 'master' of /home/simonmar/ghc-git
Simon Marlow [Tue, 5 Apr 2011 15:03:25 +0000 (16:03 +0100)]
Merge branch 'master' of /home/simonmar/ghc-git

13 years agoallocateRegsAndSpill: disable a panic for the time being (see comment)
Simon Marlow [Tue, 5 Apr 2011 14:18:47 +0000 (15:18 +0100)]
allocateRegsAndSpill: disable a panic for the time being (see comment)

13 years agofix warning
Simon Marlow [Tue, 5 Apr 2011 13:45:04 +0000 (14:45 +0100)]
fix warning

13 years agoMerge _stub.o files into the main .o file (Fixes #3687 and #706)
Simon Marlow [Mon, 31 Jan 2011 10:32:24 +0000 (10:32 +0000)]
Merge _stub.o files into the main .o file (Fixes #3687 and #706)
Now GHC still generates the _stub.c files, but the object file is
automatically merged into the main .o file for a module.  This means
that build systems (including GHC's own) no longer need to worry about
looking for _stub.o files and including them when linking.

I had to do lots of refactoring in DriverPipeline to make this work;
now there's a monad to carry around all the information, and
everything is a lot tidier.

The _stub.c is now created as a temporary file and removed after
compilation (unless the -keep-tmp-files flag is on).

13 years agoremove ^Ms; comment updates
Simon Marlow [Sat, 29 Jan 2011 20:03:22 +0000 (20:03 +0000)]
remove ^Ms; comment updates

13 years agoGive infinite fuel to required C-- transformations. Fixes #4971.
Edward Z. Yang [Tue, 5 Apr 2011 12:10:00 +0000 (13:10 +0100)]
Give infinite fuel to required C-- transformations. Fixes #4971.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoremove set-origin and set-push commands; add "remote set-url [--push]" (to match...
Simon Marlow [Tue, 5 Apr 2011 11:55:02 +0000 (12:55 +0100)]
remove set-origin and set-push commands; add "remote set-url [--push]" (to match git syntax).

13 years ago'fetch' and 'new' can take branch names as arguments (defaulting to 'origin')
Simon Marlow [Tue, 5 Apr 2011 10:08:35 +0000 (11:08 +0100)]
'fetch' and 'new' can take branch names as arguments (defaulting to 'origin')

e.g.

   ./sync-all -r ~/git/ghc-working remote add working
   ./sync-all fetch working

13 years agoAdd "remote add" and "remote rm" commands
Simon Marlow [Tue, 5 Apr 2011 10:02:40 +0000 (11:02 +0100)]
Add "remote add" and "remote rm" commands

To add and delete remote branches from all subrepos. e.g.

    ./sync-all -r ~/git/ghc-working remote add working
    ./sync-all remote rm working

13 years agosuppress warning about --partial
Simon Marlow [Tue, 5 Apr 2011 08:40:41 +0000 (09:40 +0100)]
suppress warning about --partial

13 years agoFix linear register allocator bug involving read/write to same registers.
Edward Z. Yang [Mon, 4 Apr 2011 11:58:31 +0000 (12:58 +0100)]
Fix linear register allocator bug involving read/write to same registers.

When we read a temporary value from memory, we should update its
assignment to be both in memory and in register.  This was only
occurring when there was a free register, but not if we needed
to spill an existing value in a register to the stack.  I generalized
the code for this case and applied it to the other two cases where
this occurs (spilled value is in memory and in a register, and when
the spilled value is only in a register.)

Furthermore, I tightened the invariants on allocRegsAndSpill_spill
with a new data type SpillLoc that captures more precisely than
Maybe Loc the possible locations we are spilling from.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoRemove dead code, now that -fvia-c is a no-op
Ian Lynagh [Mon, 4 Apr 2011 20:59:04 +0000 (21:59 +0100)]
Remove dead code, now that -fvia-c is a no-op

13 years agoRemove redundant packages.git file
Ian Lynagh [Mon, 4 Apr 2011 16:21:51 +0000 (17:21 +0100)]
Remove redundant packages.git file

13 years agoRemove redundant darcs-all script
Ian Lynagh [Mon, 4 Apr 2011 16:21:36 +0000 (17:21 +0100)]
Remove redundant darcs-all script

13 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Mon, 4 Apr 2011 15:45:42 +0000 (16:45 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

13 years agoTurn on autoflush in sync-all
Ian Lynagh [Mon, 4 Apr 2011 15:44:53 +0000 (16:44 +0100)]
Turn on autoflush in sync-all

darcs-all did it, so sync-all probably should too.

13 years agoAdd some comments to sync-all, based on darcs-all's comments
Ian Lynagh [Mon, 4 Apr 2011 15:43:54 +0000 (16:43 +0100)]
Add some comments to sync-all, based on darcs-all's comments

13 years agoIgnore tags files.
Edward Z. Yang [Mon, 4 Apr 2011 15:27:41 +0000 (16:27 +0100)]
Ignore tags files.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoFix typos and add Outputable constraints to aid debugging.
Edward Z. Yang [Mon, 4 Apr 2011 11:57:52 +0000 (12:57 +0100)]
Fix typos and add Outputable constraints to aid debugging.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoMinor documentation improvement about pointer tagging.
Edward Z. Yang [Mon, 4 Apr 2011 11:57:30 +0000 (12:57 +0100)]
Minor documentation improvement about pointer tagging.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

13 years agoAdd "./sync-all set-push"
Simon Marlow [Mon, 4 Apr 2011 13:13:54 +0000 (14:13 +0100)]
Add "./sync-all set-push"

Use like this:

  ./sync-all -r me@darcs.haskell.org:/home/darcs set-push

to set the default repo to push to (in remotes/origin) for each of
the sub-repos.

13 years agoTeach GHC to compile objective-c files; trac #5025
Austin Seipp [Mon, 4 Apr 2011 04:02:17 +0000 (23:02 -0500)]
Teach GHC to compile objective-c files; trac #5025

13 years agoTake strlen of archive filenames.
Ian Lynagh [Sun, 3 Apr 2011 21:23:07 +0000 (22:23 +0100)]
Take strlen of archive filenames.

On OS X at least, the filename size is the size of the filename
field. The actual filename may be shorter.

Also a number of code style improvements and debug prints.

This is part of the patch from #5062, from Greg Wright.

13 years agoUpdate darcs references to git in README
Ian Lynagh [Sun, 3 Apr 2011 20:01:10 +0000 (21:01 +0100)]
Update darcs references to git in README

13 years agoFix build
Ian Lynagh [Sun, 3 Apr 2011 18:04:51 +0000 (19:04 +0100)]
Fix build

13 years agoTrivial change to HACKING: github testing againh
Max Bolingbroke [Sun, 3 Apr 2011 17:51:28 +0000 (18:51 +0100)]
Trivial change to HACKING: github testing againh

13 years agoTrivial change to README to observe error I get during github push
Max Bolingbroke [Sun, 3 Apr 2011 17:46:32 +0000 (18:46 +0100)]
Trivial change to README to observe error I get during github push

13 years agoMake compilation of hscRnImportDecls conditional: fixes stage1 build
Max Bolingbroke [Sun, 3 Apr 2011 17:45:02 +0000 (18:45 +0100)]
Make compilation of hscRnImportDecls conditional: fixes stage1 build

13 years agoMerge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc
Max Bolingbroke [Sun, 3 Apr 2011 15:55:20 +0000 (16:55 +0100)]
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc

13 years agoUse tcRnImports rather than rnImports with GHCi "import" statement: fixes #4832
Max Bolingbroke [Sun, 3 Apr 2011 15:50:47 +0000 (16:50 +0100)]
Use tcRnImports rather than rnImports with GHCi "import" statement: fixes #4832

The bug here was that just using rnImports does not ensure that any dependent
orphan modules are loaded, so instances declared by such modules will not be
usable from the GHCi command line after an "import".

This did not affect the :m syntax because it takes a different code path and
uses getModuleExports directly, which contains its own calls to the orphan-module
loading stuff.

13 years agoFix parsing constructors containing dots; fixes trac #4891
Ian Lynagh [Sun, 3 Apr 2011 14:23:38 +0000 (15:23 +0100)]
Fix parsing constructors containing dots; fixes trac #4891

13 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Sun, 3 Apr 2011 12:46:22 +0000 (13:46 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc

13 years agoUpdate boot scripts for git
Ian Lynagh [Sun, 3 Apr 2011 12:04:16 +0000 (13:04 +0100)]
Update boot scripts for git

13 years agoMerge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc
Max Bolingbroke [Sat, 2 Apr 2011 23:04:24 +0000 (00:04 +0100)]
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/ghc

13 years agoPrefer builtin commands to macros in GHCi command resolution (#3858)
Max Bolingbroke [Sat, 2 Apr 2011 22:59:06 +0000 (23:59 +0100)]
Prefer builtin commands to macros in GHCi command resolution (#3858)

Current precedence rules in GHCi are that:

 * User macros are *always* preferred in command resolution
 * User macros that are defined earlier are preferred to those that
   are defined earlier on
 * Builtin commands have lowest precedence

However this caused user confusion because e.g. defining a macro beginning
with "i" would override the standard :info command whenever the user typed
the abbreviated command :i.

The new precedence rules are based on the view that things defined earlier
are always preferred to things defined later. The builtin commands are logically
defined earliest of all (when GHCi starts) so they always take precedence.

13 years agoUpdate README to talk about git rather than darcs
Ian Lynagh [Sat, 2 Apr 2011 22:08:12 +0000 (23:08 +0100)]
Update README to talk about git rather than darcs

13 years agoIgnore names introduced "implicitly" in unused-variable warnings (Fix #4404)
Max Bolingbroke [Sat, 2 Apr 2011 15:52:33 +0000 (16:52 +0100)]
Ignore names introduced "implicitly" in unused-variable warnings (Fix #4404)

We collect variables introduced by the {...} part of a let-like record wildcard
pattern and do not warn if the user then doesn't actually use them.