Simon Marlow [Tue, 24 May 2011 12:16:28 +0000 (13:16 +0100)]
Assign more accurate code sizes to primops, so that the inlining
heuristics work better. Also removed the old unused "needs_wrapper"
predicate for primops. This helps with #4978.
Simon Marlow [Tue, 24 May 2011 12:14:17 +0000 (13:14 +0100)]
Tweak sizing heurstics for case expressions (see comments).
This improves the code generated for the examples in #4978, and
appears to make very little difference to nofib.
Simon Marlow [Mon, 23 May 2011 09:24:53 +0000 (10:24 +0100)]
Merge branch 'master' of /home/simonmar/ghc-git/.
* 'master' of /home/simonmar/ghc-git/.:
Revert "Add capability sets to the event system. Contains code from Duncan Coutts."
Duncan Coutts [Sun, 22 May 2011 23:10:21 +0000 (00:10 +0100)]
Revert "Add capability sets to the event system. Contains code from Duncan Coutts."
This reverts commit
58532eb46041aec8d4cbb48b054cb5b001edb43c.
Turns out it didn't work on Windows and it'll need some non-trivial changes
to make it work on Windows. We'll get it in later once that's sorted out.
David M Peixotto [Sun, 22 May 2011 19:30:22 +0000 (14:30 -0500)]
Added utility to uniquely identify ghc repo states
This commit adds fingerprint.py python script that can be used to
create and restore "fingerprints" of a ghc repo configuration. A
fingerprint is a list of (sub-repo, commit) pairs. It can be used in
place of git submodules to record and reinstate the entire commit
state of the git repos used by ghc.
David Terei [Sat, 21 May 2011 00:50:18 +0000 (17:50 -0700)]
Fix small type in user guide.
Johan Tibell [Fri, 15 Apr 2011 11:40:05 +0000 (13:40 +0200)]
Make array copy primops inline
Daniel Peebles [Tue, 12 Apr 2011 11:35:59 +0000 (13:35 +0200)]
Add array copy/clone primops
Dimitrios Vytiniotis [Thu, 19 May 2011 08:56:56 +0000 (09:56 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc
Simon Marlow [Wed, 18 May 2011 15:38:32 +0000 (16:38 +0100)]
add 'sync-all log'
Dimitrios Vytiniotis [Wed, 18 May 2011 13:12:46 +0000 (14:12 +0100)]
Merge remote branch 'origin/master'
Fixed conflicts in:
compiler/typecheck/TcCanonical.lhs
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcInteract.lhs
Spencer Janssen [Thu, 14 Apr 2011 06:11:05 +0000 (01:11 -0500)]
Add capability sets to the event system. Contains code from Duncan Coutts.
Dimitrios Vytiniotis [Wed, 18 May 2011 09:13:55 +0000 (10:13 +0100)]
Fixes the way we check if flattening happened during
canonicalization. We now check whether the returned
coercion is an identity coercion. We used to check
whether we return any constraints from flattening but
that's wrong in the presence of the flattening cache.
Duncan Coutts [Tue, 17 May 2011 16:32:35 +0000 (17:32 +0100)]
FIX #4825: Update User Guide info on DLLs.
Original patch by Orphi <MathematicalOrchid@hotmail.com>
Plus a few miscellaneous updates from me.
Dimitrios Vytiniotis [Tue, 17 May 2011 16:24:50 +0000 (17:24 +0100)]
Introducing:
1) Postponing the application of instances when there
is a possibility of a given matching. With the addition
of prioritizing equalities this fixes #5002 and #4981.
2) Implemented caching of flattening in constraint
simplification. This improves efficiency (fixes #5030)
3) Simplified pushing of unsolved wanteds
(now pushing only equalities) inside implications.
Edward Z. Yang [Mon, 16 May 2011 11:55:20 +0000 (12:55 +0100)]
Amend comment per Marlow's comments.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Max Bolingbroke [Sun, 15 May 2011 22:08:54 +0000 (23:08 +0100)]
Fix build when DEBUG is on
Max Bolingbroke [Sun, 15 May 2011 18:36:41 +0000 (19:36 +0100)]
Use FractionalLit more extensively to improve other pretty printers
Max Bolingbroke [Sun, 15 May 2011 17:50:54 +0000 (18:50 +0100)]
Record the original text along with parsed Rationals: fixes #2245
Edward Z. Yang [Sun, 15 May 2011 12:58:42 +0000 (13:58 +0100)]
Work around lack of saving volatile registers from unsafe foreign calls.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Edward Z. Yang [Sun, 15 May 2011 10:57:51 +0000 (11:57 +0100)]
Make -ddump-to-file truncate existing files.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Edward Z. Yang [Sat, 14 May 2011 14:04:36 +0000 (15:04 +0100)]
More aggressive clobber detection with Hp and RegSlot.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Edward Z. Yang [Sat, 14 May 2011 11:48:30 +0000 (12:48 +0100)]
Split -ddump-cmmz into many smaller flags.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Edward Z. Yang [Sat, 14 May 2011 11:49:08 +0000 (12:49 +0100)]
More aggressive CmmRegOff inlining, and fix failure to inline to assignments.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
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>
Ben Lippmeier [Sun, 15 May 2011 10:26:22 +0000 (20:26 +1000)]
Fix build: Add missing import and remove unneeded #ifdef.
From Erik de Castro Lopo.
Max Bolingbroke [Sun, 15 May 2011 08:41:57 +0000 (09:41 +0100)]
Accept '-l foo' as library syntax: fixes #4869
Max Bolingbroke [Sat, 14 May 2011 21:34:41 +0000 (22:34 +0100)]
Unicode fixes, taking into account PEP383 support
Duncan Coutts [Thu, 12 May 2011 15:25:41 +0000 (16:25 +0100)]
Make the GHCi linker handle partially stripped object files (#5004)
When you use 'strip --strip-unneeded' on a ELF format .o or .a file, if
the object file has no global/exported symbols then 'strip' ends up
removing the symbol table entirely. Previously the GHCi linker assumed
there would always be exactly one symbol table and exactly one string
table. In fact, in ELF object files there is no such limitation, instead
each section points to the other sections it needs, in particular
relocation sections have a link to the symbol table section they use and
symbol table sections have a link to the corresponding string table.
So instead of assuming there will always be a global symbol and string
table, all we have to do is validate and follow these links. Then, when
we encounter an empty object file that has no symbols then we handle it
correctly, because since it's empty we never process any relocations and
so never have to follow any links to non-existant symbol tables.
Also, in the case where an object is fully stripped, we can now detect
this more reliably and emit a more helpful error message, e.g:
libHSghc-7.1.
20110509.a(DsMeta.o): relocation section #2 has no symbol table
This object file has probably been fully striped. Such files cannot be linked.
Ben Lippmeier [Thu, 12 May 2011 12:38:13 +0000 (22:38 +1000)]
Merge branch 'master' of /Users/benl/devel/ghc/ghc-head
Ben Lippmeier [Wed, 11 May 2011 09:00:56 +0000 (19:00 +1000)]
Remove scar tissue
Ben Lippmeier [Wed, 11 May 2011 09:00:40 +0000 (19:00 +1000)]
Wibbles on modules imported by vectoriser
Ben Lippmeier [Wed, 11 May 2011 03:36:01 +0000 (13:36 +1000)]
Fix build
Ben Lippmeier [Mon, 9 May 2011 03:24:58 +0000 (13:24 +1000)]
Follow changes in DPH library: Repr module is gone.
Ben Lippmeier [Mon, 9 May 2011 01:26:48 +0000 (11:26 +1000)]
Update vectoriser now that PData instances have moved.
Ben Lippmeier [Thu, 5 May 2011 06:08:49 +0000 (16:08 +1000)]
Update vectoriser now that PRepr has moved
Ben Lippmeier [Thu, 5 May 2011 04:32:00 +0000 (14:32 +1000)]
Update vectoriser now that Scalar has moved
Ben Lippmeier [Thu, 5 May 2011 03:59:00 +0000 (13:59 +1000)]
Update vectoriser now that PData has moved.
Simon Peyton Jones [Thu, 12 May 2011 10:22:50 +0000 (11:22 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 12 May 2011 10:09:28 +0000 (11:09 +0100)]
The final batch of changes for the new coercion representation
* Fix bugs in the packing and unpacking of data
constructors with equality predicates in their types
* Remove PredCo altogether; instead, coercions between predicated
types (like (Eq a, [a]~b) => blah) are treated as if they
were precisely their underlying representation type
Eq a -> ((~) [a] b) -> blah
in this case
* Similarly, Type.coreView no longer treats equality
predciates specially.
* Implement the cast-of-coercion optimisation in
Simplify.simplCoercionF
Numerous other small bug-fixes and refactorings.
Annoyingly, OptCoercion had Windows line endings, and this
patch switches to Unix, so it looks as if every line has changed.
Simon Peyton Jones [Thu, 12 May 2011 10:04:08 +0000 (11:04 +0100)]
Unix line endings for Pair.lhs
Simon Peyton Jones [Thu, 12 May 2011 10:01:34 +0000 (11:01 +0100)]
Fix Trac #5192: missing case in hsValBindsImplicits
This fixes the bug, adds some comments, and a tiny bit of refactoring
Simon Peyton Jones [Thu, 12 May 2011 07:48:07 +0000 (08:48 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 12 May 2011 07:46:20 +0000 (08:46 +0100)]
White space only
Edward Z. Yang [Wed, 11 May 2011 21:31:58 +0000 (22:31 +0100)]
Document -ddump-to-file.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Simon Peyton Jones [Wed, 11 May 2011 16:28:26 +0000 (17:28 +0100)]
Merge remote branch 'origin/master'
Simon Marlow [Wed, 11 May 2011 10:00:10 +0000 (11:00 +0100)]
scheduleDoGC: if we're doing heapCensus(), do it *before* releasing
the other mutator threads (#5127)
Simon Marlow [Wed, 4 May 2011 15:43:35 +0000 (16:43 +0100)]
fix the names of the floating-point operations in the Cmm parser
David M Peixotto [Tue, 10 May 2011 17:40:23 +0000 (12:40 -0500)]
Fix bug in one-line stats printing
The code that prints the "one-line" stats (i.e. the RTS -t flag) was
incorreclty printing zeros for some time values. These time values
were computed inside a conditional that was only true when printing
detailed stats (i.e. the RTS -s or -S flags).
This commit simply moves the computation out of the conditional so
they are available for the one-line stats output.
Simon Peyton Jones [Mon, 9 May 2011 17:10:57 +0000 (18:10 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 9 May 2011 15:45:12 +0000 (16:45 +0100)]
Fix renaming of guards
This was making mc17 fail.
Simon Peyton Jones [Mon, 9 May 2011 15:44:30 +0000 (16:44 +0100)]
Fix the desugaring of guards in arrow syntax
This was making T3822 fail, which it has apparently been doing
for some time (ie in GHC 7, 6.12, 6.10)!
Simon Marlow [Mon, 9 May 2011 12:33:00 +0000 (13:33 +0100)]
fix pretty-printing of the cvttsd2si SSE2 instruction (fixes 5149 test
on x86_64).
Simon Peyton Jones [Mon, 9 May 2011 11:01:38 +0000 (12:01 +0100)]
Merge branch 'master' of darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 9 May 2011 10:53:47 +0000 (11:53 +0100)]
Merge ghc-new-co into master branch
Simon Peyton Jones [Mon, 9 May 2011 10:46:03 +0000 (11:46 +0100)]
Don't discard usage info from coercion bindings!
Simon Marlow [Mon, 9 May 2011 10:34:14 +0000 (11:34 +0100)]
heapCensus: we need to traverse the heap fragments stored in the
gen_workspace structures. Fixes heapprof001(prof_hc_hb).
Simon Marlow [Fri, 6 May 2011 11:00:53 +0000 (12:00 +0100)]
Add $$($1_$2_$3_ALL_HC_OPTS) when linking dynamic libraries. Not
having this meant we weren't getting -no-user-package-conf, which
caused a build failure for me due to locally-installed packages being
used instead of ones in the tree.
Simon Peyton Jones [Mon, 9 May 2011 09:03:28 +0000 (10:03 +0100)]
Comments only
Ian Lynagh [Sun, 8 May 2011 15:13:33 +0000 (16:13 +0100)]
Merge branch 'coloured-core' of https://github.com/nominolo/ghc into coloured-core
Ian Lynagh [Sun, 8 May 2011 12:41:12 +0000 (13:41 +0100)]
Change remaining uses of cTargetOS to platformOS
And remove cTargetOS/cTargetPlatform.
Ian Lynagh [Sun, 8 May 2011 10:41:34 +0000 (11:41 +0100)]
Remove a use of cTargetOS, in favour of platformOS
Ian Lynagh [Sat, 7 May 2011 23:50:04 +0000 (00:50 +0100)]
Whitespace only in ghci/ByteCodeGen.lhs
Ian Lynagh [Sat, 7 May 2011 23:39:42 +0000 (00:39 +0100)]
Remove an explicit import list
Ian Lynagh [Sat, 7 May 2011 23:39:05 +0000 (00:39 +0100)]
Remove commented out imports
Ian Lynagh [Sat, 7 May 2011 23:30:38 +0000 (00:30 +0100)]
Change more Config tests to Platform tests
Ian Lynagh [Sat, 7 May 2011 23:25:19 +0000 (00:25 +0100)]
Remove unused pprUserReg functions
Ian Lynagh [Sat, 7 May 2011 23:22:38 +0000 (00:22 +0100)]
Change some conditional tests from Config.cTargetArch to platformArch
Ian Lynagh [Sat, 7 May 2011 22:37:59 +0000 (23:37 +0100)]
Move Platform from compiler/nativeGen to compiler/utils
We want to use it across the whole compiler now
Ian Lynagh [Sat, 7 May 2011 22:35:39 +0000 (23:35 +0100)]
Improve the warning about -fllvm and -fPIC/-dynamic conflicting
We now do it while parsing the flags, rather than at the end.
It also now uses the Platform's arch/os variables, rather than Config's.
Ian Lynagh [Sat, 7 May 2011 16:55:08 +0000 (17:55 +0100)]
Remove some dead code
Not needed now that we don't support registerised via-C compilation.
Ian Lynagh [Fri, 6 May 2011 14:28:53 +0000 (15:28 +0100)]
Make retainer profiling use the label length (-L) flag)
Ian Lynagh [Sun, 1 May 2011 17:04:21 +0000 (18:04 +0100)]
Remove commented out imports
Simon Peyton Jones [Fri, 6 May 2011 17:07:36 +0000 (18:07 +0100)]
Fix build
Simon Peyton Jones [Fri, 6 May 2011 14:56:06 +0000 (15:56 +0100)]
Merge master into the ghc-new-co branch
Simon Peyton Jones [Fri, 6 May 2011 14:43:49 +0000 (15:43 +0100)]
Substantial improvements in RtClosureInspect
The code for constructors in cvReconstrutType and cvObtainTerm
was grotesque. It's now slightly better. And it works with
the new coercion representation.
Apart from being simpler I have also made some small behavioural
improvements
* Improved printing for string values
* Preserve the print-name when instanting type variables
(so now they are not always called "t")
* Suppressed printing of predicate arguments to
data constructors, unless -dppr-debug is on
Simon Peyton Jones [Fri, 6 May 2011 14:35:07 +0000 (15:35 +0100)]
Missing coercion case in byte code generation
Simon Peyton Jones [Fri, 6 May 2011 14:34:32 +0000 (15:34 +0100)]
Remove special case for EqPred in CoreView
Simon Peyton Jones [Fri, 6 May 2011 14:34:09 +0000 (15:34 +0100)]
Use eqSpecPreds
Edward Z. Yang [Thu, 5 May 2011 18:37:23 +0000 (19:37 +0100)]
Improve dead block calculation, per Simon Marlow's advice.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
David Terei [Thu, 5 May 2011 00:08:47 +0000 (17:08 -0700)]
Remove unused hasktags configure check
David Terei [Thu, 5 May 2011 00:07:53 +0000 (17:07 -0700)]
Remove depreciated install-docs command
Simon Peyton Jones [Wed, 4 May 2011 22:10:42 +0000 (23:10 +0100)]
Merge remote branch 'origin/master'
Simon Peyton Jones [Wed, 4 May 2011 22:09:53 +0000 (23:09 +0100)]
Do-notation in an arrow context is not rebindable
Fixes Trac #4851
David Terei [Wed, 4 May 2011 22:09:13 +0000 (15:09 -0700)]
Format wibble
David Terei [Tue, 3 May 2011 22:02:25 +0000 (15:02 -0700)]
Fix some warnings in IfaceSyn
David Terei [Tue, 3 May 2011 21:52:58 +0000 (14:52 -0700)]
Formatting fixes to GhcMonad
David Terei [Tue, 3 May 2011 21:52:35 +0000 (14:52 -0700)]
Formatting fixes to IfaceSyn
David Terei [Mon, 2 May 2011 08:03:13 +0000 (01:03 -0700)]
LLVM: Support LLVM 2.9 (#5103)
Instead of using the GNU As subsection feature on Linux/Windows
for TNTC we now use the LLVM Mangler on all platforms.
David Terei [Sun, 1 May 2011 19:58:56 +0000 (05:58 +1000)]
LLVM: Add support for 64bit OSX. (partial #4210)
Simon Peyton Jones [Wed, 4 May 2011 21:35:27 +0000 (22:35 +0100)]
Make import conditional on DEBUG to avoid unused-import warnings
Simon Peyton Jones [Wed, 4 May 2011 21:34:14 +0000 (22:34 +0100)]
Remove accidental trace
Simon Peyton Jones [Wed, 4 May 2011 15:37:08 +0000 (16:37 +0100)]
Merge branch monad-comp onto master
This patch implements monad comprehensions, Trac #4370.
Thanks to Nils Schweinsberg for doing most of the heavy lifting.
I did quite a lot of related refactoring as well. Notably:
* Combined TransformStmt and GroupStmt into a single
constructor TransStmt; they share a lot of code.
I also made TransStmt into a record; it has a lot of fields.
* Remove the "result expression" field of HsDo, and instead
implement LastStmt, which is expected to be at the end
of a list of Stmts
* Generalise and tidy up the typechecking of monad comprehensions
* Do-notation in arrows is marked with HsStmtContext = ArrowExpr
* tcMDoStmt (which was only used for arrows) is moved
to TcArrows, and renamed tcArrDoStmt
* Improved documentation in the user manual
* Lots of other minor changes
Simon Peyton Jones [Wed, 4 May 2011 15:14:04 +0000 (16:14 +0100)]
Change (back) to Unix line endings
Simon Peyton Jones [Wed, 4 May 2011 14:46:09 +0000 (15:46 +0100)]
Print contraint step counts only with -dppr-debug
Simon Peyton Jones [Wed, 4 May 2011 14:45:43 +0000 (15:45 +0100)]
Improve error message when a function is applied
to too many or too few args, in a higher order context
The change is to tcExpr.funResCtxt
Simon Peyton Jones [Wed, 4 May 2011 14:44:42 +0000 (15:44 +0100)]
Final batch of monad-comprehension stuff
* Do-notation in arrows is marked with HsStmtContext = ArrowExpr
* tcMDoStmt (which was only used for arrows) is moved
to TcArrows, and renamed tcArrDoStmt
* Improved documentation in the user manual
* Lots of other minor changes
Simon Peyton Jones [Wed, 4 May 2011 12:27:12 +0000 (13:27 +0100)]
Be cleverer in dataConCannotMatch, fixes Trac #5168
Simon Peyton Jones [Wed, 4 May 2011 12:26:30 +0000 (13:26 +0100)]
Merge commit
Simon Peyton Jones [Wed, 4 May 2011 11:14:27 +0000 (12:14 +0100)]
Merge remote-tracking branch 'origin/master'