ghc-hetmet.git
14 years agoTweak layout for alternative layout rule
Ian Lynagh [Thu, 3 Dec 2009 16:44:24 +0000 (16:44 +0000)]
Tweak layout for alternative layout rule

14 years agoLink all dynamic libraries with the correct install_name on Mac OS/X.
Ian Lynagh [Fri, 4 Dec 2009 14:36:14 +0000 (14:36 +0000)]
Link all dynamic libraries with the correct install_name on Mac OS/X.
This is a rerecord of
    Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090930222855
to avoid conflicts.

14 years agoDocument the new -dylib-install-name option in the user's guide.
Stephen Blackheath [Thu, 1 Oct 2009 05:16:37 +0000 (05:16 +0000)]
Document the new -dylib-install-name option in the user's guide.

14 years agoAdd -dylib-install-name option to GHC so the install name can be set for dynamic...
Stephen Blackheath [Wed, 30 Sep 2009 22:37:08 +0000 (22:37 +0000)]
Add -dylib-install-name option to GHC so the install name can be set for dynamic libs on Mac OS/X.

14 years agoForce -fPIC when linking against dynamic libraries on Mac OS/X.
Stephen Blackheath [Mon, 28 Sep 2009 20:38:00 +0000 (20:38 +0000)]
Force -fPIC when linking against dynamic libraries on Mac OS/X.
Otherwise you get
/tmp/ghc7602_0/ghc7602_0.s:207:0:
   non-relocatable subtraction expression, "___stginit_Lib_dyn" minus "L1x2;4"
/tmp/ghc7602_0/ghc7602_0.s:207:0:
   symbol: "___stginit_Lib_dyn" can't be undefined in a subtraction expression

14 years agoevaluate_large: evaluate large objects to bd->dest rather than gen->to
Simon Marlow [Fri, 4 Dec 2009 11:10:37 +0000 (11:10 +0000)]
evaluate_large: evaluate large objects to bd->dest rather than gen->to
This fixes aging of large objects in the new scheme.  Bug found by
perf/space_leaks/space_leak_001.  Yay perf regressions tests.

14 years agoCorrection to the allocation stats following earlier refactoring
Simon Marlow [Fri, 4 Dec 2009 11:08:39 +0000 (11:08 +0000)]
Correction to the allocation stats following earlier refactoring

14 years agoexport g0
Simon Marlow [Thu, 3 Dec 2009 16:52:09 +0000 (16:52 +0000)]
export g0

14 years agoGC refactoring, remove "steps"
Simon Marlow [Thu, 3 Dec 2009 15:07:28 +0000 (15:07 +0000)]
GC refactoring, remove "steps"

The GC had a two-level structure, G generations each of T steps.
Steps are for aging within a generation, mostly to avoid premature
promotion.

Measurements show that more than 2 steps is almost never worthwhile,
and 1 step is usually worse than 2.  In theory fractional steps are
possible, so the ideal number of steps is somewhere between 1 and 3.
GHC's default has always been 2.

We can implement 2 steps quite straightforwardly by having each block
point to the generation to which objects in that block should be
promoted, so blocks in the nursery point to generation 0, and blocks
in gen 0 point to gen 1, and so on.

This commit removes the explicit step structures, merging generations
with steps, thus simplifying a lot of code.  Performance is
unaffected.  The tunable number of steps is now gone, although it may
be replaced in the future by a way to tune the aging in generation 0.

14 years agofix error message on Windows (fixes rtsflags001)
Simon Marlow [Wed, 2 Dec 2009 14:11:35 +0000 (14:11 +0000)]
fix error message on Windows (fixes rtsflags001)

14 years agoFix loading of annotations
Roman Leshchinskiy [Fri, 4 Dec 2009 02:42:59 +0000 (02:42 +0000)]
Fix loading of annotations

The problem was that we collected all annotations we knew about once when the
simplifier started and threaded them through the CoreM monad. If new interface
files were loaded during simplification, their annotations would not be
visible to the simplifier.

