Norman Ramsey [Sat, 15 Sep 2007 20:18:49 +0000 (20:18 +0000)]
lay ground for more readable dumping of CmmGraph
Norman Ramsey [Sat, 15 Sep 2007 20:17:46 +0000 (20:17 +0000)]
add a function to help identify unique predecessors
Norman Ramsey [Sat, 15 Sep 2007 20:17:19 +0000 (20:17 +0000)]
scrub away remaining MidNop
Norman Ramsey [Sat, 15 Sep 2007 20:16:51 +0000 (20:16 +0000)]
changes needed to get map_blocks to actually compile :-(
Norman Ramsey [Sat, 15 Sep 2007 20:15:25 +0000 (20:15 +0000)]
remove an unwanted language extension
Norman Ramsey [Sat, 15 Sep 2007 20:14:48 +0000 (20:14 +0000)]
drop the old, redundant implementation of postorder_dfs
Norman Ramsey [Sat, 15 Sep 2007 20:14:14 +0000 (20:14 +0000)]
eliminate the last vestige of UniqSM from ZipCfg
Norman Ramsey [Sat, 15 Sep 2007 20:13:55 +0000 (20:13 +0000)]
add map_blocks to ZipCfg
Norman Ramsey [Sat, 15 Sep 2007 20:12:43 +0000 (20:12 +0000)]
get rid of MidNop
Norman Ramsey [Sat, 15 Sep 2007 20:10:30 +0000 (20:10 +0000)]
get freshBlockId out of ZipCfg and bury it in MkZipCfg where it belongs
sven.panne@aedion.de [Sun, 16 Sep 2007 08:43:39 +0000 (08:43 +0000)]
Make DESTDIR work again
installPackage is a horror, using --force is probably not the perfect way
to make DESTDIR functionality work again, but given the current state of
affairs, I can't find a quick and clean solution.
MERGE TO STABLE
sven.panne@aedion.de [Sun, 16 Sep 2007 08:41:22 +0000 (08:41 +0000)]
Resurrect the "lib" subdirectory in the installation tree, it was somehow lost
Having all package directory directly in the toplevel installation directory
would be a bad thing because of potential name clashes, and it wasn't done this
way earlier, so reinstantiate the old layout.
MERGE TO STABLE
Manuel M T Chakravarty [Sat, 15 Sep 2007 07:41:19 +0000 (07:41 +0000)]
Overhaul of the rewrite rules
- Cleaned up and simplified rules
- Added many missing cases
- The rules OccursCheck and swap have been eliminated and integrate with
the other rules; ie, Subst and Unify perform the occurs check themselves
and they can deal with left-to-right and right-to-left oriented rewrites.
This makes the code simpler and more efficient.
- Also added comments.
Norman Ramsey [Sat, 15 Sep 2007 19:06:17 +0000 (19:06 +0000)]
added foldUFM_Directly, used where appropriate, killed all warnings
Norman Ramsey [Sat, 15 Sep 2007 13:39:04 +0000 (13:39 +0000)]
(temporarily) check consistency of new postorder DFS no matter what DEBUG is
simonpj@microsoft.com [Fri, 14 Sep 2007 17:01:19 +0000 (17:01 +0000)]
Wibbles to MkZipCfgCmm stuff
Watch out: I've added MkZipCfg.sequence, which clashes with the
Prelude (like some other names in MkZipCfg. Maybe you can think
of a better name for it.
Norman Ramsey [Fri, 14 Sep 2007 14:54:35 +0000 (14:54 +0000)]
make remove_entry_label actually work inside ZipDataflow
Norman Ramsey [Fri, 14 Sep 2007 14:54:17 +0000 (14:54 +0000)]
export 'entry' from ZipCfg, at least for now
simonpj@microsoft.com [Fri, 14 Sep 2007 13:52:11 +0000 (13:52 +0000)]
Remove export of remove_entry_label
Norman Ramsey [Fri, 14 Sep 2007 13:42:02 +0000 (13:42 +0000)]
replace #ifdef DEBUG with debugIsOn in cmm/MkZipCfg
Norman Ramsey [Thu, 13 Sep 2007 17:36:53 +0000 (17:36 +0000)]
new signatures for splicing functions, new postorder_dfs
Norman Ramsey [Thu, 13 Sep 2007 17:35:12 +0000 (17:35 +0000)]
tidying cmm/CmmSpillReload.hs
Norman Ramsey [Thu, 13 Sep 2007 17:34:46 +0000 (17:34 +0000)]
tidying cmm/CmmLiveZ.hs
sven.panne@aedion.de [Sat, 15 Sep 2007 08:58:45 +0000 (08:58 +0000)]
Unbreak "clean" and "distclean" targets when there is no testsuite
Ian Lynagh [Fri, 14 Sep 2007 23:34:46 +0000 (23:34 +0000)]
Use sed to make stage-specific ghc-inplace.c's
When trying to do it with -D we were having trouble getting the double
quotes through in all Windows configurations.
Ian Lynagh [Fri, 14 Sep 2007 14:26:50 +0000 (14:26 +0000)]
Fix copy+paste-o, spotted by Simon Marlow
Clemens Fruhwirth [Fri, 14 Sep 2007 20:45:38 +0000 (20:45 +0000)]
Add documentation about -shared, shared library name mangling, and a xrefs
Simon Marlow [Fri, 14 Sep 2007 12:55:42 +0000 (12:55 +0000)]
distclean: ghcprof-inplace
Simon Marlow [Fri, 14 Sep 2007 12:55:32 +0000 (12:55 +0000)]
distclean: <lib>/.depend[.bak]
Simon Marlow [Fri, 14 Sep 2007 12:54:44 +0000 (12:54 +0000)]
distclean: extra-gcc-opts, testsuite
Simon Marlow [Fri, 14 Sep 2007 09:37:38 +0000 (09:37 +0000)]
fix install-docs for non-html docs
Ian Lynagh [Fri, 14 Sep 2007 13:26:58 +0000 (13:26 +0000)]
Refer to "boot" libs, not "core" libs
Ian Lynagh [Thu, 13 Sep 2007 20:23:30 +0000 (20:23 +0000)]
Give darcs-all a -s (silent) flag
Ben.Lippmeier@anu.edu.au [Thu, 13 Sep 2007 16:14:43 +0000 (16:14 +0000)]
warning police
Ben.Lippmeier@anu.edu.au [Thu, 13 Sep 2007 15:54:07 +0000 (15:54 +0000)]
Better calculation of spill costs / selection of spill candidates.
Use Chaitin's formula for calculation of spill costs.
Cost to spill some vreg = (num writes + num reads) / degree of node
With 2 extra provisos:
1) Don't spill vregs that live for only 1 instruction.
2) Always prefer to spill vregs that live for a number of instructions
more than 10 times the number of vregs in that class.
Proviso 2 is there to help deal with basic blocks containing very long
live ranges - SHA1 has live ranges > 1700 instructions. We don't ever
try to keep these long lived ranges in regs at the expense of others.
Because stack slots are allocated from a global pool, and there is no
slot coalescing yet, without this condition the allocation of SHA1 dosn't
converge fast enough and eventually runs out of stack slots.
Prior to this patch we were just choosing to spill the range with the
longest lifetime, so we didn't bump into this particular problem.
Ben.Lippmeier@anu.edu.au [Wed, 12 Sep 2007 16:07:59 +0000 (16:07 +0000)]
comment wibbles
Ian Lynagh [Thu, 13 Sep 2007 18:17:33 +0000 (18:17 +0000)]
Bump version number 6.7 -> 6.9
Ian Lynagh [Thu, 13 Sep 2007 17:42:42 +0000 (17:42 +0000)]
More library installation path fiddling
Ian Lynagh [Thu, 13 Sep 2007 17:39:26 +0000 (17:39 +0000)]
libsubdir for libraries is now always $$pkgid
Ian Lynagh [Thu, 13 Sep 2007 15:53:31 +0000 (15:53 +0000)]
Define RelocatableBuild variable
default YES on Windows, NO otherwise.
Ian Lynagh [Thu, 13 Sep 2007 15:48:30 +0000 (15:48 +0000)]
We need to thread lots more paths through installPackage to make bindists work
simonpj@microsoft.com [Thu, 13 Sep 2007 15:24:40 +0000 (15:24 +0000)]
Comments only
simonpj@microsoft.com [Tue, 11 Sep 2007 08:57:34 +0000 (08:57 +0000)]
Comments, and remove export of checkAmbiguity
simonpj@microsoft.com [Tue, 11 Sep 2007 08:51:23 +0000 (08:51 +0000)]
Define and use PprTyThing.pprTypeForUser
When printing types for the user, the interactive UI often wants to
leave foralls implicit. But then (as Claus points out) we need to be
careful about name capture. For example with this source program
class C a b where
op :: forall a. a -> b
we were erroneously displaying the class in GHCi (with suppressed
foralls) thus:
class C a b where
op :: a -> b
which is utterly wrong.
This patch fixes the problem, removes GHC.dropForAlls (which is dangerous),
and instead supplies PprTyThing.pprTypeForUser, which does the right thing.
simonpj@microsoft.com [Tue, 11 Sep 2007 08:50:05 +0000 (08:50 +0000)]
Minor refactoring: give an explicit name to the pretty-printing function for TyThing, and use it
simonpj@microsoft.com [Tue, 11 Sep 2007 08:22:12 +0000 (08:22 +0000)]
Improve documentation for Template Haskell
Pepe Iborra [Wed, 12 Sep 2007 16:58:55 +0000 (16:58 +0000)]
Better modelling of newtypes in the Term datatype
This helps to get pretty printing right,
nested newtypes were not being shown correctly by :print
Pepe Iborra [Wed, 12 Sep 2007 15:35:05 +0000 (15:35 +0000)]
GHCi debugger: Added a -fprint-evld-with-show flag
The flag enables the use of Show instances in :print.
By default they are not used anymore
Ian Lynagh [Thu, 13 Sep 2007 01:57:04 +0000 (01:57 +0000)]
Update .darcs-boring
Simon Marlow [Wed, 12 Sep 2007 20:00:57 +0000 (20:00 +0000)]
export stopTimer(), we need this in the unix package
Simon Marlow [Wed, 12 Sep 2007 11:41:10 +0000 (11:41 +0000)]
move generic graph-colouring code into util
It is needed by cmm/StackColor, and hence is needed even when there is no
native code generator.
Norman Ramsey [Wed, 12 Sep 2007 16:58:51 +0000 (16:58 +0000)]
remove remaining redundancies from ZipCfgCmmRep
-- LastBranch no longer takes parameters
-- LastJump and LastReturn no longer carry CmmActuals;
instead, those are carried by a CopyOut in the same basic block
v.dijk.bas@gmail.com [Wed, 12 Sep 2007 14:33:46 +0000 (14:33 +0000)]
Forgot to import Data.List.find
Ian Lynagh [Wed, 12 Sep 2007 16:22:00 +0000 (16:22 +0000)]
Remove warning flags from individual compiler modules
We now set the flags once and for all in compiler/Makefile.
Ian Lynagh [Wed, 12 Sep 2007 14:07:43 +0000 (14:07 +0000)]
Give push-all the ability to pull with a --pull flag
OK, so the name is a bit wrong now...
Ian Lynagh [Wed, 12 Sep 2007 13:54:07 +0000 (13:54 +0000)]
Handle doc-index*.html, not just doc-index.html
haddock sometimes makes doc-index-A.html etc files. Not sure why it
doesn't for me.
Patch from Judah Jacobson.
Ian Lynagh [Wed, 12 Sep 2007 11:39:54 +0000 (11:39 +0000)]
Fix installation code
Ian Lynagh [Tue, 11 Sep 2007 22:47:34 +0000 (22:47 +0000)]
Further tweaking of haddock doc installation
On Windows we now always use a path beginning $topdir/ so bindists are
relocatable.
We also now tell "Setup configure" where we are putting the
documentation, and tell installPackage to override as little as
possible.
Ian Lynagh [Tue, 11 Sep 2007 20:22:02 +0000 (20:22 +0000)]
make in-place has bitrotted, so don't advertise or support it
Ian Lynagh [Mon, 3 Sep 2007 15:54:16 +0000 (15:54 +0000)]
TAG ghc-6.8 branched 2007-09-03
judah.jacobson@gmail.com [Fri, 7 Sep 2007 21:16:16 +0000 (21:16 +0000)]
Fix repeated section name in documentation.
Clemens Fruhwirth [Wed, 12 Sep 2007 17:11:26 +0000 (17:11 +0000)]
Clean ups for multi-way building of the GHC package
Norman Ramsey [Wed, 12 Sep 2007 15:38:52 +0000 (15:38 +0000)]
change the zipper representation of calls
This patch combines two changes:
1. As requested by SimonPJ, the redundancy inherent in having
LastCall bear actual parameters has been removed. The actual
parameters are now carried by a separate CopyOut node.
2. The internal (to zipper) representation of calls has changed;
the representation of calling conventions is more orthogonal,
and there is now no such thing as a 'safe' or 'final' call
to a CallishMachOp. This change has affected the interface
to MkZipCfgCmm, which now provides a static guarantee. Simon's
new upstream code will be affected; I've patched the existing
code in CmmCvt (which becomes ever hairier).
Norman Ramsey [Wed, 12 Sep 2007 15:25:02 +0000 (15:25 +0000)]
make it easier to have debugging code typechecked even when debugging is turned off
Norman Ramsey [Wed, 12 Sep 2007 10:25:45 +0000 (10:25 +0000)]
fix a typo!
Norman Ramsey [Wed, 12 Sep 2007 10:25:26 +0000 (10:25 +0000)]
cleaned up all warnings (and added many type signatures) in Outputable
Norman Ramsey [Wed, 12 Sep 2007 09:39:20 +0000 (09:39 +0000)]
overlooked ZipCfgExtras for a name change
Norman Ramsey [Wed, 12 Sep 2007 09:38:44 +0000 (09:38 +0000)]
extra prettyprinting only when debugging
Norman Ramsey [Tue, 11 Sep 2007 22:55:42 +0000 (22:55 +0000)]
renaming, reorganizing, and better doco for ZipCfg
Simon Marlow [Wed, 12 Sep 2007 11:16:58 +0000 (11:16 +0000)]
esacpe backslashes in the filename in the .rc file
Clemens Fruhwirth [Fri, 31 Aug 2007 10:46:24 +0000 (10:46 +0000)]
Remove --export-all-symbols for DLL linking, it is default and prevents us from using .def files
Clemens Fruhwirth [Mon, 6 Aug 2007 08:51:20 +0000 (08:51 +0000)]
Call windres with explicit preprocessor path in case gcc is not in $PATH
Clemens Fruhwirth [Mon, 6 Aug 2007 08:45:24 +0000 (08:45 +0000)]
Weak.c incorrectly claims it's being compiled along RTS Main.c
Clemens Fruhwirth [Wed, 12 Sep 2007 09:44:30 +0000 (09:44 +0000)]
Sign extension hack to work around PC64 relocation limitation for binutils <2.17 for x86_64.
binutils <2.17 can't generate PC64 relocations for x86_64. Hence we
emit only 32 bit PC relative offsets, and artifically stick a zero in
front of them to make them 64 bit (see PprMach.sh ppr_item in
pprDataItem). This works as long as the offset is <32bit AND it's
positive. This is not the case for offsets in jump tables, they are
all negative. This hack sign extends them with a MOVSXL instruction
into the dead index register, then adding the properly sign extended
offset to the jump table base label giving the correct target address
for the following jump.
Simon Marlow [Wed, 12 Sep 2007 11:09:09 +0000 (11:09 +0000)]
foldl1' was added to Data.List in GHC 6.4.x
Simon Marlow [Wed, 12 Sep 2007 10:43:12 +0000 (10:43 +0000)]
update .hi-boot-6 to track .lhs-boot
Simon Marlow [Wed, 12 Sep 2007 10:34:17 +0000 (10:34 +0000)]
update to track .lhs-boot file
Pepe Iborra [Tue, 11 Sep 2007 18:04:11 +0000 (18:04 +0000)]
Refactoring & documenting the Term pprinter used by :print
Pepe Iborra [Tue, 11 Sep 2007 15:14:54 +0000 (15:14 +0000)]
Custom printer for the Term datatype that won't output TypeRep values
The term pretty printer used by :print shouldn't output
the contents of TypeRep values, e.g. inside Dynamic values
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 17:38:33 +0000 (17:38 +0000)]
Try and rewrite reloads to reg-reg moves in the spill cleaner
Manuel M T Chakravarty [Wed, 12 Sep 2007 01:04:58 +0000 (01:04 +0000)]
Fix type error in MkZipCfg
- Fixes a bug introduced with the patch named
'check for unreachable code only with -DDEBUG'
- Breakage occured only without -DDEBUG (which is 'valdiate's default!)
Norman Ramsey [Tue, 11 Sep 2007 15:45:33 +0000 (15:45 +0000)]
scrape some unused barnacles off of ZipCfg and put them into ZipCfgExtras
Norman Ramsey [Tue, 11 Sep 2007 15:06:35 +0000 (15:06 +0000)]
split the CmmGraph constructor interface from the representation
Interface MkZipCfgCmm should now be sufficient for all construction
needs, though some identifiers are re-exported from (and explained in)
MkZipCfg. ZipCfgCmmRep should be used only by modules involved in
analysis, optimization, or translation of Cmm programs.
Norman Ramsey [Tue, 11 Sep 2007 14:29:14 +0000 (14:29 +0000)]
correct two single-identifier bugs that stopped the Adams optimization from working
Norman Ramsey [Tue, 11 Sep 2007 14:27:01 +0000 (14:27 +0000)]
default ppr method for CmmGraph now tells more about the representation
(Previously, ppr had tried to make the zipper representation look as
much like the ListGraph representation as possible. This decision was
unhelpful for debugging, so although the old code has been retained,
the new default is to tell it like it is. It may be possible to
retire PprCmmZ one day, although it may be desirable to retain it as
the internal form becomes less readable.
Norman Ramsey [Tue, 11 Sep 2007 14:25:35 +0000 (14:25 +0000)]
prettyprint 'hinted' things in a more readable way
Norman Ramsey [Tue, 11 Sep 2007 14:24:10 +0000 (14:24 +0000)]
check for unreachable code only with -DDEBUG
Norman Ramsey [Tue, 11 Sep 2007 14:23:38 +0000 (14:23 +0000)]
add a big diagnostic for failures in CmmCvt.toZgraph
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 15:12:11 +0000 (15:12 +0000)]
Don't try and coalesce nodes with themselves
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 14:50:54 +0000 (14:50 +0000)]
Try and allocate vregs spilled/reloaded from some slot to the same hreg
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 13:02:47 +0000 (13:02 +0000)]
Better handling of live range joins via spill slots in spill cleaner
Ben.Lippmeier@anu.edu.au [Mon, 10 Sep 2007 16:29:09 +0000 (16:29 +0000)]
Make sure to coalesce all the nodes found during iterative scanning
Ben.Lippmeier@anu.edu.au [Fri, 7 Sep 2007 17:23:15 +0000 (17:23 +0000)]
Add iterative coalescing to graph coloring allocator
Iterative coalescing interleaves conservative coalesing with the regular
simplify/scan passes. This increases the chance that nodes will be coalesced
as they will have a lower degree than at the beginning of simplify. The end
result is that more register to register moves will be eliminated in the
output code, though the iterative nature of the algorithm makes it slower
compared to non-iterative coloring.
Use -fregs-iterative for graph coloring allocation with iterative coalescing
-fregs-graph for non-iterative coalescing.
The plan is for iterative coalescing to be enabled with -O2 and have a
quicker, non-iterative algorithm otherwise. The time/benefit tradeoff
between iterative and not is still being tuned - optimal graph coloring
is NP-hard, afterall..
Pepe Iborra [Tue, 11 Sep 2007 15:14:54 +0000 (15:14 +0000)]
Custom printer for the Term datatype that won't output TypeRep values
The term pretty printer used by :print shouldn't output
the contents of TypeRep values, e.g. inside Dynamic values
Simon Marlow [Tue, 11 Sep 2007 13:02:28 +0000 (13:02 +0000)]
FIX #1466 (partly), which was causing concprog001(ghci) to fail
An AP_STACK now ensures that there is at least AP_STACK_SPLIM words of
stack headroom available after unpacking the payload. Continuations
that require more than AP_STACK_SPLIM words of stack must do their own
stack checks instead of aggregating their stack usage into the parent
frame. I have made this change for the interpreter, but not for
compiled code yet - we should do this in the glorious rewrite of the
code generator.
Pepe Iborra [Tue, 11 Sep 2007 11:32:12 +0000 (11:32 +0000)]
Fix type signatures
Pepe Iborra [Tue, 11 Sep 2007 10:19:44 +0000 (10:19 +0000)]
Documentation for -fbreak-on-error
Pepe Iborra [Tue, 11 Sep 2007 10:14:43 +0000 (10:14 +0000)]
GHCi debugger: new flag -fbreak-on-error
This flag works like -fbreak-on-exception, but only stops
on uncaught exceptions.
Pepe Iborra [Fri, 7 Sep 2007 13:58:57 +0000 (13:58 +0000)]
Remove obsolete -fdebugging flag
A left over from the 1st GHCi debugger prototype
Simon Marlow [Mon, 10 Sep 2007 14:57:47 +0000 (14:57 +0000)]
refactoring: eliminate DriverPipeline.CompResult and GHC.upsweep_compile