ghc.git
7 years agoDefine LdCmd in the bindist configure.ac
Ian Lynagh [Sun, 5 Aug 2012 23:12:41 +0000 (00:12 +0100)] 
Define LdCmd in the bindist configure.ac

7 years agoWhitespace only in UniqFM
Ian Lynagh [Sun, 5 Aug 2012 20:46:18 +0000 (21:46 +0100)] 
Whitespace only in UniqFM

7 years agoMore more ld-related settings into the settings file
Ian Lynagh [Sun, 5 Aug 2012 20:28:20 +0000 (21:28 +0100)] 
More more ld-related settings into the settings file

Related to #4862

7 years agoImprove some code layout in SysTools
Ian Lynagh [Sun, 5 Aug 2012 19:44:38 +0000 (20:44 +0100)] 
Improve some code layout in SysTools

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sun, 5 Aug 2012 18:51:42 +0000 (19:51 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoRemove pprDefiniteTrace
Ian Lynagh [Sun, 5 Aug 2012 18:05:02 +0000 (19:05 +0100)] 
Remove pprDefiniteTrace

All uses of it are now in an IO Monad, so we don't need to use
a trace-like function.

7 years agoRename trace_dump to dump
Ian Lynagh [Sun, 5 Aug 2012 17:54:48 +0000 (18:54 +0100)] 
Rename trace_dump to dump

It's no longer a trace-like function.

7 years agoWhitespace only in compiler/simplCore/Simplify.lhs
Ian Lynagh [Sun, 5 Aug 2012 17:53:46 +0000 (18:53 +0100)] 
Whitespace only in compiler/simplCore/Simplify.lhs

7 years agoBuild fix
Ian Lynagh [Sun, 5 Aug 2012 17:15:07 +0000 (18:15 +0100)] 
Build fix

7 years agoRemove LD_X; it's no longer used
Ian Lynagh [Sun, 5 Aug 2012 17:11:09 +0000 (18:11 +0100)] 
Remove LD_X; it's no longer used

7 years agoMove linker flags into the settings file; fixes #4862
Ian Lynagh [Sun, 5 Aug 2012 17:08:22 +0000 (18:08 +0100)] 
Move linker flags into the settings file; fixes #4862

They were getting baked into Config.hs before.

7 years agoConvert prefix uses of (<>) to infix <>
Ian Lynagh [Sun, 5 Aug 2012 15:53:18 +0000 (16:53 +0100)] 
Convert prefix uses of (<>) to infix <>

7 years agoRemove an unsafe use of head (#7118)
Paolo Capriotti [Sat, 4 Aug 2012 17:43:00 +0000 (18:43 +0100)] 
Remove an unsafe use of head (#7118)

7 years agoDe-orphan the Outputable Fingerprint instance
Ian Lynagh [Sun, 5 Aug 2012 15:07:11 +0000 (16:07 +0100)] 
De-orphan the Outputable Fingerprint instance

7 years agoRemove another unnecessary Platform argument
Ian Lynagh [Sun, 5 Aug 2012 15:03:38 +0000 (16:03 +0100)] 
Remove another unnecessary Platform argument

7 years agoWhitespace only in utils/Outputable.lhs
Ian Lynagh [Sun, 5 Aug 2012 13:19:40 +0000 (14:19 +0100)] 
Whitespace only in utils/Outputable.lhs

7 years agoWhitespace only in hsSyn/HsSyn.lhs
Ian Lynagh [Sun, 5 Aug 2012 13:19:03 +0000 (14:19 +0100)] 
Whitespace only in hsSyn/HsSyn.lhs

7 years agoDe-orphan the Outputable Char instance
Ian Lynagh [Sun, 5 Aug 2012 13:18:22 +0000 (14:18 +0100)] 
De-orphan the Outputable Char instance

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sun, 5 Aug 2012 12:35:34 +0000 (13:35 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoFix references to repositories in the user guide
Paolo Capriotti [Fri, 3 Aug 2012 12:39:52 +0000 (13:39 +0100)] 
Fix references to repositories in the user guide

7 years agocomments and refactoring
Simon Marlow [Thu, 2 Aug 2012 12:07:19 +0000 (13:07 +0100)] 
comments and refactoring

7 years agoFloutOut.wrapTick: don't forget to tick the args of a constructor app
Simon Marlow [Thu, 2 Aug 2012 10:53:58 +0000 (11:53 +0100)] 
FloutOut.wrapTick: don't forget to tick the args of a constructor app

Thanks to Peter Wortmann for pointing out this bug.

7 years agoapplying simonpj's fix from #7022 (with 80-col reformatting)
Simon Marlow [Thu, 2 Aug 2012 10:47:51 +0000 (11:47 +0100)] 
applying simonpj's fix from #7022 (with 80-col reformatting)

7 years agocomment wibble
Simon Marlow [Wed, 1 Aug 2012 09:09:51 +0000 (10:09 +0100)] 
comment wibble

7 years agofix a bug in the inliner
Simon Marlow [Thu, 2 Aug 2012 10:22:28 +0000 (11:22 +0100)] 
fix a bug in the inliner

7 years agoEliminate "r = r" assignments.
Simon Marlow [Thu, 2 Aug 2012 09:36:58 +0000 (10:36 +0100)] 
Eliminate "r = r" assignments.

Previously these were caught by removeDeadAssignments, but we aren't
doing that now.

7 years agoNo need to do removeDeadAssignments, just do cmmLiveness instead
Simon Marlow [Thu, 2 Aug 2012 09:35:44 +0000 (10:35 +0100)] 
No need to do removeDeadAssignments, just do cmmLiveness instead

7 years agoDisable the mini-inliner when using the new codegen
Simon Marlow [Thu, 2 Aug 2012 08:38:40 +0000 (09:38 +0100)] 
Disable the mini-inliner when using the new codegen

The new sinker is at least as powerful, and the mini-inliner sometimes
even makes things worse.

7 years agoImprove accuracy of memory conflict tracking
Simon Marlow [Thu, 2 Aug 2012 08:37:39 +0000 (09:37 +0100)] 
Improve accuracy of memory conflict tracking

We now track stack regions, so that we can float a stack load past a
stack store if they don't conflict.  Also, we now use the CmmType to
more accurately identify heap addresses.

7 years agoInline into the last node
Simon Marlow [Wed, 1 Aug 2012 09:45:14 +0000 (10:45 +0100)] 
Inline into the last node

Also lots of refactoring and tidyup

7 years agoCode reformatting
Simon Marlow [Wed, 1 Aug 2012 09:44:55 +0000 (10:44 +0100)] 
Code reformatting

7 years agoadd a sinking pass before stack layout (currently disabled)
Simon Marlow [Wed, 1 Aug 2012 09:41:59 +0000 (10:41 +0100)] 
add a sinking pass before stack layout (currently disabled)

7 years agoDon't shortcut call-returns when not splitting proc points
Simon Marlow [Wed, 1 Aug 2012 09:36:08 +0000 (10:36 +0100)] 
Don't shortcut call-returns when not splitting proc points

See Note [shortcut call returns]

7 years agoExplicitly share some return continuations
Simon Marlow [Tue, 31 Jul 2012 10:19:03 +0000 (11:19 +0100)] 
Explicitly share some return continuations

Instead of relying on common-block-elimination to share return
continuations in the common case (case-alternative heap checks) we do
it explicitly.  This isn't hard to do, is more robust, and saves some
compilation time.  Full commentary in Note [sharing continuations].

7 years agoImprove code generated when real registers are clobbered
Simon Marlow [Tue, 31 Jul 2012 14:48:42 +0000 (15:48 +0100)] 
Improve code generated when real registers are clobbered

There was a long-standing ToDo here that I just did: if a real
register is clobbered by the current instruction, then we should move
it to another free register rather than spilling it to memory.  This
case crops up more often now that the register allocator can allocate
into the fixed Rn registers.

7 years agoFix #7087 (integer overflow in getDelayTarget())
Simon Marlow [Tue, 31 Jul 2012 08:06:43 +0000 (09:06 +0100)] 
Fix #7087 (integer overflow in getDelayTarget())

7 years agoFix compile on linux-powerpc64. (#7084).
Erik de Castro Lopo [Fri, 20 Jul 2012 05:46:19 +0000 (15:46 +1000)] 
Fix compile on linux-powerpc64. (#7084).

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Mon, 30 Jul 2012 17:42:56 +0000 (18:42 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agofix haddock parse error
Simon Marlow [Mon, 30 Jul 2012 12:43:37 +0000 (13:43 +0100)] 
fix haddock parse error

7 years agofix warnings
Simon Marlow [Mon, 30 Jul 2012 12:21:59 +0000 (13:21 +0100)] 
fix warnings

7 years agofix merge bugs
Simon Marlow [Mon, 30 Jul 2012 12:16:37 +0000 (13:16 +0100)] 
fix merge bugs

7 years agobug fix for control-flow optimisation
Simon Marlow [Mon, 30 Jul 2012 10:06:09 +0000 (11:06 +0100)] 
bug fix for control-flow optimisation

7 years agobug fixes for the sinker
Simon Marlow [Mon, 30 Jul 2012 10:05:30 +0000 (11:05 +0100)] 
bug fixes for the sinker

7 years agono need to removeUnreachableBlocks
Simon Marlow [Thu, 19 Jul 2012 10:54:41 +0000 (11:54 +0100)] 
no need to removeUnreachableBlocks

We do this in lots of other places (blockConcat, CmmLayoutStack, etc.)

7 years agoSmall optimisation to the code generated for CAFs
Simon Marlow [Thu, 19 Jul 2012 10:32:45 +0000 (11:32 +0100)] 
Small optimisation to the code generated for CAFs

7 years agooptimise away some unnecessary stack checks
Simon Marlow [Thu, 19 Jul 2012 09:03:49 +0000 (10:03 +0100)] 
optimise away some unnecessary stack checks

7 years agoNew codegen: do not split proc-points when using the NCG
Simon Marlow [Thu, 19 Jul 2012 09:03:06 +0000 (10:03 +0100)] 
New codegen: do not split proc-points when using the NCG

Proc-point splitting is only required by backends that do not support
having proc-points within a code block (that is, everything except the
native backend, i.e. LLVM and C).

Not doing proc-point splitting saves some compilation time, and might
produce slightly better code in some cases.

7 years agoMerge sinking and inlining to get better results.
Simon Marlow [Thu, 19 Jul 2012 08:45:56 +0000 (09:45 +0100)] 
Merge sinking and inlining to get better results.

7 years agoFixes for the stack layout algorithm to handle join points
Simon Marlow [Thu, 19 Jul 2012 08:44:57 +0000 (09:44 +0100)] 
Fixes for the stack layout algorithm to handle join points

7 years agobugfix: cope when a source reg is dead at a join point
Simon Marlow [Wed, 18 Jul 2012 12:33:45 +0000 (13:33 +0100)] 
bugfix: cope when a source reg is dead at a join point

We didn't trip over this one until I started generating code without
proc-point splitting, which has more join points and loops.

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Sun, 29 Jul 2012 22:17:30 +0000 (23:17 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agotypos
Gabor Greif [Fri, 27 Jul 2012 21:29:21 +0000 (23:29 +0200)] 
typos

7 years agoGHCConstants.h should not contain preprocessor definitions
Gabor Greif [Fri, 27 Jul 2012 21:12:49 +0000 (23:12 +0200)] 
GHCConstants.h should not contain preprocessor definitions

7 years agotypo
Gabor Greif [Tue, 24 Jul 2012 11:01:08 +0000 (13:01 +0200)] 
typo

7 years agoRemove nativeGen/PprInstruction.hs
Ian Lynagh [Sat, 28 Jul 2012 23:46:06 +0000 (00:46 +0100)] 
Remove nativeGen/PprInstruction.hs

Looks like I accidentally added it a while ago

7 years agoFix dfun unfolding of PA instances generated by the vectoriser
Manuel M T Chakravarty [Sat, 28 Jul 2012 11:48:34 +0000 (21:48 +1000)] 
Fix dfun unfolding of PA instances generated by the vectoriser

7 years agoFix warning on x86-64
Paolo Capriotti [Fri, 27 Jul 2012 19:57:04 +0000 (20:57 +0100)] 
Fix warning on x86-64

7 years agoRe-enable inline-rule-shadowing warning.
Paolo Capriotti [Thu, 26 Jul 2012 20:33:23 +0000 (21:33 +0100)] 
Re-enable inline-rule-shadowing warning.

Keep the warning off for template-haskell and bytestring for the moment.

7 years agoFix typo in warning message
Paolo Capriotti [Thu, 26 Jul 2012 20:30:02 +0000 (21:30 +0100)] 
Fix typo in warning message

7 years agoMerge PrelRules refactoring (#7014)
Paolo Capriotti [Thu, 26 Jul 2012 20:50:56 +0000 (21:50 +0100)] 
Merge PrelRules refactoring (#7014)

7 years agoMigrate more rules to PrelRules.
Paolo Capriotti [Wed, 25 Jul 2012 10:37:18 +0000 (11:37 +0100)] 
Migrate more rules to PrelRules.

Move the following primop rules from GHC.Base to PrelRules:

"narrow32Int#"  forall x#. narrow32Int#   x# = x#
"narrow32Word#" forall x#. narrow32Word#   x# = x#

"int2Word2Int"  forall x#. int2Word# (word2Int# x#) = x#
"word2Int2Word" forall x#. word2Int# (int2Word# x#) = x#

7 years agoMerge commit 'c859d17f9b0ae8559dac4f7e5cb8521e7ab5f0fb'
Ian Lynagh [Wed, 25 Jul 2012 14:27:43 +0000 (15:27 +0100)] 
Merge commit 'c859d17f9b0ae8559dac4f7e5cb8521e7ab5f0fb'

7 years agoMerge taskId and serialisableTaskId
Mikolaj Konarski [Tue, 24 Jul 2012 09:41:27 +0000 (11:41 +0200)] 
Merge taskId and serialisableTaskId

A companion ghc-events pachakge commit displays task ids in the same format.

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Wed, 25 Jul 2012 11:30:43 +0000 (12:30 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoRemove pprNatCmmDecl's Platform argument
Ian Lynagh [Tue, 24 Jul 2012 21:18:28 +0000 (22:18 +0100)] 
Remove pprNatCmmDecl's Platform argument

7 years agoRemove unnecessary Platform arguments in nativeGen/PPC/Ppr.hs
Ian Lynagh [Tue, 24 Jul 2012 21:04:15 +0000 (22:04 +0100)] 
Remove unnecessary Platform arguments in nativeGen/PPC/Ppr.hs

7 years agoAdd a comment about the units of platformWordSize
Ian Lynagh [Tue, 24 Jul 2012 20:13:00 +0000 (21:13 +0100)] 
Add a comment about the units of platformWordSize

7 years agoRemove some old temporary warning suppression for hoopl warnings
Ian Lynagh [Tue, 24 Jul 2012 20:05:12 +0000 (21:05 +0100)] 
Remove some old temporary warning suppression for hoopl warnings

7 years agoMake -fscc-profiling a dynamic flag
Ian Lynagh [Tue, 24 Jul 2012 19:26:52 +0000 (20:26 +0100)] 
Make -fscc-profiling a dynamic flag

All the flags that 'ways' imply are now dynamic

7 years agoRefactor prel rules: always return a single rule.
Paolo Capriotti [Tue, 24 Jul 2012 17:14:43 +0000 (18:14 +0100)] 
Refactor prel rules: always return a single rule.

7 years agoWe no longer need to build utf8-string
Ian Lynagh [Tue, 24 Jul 2012 17:13:46 +0000 (18:13 +0100)] 
We no longer need to build utf8-string

haskeline no longer depends on it

7 years agoRefactor PrelRules and add more rules (#7014)
Paolo Capriotti [Wed, 4 Jul 2012 10:47:55 +0000 (11:47 +0100)] 
Refactor PrelRules and add more rules (#7014)

Ported various rules for numeric types from GHC.Base. Added new rules
for bitwise operations, shifts and word comparisons.

7 years agoAdd flag to disable rule shadowing warning.
Paolo Capriotti [Tue, 24 Jul 2012 15:59:50 +0000 (16:59 +0100)] 
Add flag to disable rule shadowing warning.

Also, temporarely disable that warning for validate builds, until we
finish fixing them all.

7 years agoTweak the HC_OPTS generation
Ian Lynagh [Tue, 24 Jul 2012 14:46:55 +0000 (15:46 +0100)] 
Tweak the HC_OPTS generation

libraries/base/GHC/Base_HC_OPTS wasn't getting included, because we
were using libraries/base/./GHC/Base.lhs as the path, and the ./
meant we got the wrong filename.

I didn't use $(realpath ...) as the .hs file may be generated by hsc2hs
or similar, so may not exist when the HC_OPTS are constructed.

7 years agoFix whitespace only in cmm/SMRep.lhs
Ian Lynagh [Tue, 24 Jul 2012 14:25:34 +0000 (15:25 +0100)] 
Fix whitespace only in cmm/SMRep.lhs

7 years agoFix build on Windows: Configure packages in the right order
Ian Lynagh [Tue, 24 Jul 2012 14:11:18 +0000 (15:11 +0100)] 
Fix build on Windows: Configure packages in the right order

Also added a comment explaining that addPackages need to be in
dependency order.

7 years agoFix a subtle float-in bug
Simon Peyton Jones [Mon, 23 Jul 2012 16:29:07 +0000 (17:29 +0100)] 
Fix a subtle float-in bug

This patch makes
  fiExpr (AnnLam ...)
  noFloatIntoExpr (AnnLam ...)
line up with each other.  Previously they behaved inconsistently
with bad results.

The details are in Trac #7088.    There's a regression test
in simplCore/should_compile/T7088

7 years agoNumerous small changes to the constraint solver
Simon Peyton Jones [Mon, 23 Jul 2012 16:05:59 +0000 (17:05 +0100)] 
Numerous small changes to the constraint solver

The main thing is that we now keep unsolved Derived constraints in the
wc_flats of a WantedConstraints, rather than discarding them each time.
This actually fixes a poential (admittedly obscure) bug, when we currently
discard a superclass constraint, and may never re-generate it, and may
thereby miss a functional dependency.

Instead, reportErrors filters out Derived constraints that we don't want
to report.

The other changes are all small refactorings following our walk-through.

7 years agoReverse sense of test in RULEs warning
Simon Peyton Jones [Mon, 23 Jul 2012 14:13:16 +0000 (15:13 +0100)] 
Reverse sense of test in RULEs warning

7 years agoTypo in error message
Simon Peyton Jones [Mon, 23 Jul 2012 08:22:29 +0000 (09:22 +0100)] 
Typo in error message

7 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Mon, 23 Jul 2012 08:17:53 +0000 (09:17 +0100)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

7 years agoDelay inlining 'text' so that the RULE has a chance to fire
Simon Peyton Jones [Mon, 23 Jul 2012 08:17:33 +0000 (09:17 +0100)] 
Delay inlining 'text' so that the RULE has a chance to fire

7 years agoMake the desugarer warn about RULES that may not fire
Simon Peyton Jones [Mon, 23 Jul 2012 08:17:09 +0000 (09:17 +0100)] 
Make the desugarer warn about RULES that may not fire

This warning was suggested by Trac #6082, where we had
a library RULE that failed to fire because its function
was inlined too soon.

7 years agoLess voluminous debug printing with -ddump-tc-trace
Simon Peyton Jones [Mon, 23 Jul 2012 08:11:33 +0000 (09:11 +0100)] 
Less voluminous debug printing with -ddump-tc-trace

7 years agoDon't report unused bindings of the form
Simon Peyton Jones [Sat, 21 Jul 2012 16:42:01 +0000 (17:42 +0100)] 
Don't report unused bindings of the form
       _ = e

Thse are used in a few libraries, either to add type constraints
via a signature, or to mention some variables that are only
otherwise mentioned in one #ifdef branch

7 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Fri, 20 Jul 2012 19:09:58 +0000 (20:09 +0100)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

7 years agoMake SizeIs strict in the bag, which improves performance a bit
Simon Peyton Jones [Fri, 20 Jul 2012 19:09:02 +0000 (20:09 +0100)] 
Make SizeIs strict in the bag, which improves performance a bit

7 years agoMake seqType etc take accouunt of kinds that are now non-trivial
Simon Peyton Jones [Fri, 20 Jul 2012 19:08:38 +0000 (20:08 +0100)] 
Make seqType etc take accouunt of kinds that are now non-trivial

7 years agoDo calcUnfoldingGuidance on the *non* occ-analysed RHS
Simon Peyton Jones [Fri, 20 Jul 2012 19:07:51 +0000 (20:07 +0100)] 
Do calcUnfoldingGuidance on the *non* occ-analysed RHS

See Note [Calculate unfolding guidance on the non-occ-anal'd expression]
This makes a big difference to residency (530M vs over 800M when compiling
Cabal).

This fixes the majority of the regression in Trac #6104

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Fri, 20 Jul 2012 18:17:09 +0000 (19:17 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoMake tracingSettings have just enough information to get debug output printed
Simon Peyton Jones [Fri, 20 Jul 2012 18:10:14 +0000 (19:10 +0100)] 
Make tracingSettings have just enough information to get debug output printed

I suspect I have done the wrong thing; I hope someone can improve.

7 years agoMerge ../HEAD
Simon Peyton Jones [Fri, 20 Jul 2012 17:17:27 +0000 (18:17 +0100)] 
Merge ../HEAD

7 years agoGHC 7.4 is now required for building HEAD
Ian Lynagh [Fri, 20 Jul 2012 15:54:01 +0000 (16:54 +0100)] 
GHC 7.4 is now required for building HEAD

7 years agoBump HEAD version to 7.7
Ian Lynagh [Fri, 20 Jul 2012 15:46:19 +0000 (16:46 +0100)] 
Bump HEAD version to 7.7

7 years agoWarn about unused pattern bindings
Simon Peyton Jones [Fri, 20 Jul 2012 11:57:35 +0000 (12:57 +0100)] 
Warn about unused pattern bindings

Fixes Trac #7085

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 19 Jul 2012 19:38:05 +0000 (20:38 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoUpdate dependencies.
Paolo Capriotti [Tue, 10 Jul 2012 16:58:41 +0000 (17:58 +0100)] 
Update dependencies.

7 years agoUpdate to time 1.4.0.1
Paolo Capriotti [Tue, 10 Jul 2012 15:42:34 +0000 (16:42 +0100)] 
Update to time 1.4.0.1

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Dimitrios Vytiniotis [Thu, 19 Jul 2012 12:35:24 +0000 (14:35 +0200)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoCleaning up the extractUnsolved story.
Dimitrios Vytiniotis [Thu, 19 Jul 2012 12:32:15 +0000 (14:32 +0200)] 
Cleaning up the extractUnsolved story.