Now, we rebuild the annotation list at the start of every simplifier pass that
needs it (which is only SpecConstr at the moment). This ensures that we see
all annotations that have been loaded so far. This is somewhat similar to how
RULES are handled.

14 years agoAdd new ForceSpecConstr annotation
Roman Leshchinskiy [Thu, 3 Dec 2009 06:54:55 +0000 (06:54 +0000)]
Add new ForceSpecConstr annotation

Annotating a type with {-# ANN type T ForceSpecConstr #-} makes SpecConstr
ignore -fspec-constr-threshold and -fspec-constr-count for recursive functions
that have arguments of type T. Such functions will be specialised regardless
of their size and there is no upper bound on the number of specialisations
that can be generated. This also works if T is embedded in other types such as
Maybe T (but not T -> T).

T should not be a product type because it could be eliminated by the
worker/wrapper transformation. For instance, in

data T = T Int Int

foo :: T -> Int
foo (T m n) = ... foo (T m' n') ...

SpecConstr will never see the T because w/w will get rid of it. I'm still
thinking about whether fixing this is worthwhile.

14 years agoGenerate INLINE pragmas for PA methods
Roman Leshchinskiy [Thu, 3 Dec 2009 03:14:52 +0000 (03:14 +0000)]
Generate INLINE pragmas for PA methods

14 years agoAdd a GHC layout extension to the alternative layout rule
Ian Lynagh [Thu, 3 Dec 2009 15:57:08 +0000 (15:57 +0000)]
Add a GHC layout extension to the alternative layout rule

14 years agoFix HPC column numbers, following the column number changes in GHC
Ian Lynagh [Thu, 3 Dec 2009 13:55:20 +0000 (13:55 +0000)]
Fix HPC column numbers, following the column number changes in GHC

14 years agoWhitespace only
Ian Lynagh [Thu, 3 Dec 2009 13:22:59 +0000 (13:22 +0000)]
Whitespace only

14 years agoFix column numbers used when highlighting :list output
Ian Lynagh [Thu, 3 Dec 2009 13:03:28 +0000 (13:03 +0000)]
Fix column numbers used when highlighting :list output

14 years agoadd a missing lock around allocGroup()
Simon Marlow [Thu, 3 Dec 2009 11:02:09 +0000 (11:02 +0000)]
add a missing lock around allocGroup()

14 years agoremove unused cap->in_gc flag
Simon Marlow [Wed, 2 Dec 2009 15:42:40 +0000 (15:42 +0000)]
remove unused cap->in_gc flag

14 years agoRefactoring only
Simon Marlow [Wed, 2 Dec 2009 12:38:06 +0000 (12:38 +0000)]
Refactoring only

14 years agomove sanity checking code from Storage.c to Sanity.c
Simon Marlow [Wed, 2 Dec 2009 12:11:41 +0000 (12:11 +0000)]
move sanity checking code from Storage.c to Sanity.c

14 years agostg_ap_0_fast: sanity-check only the topmost frame, not the whole stack
Simon Marlow [Wed, 2 Dec 2009 11:51:09 +0000 (11:51 +0000)]
stg_ap_0_fast: sanity-check only the topmost frame, not the whole stack
Sanity checking was getting too slow in some cases, this returns it to
a constant-factor overhead.

14 years agoFix profiling build
Simon Marlow [Thu, 3 Dec 2009 08:59:30 +0000 (08:59 +0000)]
Fix profiling build

14 years agoMore work on the simplifier's inlining strategies
simonpj@microsoft.com [Wed, 2 Dec 2009 17:42:56 +0000 (17:42 +0000)]
More work on the simplifier's inlining strategies

This patch collects a small raft of related changes

* Arrange that during
     (a) rule matching and
     (b) uses of exprIsConApp_maybe
  we "look through" unfoldings only if they are active
  in the phase. Doing this for (a) required a bit of
  extra plumbing in the rule matching code, but I think
  it's worth it.

  One wrinkle is that even if inlining is off (in the 'gentle'
  phase of simplification) during rule matching we want to
  "look through" things with inlinings.
   See SimplUtils.activeUnfInRule.

  This fixes a long-standing bug, where things that were
  supposed to be (say) NOINLINE, could still be poked into
  via exprIsConApp_maybe.

* In the above cases, also check for (non-rule) loop breakers;
  we never look through these.  This fixes a bug that could make
  the simplifier diverge (and did for Roman).
  Test = simplCore/should_compile/dfun-loop

* Try harder not to choose a DFun as a loop breaker. This is
  just a small adjustment in the OccurAnal scoring function

* In the scoring function in OccurAnal, look at the InlineRule
  unfolding (if there is one) not the actual RHS, beause the
  former is what'll be inlined.

* Make the application of any function to dictionary arguments
  CONLIKE.  Thus (f d1 d2) is CONLIKE.
  Encapsulated in CoreUtils.isExpandableApp
  Reason: see Note [Expandable overloadings] in CoreUtils

* Make case expressions seem slightly smaller in CoreUnfold.
  This reverses an unexpected consequences of charging for
  alternatives.

Refactorings
~~~~~~~~~~~~
* Signficantly refactor the data type for Unfolding (again).
  The result is much nicer.

* Add type synonym BasicTypes.CompilerPhase = Int
  and use it

Many of the files touched by this patch are simply knock-on
consequences of these two refactorings.

14 years agoFix Trac #3100: reifyType
simonpj@microsoft.com [Mon, 30 Nov 2009 17:52:04 +0000 (17:52 +0000)]
Fix Trac #3100: reifyType

A type without any leading foralls may still have constraints
   eg:  ?x::Int => Int -> Int

But reifyType was failing in this case.

Merge to 6.12.

14 years agoFix Trac #3102: pre-matching polytypes
simonpj@microsoft.com [Mon, 30 Nov 2009 17:44:41 +0000 (17:44 +0000)]
Fix Trac #3102: pre-matching polytypes

When *pre-matching* two types
     forall a. C1 => t1  ~  forall a. C2 => t2
we were matching t1~t2, but totally ignoring C1,C2
That's utterly wrong when pre-matching
       (?p::Int) => String  ~  a
because we emerge with a:=String!

All this is part of the impredicative story, which is about
to go away, but still.

Worth merging this to 6.12

14 years agothreadStackUnderflow: put the new TSO on the mut list if necessary
Simon Marlow [Wed, 2 Dec 2009 14:45:49 +0000 (14:45 +0000)]
threadStackUnderflow: put the new TSO on the mut list if necessary

14 years agodon't sanity check the whole stack when switching interp<->compiled
Simon Marlow [Wed, 2 Dec 2009 13:41:21 +0000 (13:41 +0000)]
don't sanity check the whole stack when switching interp<->compiled

14 years agofix to sanity checking for ThreadRelocated TSOs
Simon Marlow [Wed, 2 Dec 2009 13:40:41 +0000 (13:40 +0000)]
fix to sanity checking for ThreadRelocated TSOs

14 years agosanity check the top stack frame, not the whole stack
Simon Marlow [Wed, 2 Dec 2009 13:40:20 +0000 (13:40 +0000)]
sanity check the top stack frame, not the whole stack

14 years agoMake allocatePinned use local storage, and other refactorings
Simon Marlow [Tue, 1 Dec 2009 16:03:21 +0000 (16:03 +0000)]
Make allocatePinned use local storage, and other refactorings

This is a batch of refactoring to remove some of the GC's global
state, as we move towards CPU-local GC.

  - allocateLocal() now allocates large objects into the local
    nursery, rather than taking a global lock and allocating
    then in gen 0 step 0.

  - allocatePinned() was still allocating from global storage and
    taking a lock each time, now it uses local storage.
    (mallocForeignPtrBytes should be faster with -threaded).

  - We had a gen 0 step 0, distinct from the nurseries, which are
    stored in a separate nurseries[] array.  This is slightly strange.
    I removed the g0s0 global that pointed to gen 0 step 0, and
    removed all uses of it.  I think now we don't use gen 0 step 0 at
    all, except possibly when there is only one generation.  Possibly
    more tidying up is needed here.

  - I removed the global allocate() function, and renamed
    allocateLocal() to allocate().

  - the alloc_blocks global is gone.  MAYBE_GC() and
    doYouWantToGC() now check the local nursery only.

14 years agoFree full_prog_argv at exit, closing a memory leak
Simon Marlow [Tue, 1 Dec 2009 12:28:01 +0000 (12:28 +0000)]
Free full_prog_argv at exit, closing a memory leak

14 years agofree cap->saved_mut_lists too
Simon Marlow [Tue, 1 Dec 2009 11:34:48 +0000 (11:34 +0000)]
free cap->saved_mut_lists too
fixes some memory leakage at shutdown

14 years agoexitScheduler: move boundTaskExiting call outside #ifdef THREADED_RTS
Simon Marlow [Tue, 1 Dec 2009 11:33:52 +0000 (11:33 +0000)]
exitScheduler: move boundTaskExiting call outside #ifdef THREADED_RTS
Fixes a little leaked memory at shutdown in non-threaded RTS

14 years agoUse dlltool from the in-tree mingw installation
Ian Lynagh [Tue, 1 Dec 2009 19:05:44 +0000 (19:05 +0000)]
Use dlltool from the in-tree mingw installation
We only use dlltool on Windows, and this way we don't require that
the user has it installed.

14 years agoFix Commentary link in the HACKING file; trac #3706
Ian Lynagh [Tue, 1 Dec 2009 15:01:49 +0000 (15:01 +0000)]
Fix Commentary link in the HACKING file; trac #3706

14 years agoAdd an entry fo the ghci command :run to the user guide
Ian Lynagh [Tue, 1 Dec 2009 17:33:39 +0000 (17:33 +0000)]
Add an entry fo the ghci command :run to the user guide

14 years agoFix typo in docs
Ian Lynagh [Tue, 1 Dec 2009 17:05:50 +0000 (17:05 +0000)]
Fix typo in docs

14 years agoDelay expansion of some makefile variables until they are available
Ian Lynagh [Tue, 1 Dec 2009 13:36:09 +0000 (13:36 +0000)]
Delay expansion of some makefile variables until they are available

14 years agoCall $(SED) rather than sed
Ian Lynagh [Tue, 1 Dec 2009 13:11:23 +0000 (13:11 +0000)]
Call $(SED) rather than sed

14 years agoLook for sed as gsed first
Ian Lynagh [Tue, 1 Dec 2009 13:07:41 +0000 (13:07 +0000)]
Look for sed as gsed first
Solaris's sed apparently doesn't understand [:space:]

14 years agoAvoid running empty for loops; fixes trac #3683
Ian Lynagh [Tue, 1 Dec 2009 12:59:27 +0000 (12:59 +0000)]
Avoid running empty for loops; fixes trac #3683
Solaris's sh gives
    /bin/sh: syntax error at line 1: `;' unexpected
when faced with something like
    for x in ; do ...; done
Patch from Christian Maeder.

14 years agoFix PS file generation
Simon Marlow [Tue, 1 Dec 2009 15:42:54 +0000 (15:42 +0000)]
Fix PS file generation
(the image doesn't work, but at least db2latex doesn't fall over)

14 years agoImplement a new heap-tuning option: -H
Simon Marlow [Mon, 30 Nov 2009 15:18:36 +0000 (15:18 +0000)]
Implement a new heap-tuning option: -H

-H alone causes the RTS to use a larger nursery, but without exceeding
the amount of memory that the application is already using.  It trades
off GC time against locality: the default setting is to use a
fixed-size 512k nursery, but this is sometimes worse than using a very
large nursery despite the worse locality.

Not all programs get faster, but some programs that use large heaps do
much better with -H.  e.g. this helps a lot with #3061 (binary-trees),
though not as much as specifying -H<large>.  Typically using -H<large>
is better than plain -H, because the runtime doesn't know ahead of
time how much memory you want to use.

Should -H be on by default?  I'm not sure, it makes some programs go
slower, but others go faster.

14 years agoStore a destination step in the block descriptor
Simon Marlow [Sun, 29 Nov 2009 16:42:51 +0000 (16:42 +0000)]
Store a destination step in the block descriptor
At the moment, this just saves a memory reference in the GC inner loop
(worth a percent or two of GC time).  Later, it will hopefully let me
experiment with partial steps, and simplifying the generation/step
infrastructure.

14 years agoFix the prof_scc.png image in the profiling section (#3694)
Simon Marlow [Mon, 30 Nov 2009 13:27:03 +0000 (13:27 +0000)]
Fix the prof_scc.png image in the profiling section (#3694)

14 years agodocument 'recache' command in the help output (#3684)
Simon Marlow [Mon, 30 Nov 2009 12:20:40 +0000 (12:20 +0000)]
document 'recache' command in the help output (#3684)

14 years agoCheck whether the main function is actually exported (#414)
Simon Marlow [Mon, 30 Nov 2009 11:23:27 +0000 (11:23 +0000)]
Check whether the main function is actually exported (#414)

14 years agoAvoid using non-standard GNU tar option --force-local
Simon Marlow [Mon, 30 Nov 2009 11:26:05 +0000 (11:26 +0000)]
Avoid using non-standard GNU tar option --force-local

14 years agoReorder ALL_RTS_LIBS
Matthias Kilian [Sun, 15 Nov 2009 17:54:05 +0000 (17:54 +0000)]
Reorder ALL_RTS_LIBS

ALL_RTS_LIBS is (ab)used for linking ghc when BootingFromHc=Yes,
which needs libHSrtsmain.a before libHSrts.a.

14 years agoUpdate dependencies
Ian Lynagh [Sun, 29 Nov 2009 16:55:34 +0000 (16:55 +0000)]
Update dependencies

14 years agoFollow Cabal changes
Ian Lynagh [Sun, 29 Nov 2009 16:51:41 +0000 (16:51 +0000)]
Follow Cabal changes

14 years agoTweak layout to work with alternative layout rule
Ian Lynagh [Sun, 29 Nov 2009 16:30:44 +0000 (16:30 +0000)]
Tweak layout to work with alternative layout rule

14 years agoTweak the alternative layout rule: {} contains commas
Ian Lynagh [Sun, 29 Nov 2009 15:54:54 +0000 (15:54 +0000)]
Tweak the alternative layout rule: {} contains commas

14 years agoCorrect the advanceSrcLoc calculation for tabs
Ian Lynagh [Sun, 29 Nov 2009 15:39:33 +0000 (15:39 +0000)]
Correct the advanceSrcLoc calculation for tabs
It was off-by-one

14 years agoTweak alternative layout rule
Ian Lynagh [Sun, 29 Nov 2009 15:23:23 +0000 (15:23 +0000)]
Tweak alternative layout rule

14 years agoMake the alternative layout rule cope with file pragmas
Ian Lynagh [Sun, 29 Nov 2009 14:58:40 +0000 (14:58 +0000)]
Make the alternative layout rule cope with file pragmas

14 years agoGive more informative error messages
Ian Lynagh [Sun, 29 Nov 2009 03:10:29 +0000 (03:10 +0000)]
Give more informative error messages
We used to just get
    ghc: panic! (the 'impossible' happened)
      (GHC version 6.13.20091128 for x86_64-unknown-linux):
        too few bytes. Failed reading at byte position 32753
with no indication of what was being parsed.

14 years agoTeach advanceSrcLoc about tab characters
Ian Lynagh [Sat, 28 Nov 2009 15:12:04 +0000 (15:12 +0000)]
Teach advanceSrcLoc about tab characters

14 years agoWhitespace only
Ian Lynagh [Sat, 28 Nov 2009 15:07:31 +0000 (15:07 +0000)]
Whitespace only

14 years agoColumns now start at 1, as lines already did
Ian Lynagh [Fri, 27 Nov 2009 22:40:50 +0000 (22:40 +0000)]
Columns now start at 1, as lines already did
Also corrected a couple of line 0's to line 1

14 years agoRemove configure tests on tarballs that no longer exist
Ian Lynagh [Fri, 27 Nov 2009 15:01:01 +0000 (15:01 +0000)]
Remove configure tests on tarballs that no longer exist

14 years agoImplement non-decreasing do indentation in the alternative layout rule
Ian Lynagh [Fri, 27 Nov 2009 01:19:32 +0000 (01:19 +0000)]
Implement non-decreasing do indentation in the alternative layout rule

14 years agoadd docs for Unicode entities in #2978
Simon Marlow [Wed, 25 Nov 2009 15:36:49 +0000 (15:36 +0000)]
add docs for Unicode entities in #2978

14 years agoApply patch from #2978: add more Unicode syntax
Simon Marlow [Fri, 18 Sep 2009 13:03:33 +0000 (13:03 +0000)]
Apply patch from #2978: add more Unicode syntax

14 years agoUse UTF-8 explicitly for InstalledPackageInfo
Simon Marlow [Wed, 25 Nov 2009 14:17:30 +0000 (14:17 +0000)]
Use UTF-8 explicitly for InstalledPackageInfo
So ghc-pkg register/update takes input in UTF-8, and ghc-pkg dump
outputs in UTF-8.  Textual package config files in the package DB are
assumed to be in UTF-8.

14 years agoComments only, esp about RecStmts
simonpj@microsoft.com [Thu, 26 Nov 2009 16:32:41 +0000 (16:32 +0000)]
Comments only, esp about RecStmts

14 years agoFix a bug in alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 23:19:01 +0000 (23:19 +0000)]
Fix a bug in alternative layout rule

14 years agoFix a bug in alternative layout
Ian Lynagh [Wed, 25 Nov 2009 23:06:16 +0000 (23:06 +0000)]
Fix a bug in alternative layout
And make the code simpler in the process!

14 years agoBug fix for alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 20:58:09 +0000 (20:58 +0000)]
Bug fix for alternative layout rule

14 years agoTweak alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 19:38:54 +0000 (19:38 +0000)]
Tweak alternative layout rule

14 years agoAdd unboxed parentheses to the alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 18:24:21 +0000 (18:24 +0000)]
Add unboxed parentheses to the alternative layout rule

14 years agoTweak the warning suppression flags used in Lexer
Ian Lynagh [Wed, 25 Nov 2009 17:18:15 +0000 (17:18 +0000)]
Tweak the warning suppression flags used in Lexer

14 years agoImplement the alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 17:16:56 +0000 (17:16 +0000)]
Implement the alternative layout rule
Caution: Largely untested

14 years agoFix some warning in Lexer
Ian Lynagh [Tue, 24 Nov 2009 23:37:26 +0000 (23:37 +0000)]
Fix some warning in Lexer

14 years agothreadStackOverflow: check whether stack squeezing released some stack (#3677)
Simon Marlow [Wed, 25 Nov 2009 12:59:17 +0000 (12:59 +0000)]
threadStackOverflow: check whether stack squeezing released some stack (#3677)

In a stack overflow situation, stack squeezing may reduce the stack
size, but we don't know whether it has been reduced enough for the
stack check to succeed if we try again.  Fortunately stack squeezing
is idempotent, so all we need to do is record whether *any* squeezing
happened.  If we are at the stack's absolute -K limit, and stack
squeezing happened, then we try running the thread again.

We also want to avoid enlarging the stack if squeezing has already
released some of it.  However, we don't want to get into a
pathalogical situation where a thread has a nearly full stack (near
its current limit, but not near the absolute -K limit), keeps
allocating a little bit, squeezing removes a little bit, and then it
runs again.  So to avoid this, if we squeezed *and* there is still
less than BLOCK_SIZE_W words free, then we enlarge the stack anyway.

14 years agoadd a comment to TSO_MARKED
Simon Marlow [Wed, 25 Nov 2009 10:49:54 +0000 (10:49 +0000)]
add a comment to TSO_MARKED

14 years agoPass --no-user-package-conf to ghc-pkg in bindisttest
Roman Leshchinskiy [Wed, 25 Nov 2009 11:59:53 +0000 (11:59 +0000)]
Pass --no-user-package-conf to ghc-pkg in bindisttest

14 years agoAdd a note saying what Haddock relies on about Instance.is_dfun
David Waern [Tue, 24 Nov 2009 21:03:08 +0000 (21:03 +0000)]
Add a note saying what Haddock relies on about Instance.is_dfun

14 years agoTreat () as an enumeration tycon
Ian Lynagh [Tue, 24 Nov 2009 01:13:13 +0000 (01:13 +0000)]
Treat () as an enumeration tycon
This fixes deriving Ord (), which previously failed with
  ghc-stage1: panic! (the 'impossible' happened)
    (GHC version 6.13.20091123 for x86_64-unknown-linux):
          TcGenDeriv:mk_FunBind

14 years agoWhitespace only
Ian Lynagh [Tue, 24 Nov 2009 00:32:21 +0000 (00:32 +0000)]
Whitespace only

14 years agoinline has moved to GHC.Magic
Ian Lynagh [Mon, 23 Nov 2009 20:03:08 +0000 (20:03 +0000)]
inline has moved to GHC.Magic

14 years agoUse the ghc-perl tarball on Windows, instead of the msys one
Ian Lynagh [Fri, 20 Nov 2009 15:39:53 +0000 (15:39 +0000)]
Use the ghc-perl tarball on Windows, instead of the msys one

14 years agoInstall perl on Windows
Ian Lynagh [Fri, 20 Nov 2009 22:38:30 +0000 (22:38 +0000)]
Install perl on Windows

14 years agoRemove cprAnalysis directory from hs-source-dirs
simonpj@microsoft.com [Fri, 20 Nov 2009 16:19:11 +0000 (16:19 +0000)]
Remove cprAnalysis directory from hs-source-dirs

14 years agoRemove -fasm from mk/validate-settings.mk
Ian Lynagh [Fri, 20 Nov 2009 12:56:56 +0000 (12:56 +0000)]
Remove -fasm from mk/validate-settings.mk
Makes it easier to do unregisterised validate runs

14 years agoFix some dependencies in bindists
Ian Lynagh [Fri, 20 Nov 2009 12:53:42 +0000 (12:53 +0000)]
Fix some dependencies in bindists
We can't depend on sources in a bindist, because we don't have the sources.

14 years agoAdd a rule to allow us to sdist libraries easily
Ian Lynagh [Thu, 19 Nov 2009 16:05:27 +0000 (16:05 +0000)]
Add a rule to allow us to sdist libraries easily

14 years agoCheck upper/lower bounds on various RTS flags (#3633)
Simon Marlow [Thu, 19 Nov 2009 14:24:22 +0000 (14:24 +0000)]
Check upper/lower bounds on various RTS flags (#3633)

Also, make K mean 1024 rather than 1000, in RTS flags (similarly for M
and G).  The main reason I want to change it is that otherwise this
might be confusing:

exp3_8: error in RTS option -H4k: size outside allowed range (4096 - 18446744073709551615)

And I think the original reason for using 1000 instead of 1024,
worries about direct-mapped caches, is not an issue in this context
(even if you can find a direct-mapped cache these days).

14 years agodefine HS_WORD_MAX
Simon Marlow [Thu, 19 Nov 2009 14:01:43 +0000 (14:01 +0000)]
define HS_WORD_MAX

14 years agoPrint the prog name in errorBelch() even if prog_argv is not set yet
Simon Marlow [Thu, 19 Nov 2009 13:52:30 +0000 (13:52 +0000)]
Print the prog name in errorBelch() even if prog_argv is not set yet
This means we get the prog name in error messages from the flag parser

14 years agoRemove dead code
Roman Leshchinskiy [Thu, 12 Nov 2009 07:04:55 +0000 (07:04 +0000)]
Remove dead code

14 years agoRemove the (very) old strictness analyser
simonpj@microsoft.com [Thu, 19 Nov 2009 15:43:47 +0000 (15:43 +0000)]
Remove the (very) old strictness analyser

I finally got tired of the #ifdef OLD_STRICTNESS stuff.  I had been
keeping it around in the hope of doing old-to-new comparisions, but
have failed to do so for many years, so I don't think it's going to
happen.  This patch deletes the clutter.

14 years agoMake INLINE warning more precise
simonpj@microsoft.com [Thu, 19 Nov 2009 13:27:11 +0000 (13:27 +0000)]
Make INLINE warning more precise

14 years agoImplement -fexpose-all-unfoldings, and fix a non-termination bug
simonpj@microsoft.com [Thu, 19 Nov 2009 12:57:11 +0000 (12:57 +0000)]
Implement -fexpose-all-unfoldings, and fix a non-termination bug

The -fexpose-all-unfoldings flag arranges to put unfoldings for *everything*
in the interface file.  Of course,  this makes the file a lot bigger, but
it also makes it complete, and that's great for supercompilation; or indeed
any whole-program work.

Consequences:
  * Interface files need to record loop-breaker-hood.  (Previously,
    loop breakers were never exposed, so that info wasn't necessary.)
    Hence a small interface file format change.

  * When inlining, must check loop-breaker-hood. (Previously, loop
    breakers didn't have an unfolding at all, so no need to check.)

  * Ditto in exprIsConApp_maybe.  Roman actually tripped this bug,
    because a DFun, which had an unfolding, was also a loop breaker

  * TidyPgm.tidyIdInfo must be careful to preserve loop-breaker-hood

So Id.idUnfolding checks for loop-breaker-hood and returns NoUnfolding
if so. When you want the unfolding regardless of loop-breaker-hood,
use Id.realIdUnfolding.

I have not documented the flag yet, because it's experimental.  Nor
have I tested it thoroughly.  But with the flag off (the normal case)
everything should work.

14 years agoRe-implement the binder-swap stuff in OccurAnal
simonpj@microsoft.com [Thu, 19 Nov 2009 12:45:24 +0000 (12:45 +0000)]
Re-implement the binder-swap stuff in OccurAnal

This is a pretty big patch, but it has a very local effect.
It affects only the binder-swap mechanism in OccurAnal, which
was not working well becuase it's more subtle than I'd realised
(See Note [getProxies is subtle]).  I think this does a much
better job.

14 years agoTry harder not to make DFuns into loop breakers
simonpj@microsoft.com [Thu, 19 Nov 2009 12:41:27 +0000 (12:41 +0000)]
Try harder not to make DFuns into loop breakers

See Note [DFuns should not be loop breakers]

14 years agoExtend the GHCi FAQ slightly
simonpj@microsoft.com [Tue, 17 Nov 2009 13:23:08 +0000 (13:23 +0000)]
Extend the GHCi FAQ slightly

14 years agoAdd gnutar to the list of names we use when looking for GNU tar
Ian Lynagh [Thu, 19 Nov 2009 14:49:27 +0000 (14:49 +0000)]
Add gnutar to the list of names we use when looking for GNU tar

14 years agoAdd support for the man page to the new build system
Ian Lynagh [Thu, 19 Nov 2009 14:08:11 +0000 (14:08 +0000)]
Add support for the man page to the new build system