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
Michael D. Adams [Thu, 5 Jul 2007 14:29:36 +0000 (14:29 +0000)]
Warning Police
simonpj@microsoft.com [Thu, 5 Jul 2007 07:59:37 +0000 (07:59 +0000)]
Tidy up IsIrred (no need for argument any more)
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].
Ian Lynagh [Wed, 4 Jul 2007 14:08:55 +0000 (14:08 +0000)]
The standard SUBDIRS in the top level Makefile should include libraries
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.
Ian Lynagh [Mon, 2 Jul 2007 11:52:04 +0000 (11:52 +0000)]
Remove the unused "Eager monad"
Ian Lynagh [Mon, 2 Jul 2007 11:49:24 +0000 (11:49 +0000)]
Add a type signature
Ian Lynagh [Mon, 2 Jul 2007 11:48:12 +0000 (11:48 +0000)]
Remove unused functions (applyToPair, applyToFst, applyToSnd)
Ian Lynagh [Mon, 2 Jul 2007 11:47:09 +0000 (11:47 +0000)]
Remove unused cfst (== const)
Ian Lynagh [Mon, 2 Jul 2007 11:42:08 +0000 (11:42 +0000)]
Remove prefixMatch and suffixMatch from Util
Use standard isPrefixOf/isSuffixOf instead.
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).
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.
Simon Marlow [Wed, 4 Jul 2007 12:22:41 +0000 (12:22 +0000)]
Add first cut of the validate script
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.)
Michael D. Adams [Tue, 3 Jul 2007 21:25:55 +0000 (21:25 +0000)]
Fix error message in CPS pass
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.
Michael D. Adams [Tue, 3 Jul 2007 09:47:35 +0000 (09:47 +0000)]
Remove dead code in the CPS pass
Michael D. Adams [Tue, 3 Jul 2007 09:36:25 +0000 (09:36 +0000)]
Minor formatting cleanup.
Michael D. Adams [Tue, 3 Jul 2007 09:34:44 +0000 (09:34 +0000)]
Moved 'continuationToProc' into a separate file, 'CmmCPSGen.hs'.
Michael D. Adams [Tue, 3 Jul 2007 09:13:20 +0000 (09:13 +0000)]
Finished support for foreign calls in the CPS pass
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.
Michael D. Adams [Thu, 28 Jun 2007 10:11:33 +0000 (10:11 +0000)]
Allow safety information on calls in Cmm files
Simon Marlow [Tue, 3 Jul 2007 20:52:34 +0000 (20:52 +0000)]
FIX BUILD (Windows): catch up with changes to .cmm syntax
simonpj@microsoft.com [Tue, 3 Jul 2007 16:28:14 +0000 (16:28 +0000)]
Improve formatting of errors, and fix a typo
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
Simon Marlow [Tue, 3 Jul 2007 14:03:04 +0000 (14:03 +0000)]
pprTypeInfo: print slow entry pt
Simon Marlow [Thu, 28 Jun 2007 12:45:44 +0000 (12:45 +0000)]
fix compilation for x86_64
Michael D. Adams [Thu, 28 Jun 2007 11:18:12 +0000 (11:18 +0000)]
Fix stack check amount for user declared continuation functions
Michael D. Adams [Thu, 28 Jun 2007 10:17:34 +0000 (10:17 +0000)]
Remove unused parameter in force_gc_block for CPS
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
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
Michael D. Adams [Thu, 28 Jun 2007 08:25:43 +0000 (08:25 +0000)]
Comment and formatting updates for the CPS pass
Michael D. Adams [Wed, 27 Jun 2007 16:05:55 +0000 (16:05 +0000)]
Fix typo from amend-record
Michael D. Adams [Wed, 27 Jun 2007 15:21:30 +0000 (15:21 +0000)]
Implemented and fixed bugs in CmmInfo handling
Michael D. Adams [Wed, 27 Jun 2007 15:17:51 +0000 (15:17 +0000)]
Formatting only
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)
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)
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
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.
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).
Michael D. Adams [Thu, 21 Jun 2007 08:40:47 +0000 (08:40 +0000)]
Removed trailing whitespace
Michael D. Adams [Tue, 19 Jun 2007 08:58:34 +0000 (08:58 +0000)]
Fixed typo in comment
Michael D. Adams [Wed, 13 Jun 2007 10:56:43 +0000 (10:56 +0000)]
Add forgotten compiler/cmm/CmmInfo.hs
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.
Michael D. Adams [Wed, 6 Jun 2007 08:53:28 +0000 (08:53 +0000)]
Minor comment update
Michael D. Adams [Tue, 29 May 2007 17:45:53 +0000 (17:45 +0000)]
Changed C-- parser to allow multiple return values
Michael D. Adams [Tue, 29 May 2007 15:06:16 +0000 (15:06 +0000)]
Added early draft of parameter passing to the CPS converter
Michael D. Adams [Tue, 29 May 2007 15:04:36 +0000 (15:04 +0000)]
Minor code cleanup
Michael D. Adams [Tue, 29 May 2007 15:02:06 +0000 (15:02 +0000)]
Fix bug with proc-point detection (only a temporary fix)
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)
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.
Michael D. Adams [Fri, 25 May 2007 17:08:45 +0000 (17:08 +0000)]
Formatting changes for CPS code.
Michael D. Adams [Thu, 24 May 2007 16:14:14 +0000 (16:14 +0000)]
Formatted documentation for compiler/cmm/Dataflow.hs
Michael D. Adams [Thu, 24 May 2007 16:01:28 +0000 (16:01 +0000)]
Renamed CmmCPSData to CmmBrokenBlock and documented it
Michael D. Adams [Wed, 23 May 2007 12:15:21 +0000 (12:15 +0000)]
Minor re-organizing of compiler/cmm/CmmCPS.hs
Michael D. Adams [Wed, 23 May 2007 11:28:30 +0000 (11:28 +0000)]
Fixed missing '#include "HsVersions.h"'
Michael D. Adams [Wed, 23 May 2007 11:27:29 +0000 (11:27 +0000)]
Factored proc-point analysis into separate file (compiler/cmm/CmmProcPoint)
Michael D. Adams [Wed, 23 May 2007 10:52:48 +0000 (10:52 +0000)]
Removed an older version of selectStackFormat
Michael D. Adams [Wed, 23 May 2007 10:51:12 +0000 (10:51 +0000)]
Refined the handling of stack frame headers
Michael D. Adams [Wed, 23 May 2007 09:49:04 +0000 (09:49 +0000)]
Misc. cleanups to CPS converter
Michael D. Adams [Wed, 23 May 2007 09:47:21 +0000 (09:47 +0000)]
Fixed CPS converter to preserve function names
Michael D. Adams [Tue, 22 May 2007 15:31:33 +0000 (15:31 +0000)]
Added Proc-Point analysis to the CPS converter (not polished yet)
Michael D. Adams [Tue, 22 May 2007 15:20:08 +0000 (15:20 +0000)]
Make CmmProc take CmmFormals as argument
Since a CmmCall returns CmmFormals which may include
global registers (and indeed one place in the code
returns the results of a CmmCall into BaseReg) and
since CPS conversion will change those return slots
into formal arguments for the continuation of the call,
CmmProc has to have CmmFormals for the formal arguments.
Oddly, the old code never made use of procedure arguments
so this change only effects the types and not any of the code.
(Because [] is both of type [LocalReg] and CmmFormals.)
Michael D. Adams [Tue, 22 May 2007 13:53:05 +0000 (13:53 +0000)]
A small move of the comments in ./compiler/cmm/Dataflow.hs
Michael D. Adams [Mon, 21 May 2007 18:25:17 +0000 (18:25 +0000)]
Added forgotten ./compiler/cmm/CmmLive.hs
Michael D. Adams [Mon, 21 May 2007 09:09:39 +0000 (09:09 +0000)]
Document use of no-break space in lexer for C--
Michael D. Adams [Mon, 21 May 2007 09:00:28 +0000 (09:00 +0000)]
Renamed BlockExitInfo to FinalStmt and all its constructors to match usage
Michael D. Adams [Fri, 18 May 2007 21:34:58 +0000 (21:34 +0000)]
Major cleanup of the CPS code (but more is still to come)
Michael D. Adams [Fri, 18 May 2007 20:09:42 +0000 (20:09 +0000)]
Added listSplitUniqSupply to ./compiler/basicTypes/UniqSupply.lhs
The function
listSplitUniqSupply :: UniqSupply -> [UniqSupply]
splits a UniqSupply into an infinite list of supplies.
It is a generalization of splitUniqSupply.
Michael D. Adams [Fri, 18 May 2007 18:00:04 +0000 (18:00 +0000)]
Second working draft of a CPS algorithm for C--.
This is a safety check-in, before I begin a cleanup.
Michael D. Adams [Fri, 18 May 2007 13:24:32 +0000 (13:24 +0000)]
Fixed missing space in pretty printer for CmmJump
Michael D. Adams [Fri, 18 May 2007 13:23:17 +0000 (13:23 +0000)]
Added spLimReg to complement spReg and hpReg
Michael D. Adams [Fri, 18 May 2007 13:20:31 +0000 (13:20 +0000)]
Added types CmmActuals and CmmFormals for function parameters to Cmm
Michael D. Adams [Wed, 16 May 2007 16:01:24 +0000 (16:01 +0000)]
First complete draft of a CPS algorithm. (Still hackish needs polishing)
Michael D. Adams [Wed, 16 May 2007 15:57:58 +0000 (15:57 +0000)]
Added "C--" foreign calling convention
Michael D. Adams [Wed, 16 May 2007 15:53:37 +0000 (15:53 +0000)]
Added 'return' to C--, and made arguments to 'jump' into CmmExpr
Michael D. Adams [Mon, 14 May 2007 12:12:31 +0000 (12:12 +0000)]
Typo fix in a comment.
Michael D. Adams [Thu, 10 May 2007 13:52:50 +0000 (13:52 +0000)]
Fixed liveness analysis to use a slower but more correct solution
Michael D. Adams [Thu, 10 May 2007 13:46:00 +0000 (13:46 +0000)]
Hooked the C-- CPS pass into the compilation pipeline
At present it just annotates each block with a comment
indicating what local registers are live at the start
of the block.
Michael D. Adams [Thu, 10 May 2007 10:36:50 +0000 (10:36 +0000)]
Added compiler/cmm/Dataflow.hs
Dataflow.hs contains an early draft of the live variable analysis.
This draft contains known bugs and is being recorded only to provide
a point to be revert back to if necessary.
Clemens Fruhwirth [Thu, 28 Jun 2007 10:24:32 +0000 (10:24 +0000)]
Generate .LC_ indirection-symbols also on x86_64 (as on all other archs running Linux)
Clemens Fruhwirth [Sat, 30 Jun 2007 08:22:43 +0000 (08:22 +0000)]
Restrict .type directives to Linux targets only
Ian Lynagh [Mon, 2 Jul 2007 14:09:36 +0000 (14:09 +0000)]
Have the users guide just refer to the wiki page on how to report a bug
simonpj@microsoft.com [Mon, 2 Jul 2007 13:24:31 +0000 (13:24 +0000)]
Try harder to avoid making a variable with RULES into a loop-breaker
See Note [Recursive rules] in OccurAnal
Ian Lynagh [Mon, 2 Jul 2007 11:01:55 +0000 (11:01 +0000)]
Remove the large ghci banner, and the flags to choose which banner to show
Fans of the banner can add
putStrLn " ___ ___ _"
putStrLn " / _ \\ /\\ /\\/ __(_)"
putStrLn " / /_\\// /_/ / / | | GHC Interactive, for Haskell 98."
putStrLn "/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/"
putStrLn "\\____/\\/ /_/\\____/|_| Type :? for help."
putStrLn ""
to their ~/.ghci
Ian Lynagh [Mon, 2 Jul 2007 10:26:51 +0000 (10:26 +0000)]
Print the right usage message
The logic for printing the ghc and ghci usage messages was inverted.
However, the ghci case will never actually happen with the current code,
as we print a usage message when cli_mode == ShowUsage and choose the
ghci usage message if cli_mode == DoInteractive. This should be fixed
as part of a larger options handling overhaul.
Ian Lynagh [Mon, 2 Jul 2007 10:26:29 +0000 (10:26 +0000)]
-fasm doesn't really take an argument
Simon Marlow [Thu, 21 Jun 2007 11:30:23 +0000 (11:30 +0000)]
clean installPackage too
Simon Marlow [Mon, 2 Jul 2007 09:22:57 +0000 (09:22 +0000)]
FIX #1471: print strings using Haskell quoting syntax
Ian Lynagh [Sat, 30 Jun 2007 14:15:18 +0000 (14:15 +0000)]
Need to build filepath before directory
Ian Lynagh [Sat, 30 Jun 2007 13:39:44 +0000 (13:39 +0000)]
Tidy up -keep* flags
simonpj@microsoft.com [Fri, 29 Jun 2007 21:57:17 +0000 (21:57 +0000)]
Improve loop-breaker scoring in OccAnal (idea from Roman)
See Note [Closure conversion] in OccurAnal for details of this
patch (which merely involves *deleting* a test!). The test case
was produced by Roman, and shows up when doing closure conversion
and vectorisation for data parallelism. But perhaps other times too.
simonpj@microsoft.com [Fri, 29 Jun 2007 21:53:34 +0000 (21:53 +0000)]
Many comments about oclose, plus a fix for Trac #1456
There was a rather subtle bug in the way 'oclose' works when
generalising top-level function definitions. See
Note [Important subtlety in oclose]
in FunDeps for an explanatoin.
I also tidied up duplication in comments while I was here.
simonpj@microsoft.com [Fri, 29 Jun 2007 20:32:19 +0000 (20:32 +0000)]
Improve error message (Trac #1446)
andy@galois.com [Fri, 29 Jun 2007 18:53:07 +0000 (18:53 +0000)]
Fixing hpc tools for 6.2 and 6.4
simonpj@microsoft.com [Fri, 29 Jun 2007 16:13:37 +0000 (16:13 +0000)]
Refine printing of names in unification mis-match
simonpj@microsoft.com [Fri, 29 Jun 2007 11:48:33 +0000 (11:48 +0000)]
Improve name-printing on unification mis-matches, when types share a common occurrence name
This improvement arose from a suggestion in Trac #1465
simonpj@microsoft.com [Thu, 28 Jun 2007 08:29:49 +0000 (08:29 +0000)]
Add flags for record extensions; still not working properly though
Simon Marlow [Fri, 29 Jun 2007 11:02:40 +0000 (11:02 +0000)]
FIX BUILD: we need --exclude-module Trace.* too