1. 13 Jul, 2013 1 commit
  2. 10 Jul, 2013 3 commits
  3. 09 Jul, 2013 1 commit
  4. 07 Jul, 2013 1 commit
  5. 02 Jul, 2013 2 commits
    • ian@well-typed.com's avatar
      Fix build on Win64 · 98810fe8
      ian@well-typed.com authored
      gcc thought that fourthFloating could be used without being defined.
      In actual fact it couldn't, but I've refactored the code so that it
      can now see this.
      98810fe8
    • Simon Marlow's avatar
      Fix #7970, #2161, unfix #551 · 1ae72ac4
      Simon Marlow authored
      Establish the reachability of threads before weak pointers.  Hence a
      deadlocked thread can keep a weak pointer alive and prevent it from
      being finalized early.  However, an reference from the finalizer of a
      weak pointer will no longer prevent a thread from being considered
      deadlocked (#551).  To keep the thread alive in that situation you
      need to use a StablePtr.
      
      See comments on #7970 and in the code for more details.
      1ae72ac4
  6. 22 Jun, 2013 1 commit
  7. 21 Jun, 2013 4 commits
  8. 20 Jun, 2013 1 commit
  9. 19 Jun, 2013 8 commits
  10. 15 Jun, 2013 7 commits
  11. 14 Jun, 2013 1 commit
  12. 09 Jun, 2013 2 commits
  13. 08 Jun, 2013 1 commit
  14. 06 Jun, 2013 1 commit
    • Simon Peyton Jones's avatar
      Implement cardinality analysis · 99d4e5b4
      Simon Peyton Jones authored
      This major patch implements the cardinality analysis described
      in our paper "Higher order cardinality analysis". It is joint
      work with Ilya Sergey and Dimitrios Vytiniotis.
      
      The basic is augment the absence-analysis part of the demand
      analyser so that it can tell when something is used
      	 never
      	 at most once
       	 some other way
      
      The "at most once" information is used
          a) to enable transformations, and
             in particular to identify one-shot lambdas
          b) to allow updates on thunks to be omitted.
      
      There are two new flags, mainly there so you can do performance
      comparisons:
          -fkill-absence   stops GHC doing absence analysis at all
          -fkill-one-shot  stops GHC spotting one-shot lambdas
                           and single-entry thunks
      
      The big changes are:
      
      * The Demand type is substantially refactored.  In particular
        the UseDmd is factored as follows
            data UseDmd
              = UCall Count UseDmd
              | UProd [MaybeUsed]
              | UHead
              | Used
      
            data MaybeUsed = Abs | Use Count UseDmd
      
            data Count = One | Many
      
        Notice that UCall recurses straight to UseDmd, whereas
        UProd goes via MaybeUsed.
      
        The "Count" embodies the "at most once" or "many" idea.
      
      * The demand analyser itself was refactored a lot
      
      * The previously ad-hoc stuff in the occurrence analyser for foldr and
        build goes away entirely.  Before if we had build (\cn -> ...x... )
        then the "\cn" was hackily made one-shot (by spotting 'build' as
        special.  That's essential to allow x to be inlined.  Now the
        occurrence analyser propagates info gotten from 'build's stricness
        signature (so build isn't special); and that strictness sig is
        in turn derived entirely automatically.  Much nicer!
      
      * The ticky stuff is improved to count single-entry thunks separately.
      
      One shortcoming is that there is no DEBUG way to spot if an
      allegedly-single-entry thunk is acually entered more than once.  It
      would not be hard to generate a bit of code to check for this, and it
      would be reassuring.  But it's fiddly and I have not done it.
      
      Despite all this fuss, the performance numbers are rather under-whelming.
      See the paper for more discussion.
      
             nucleic2          -0.8%    -10.9%      0.10      0.10     +0.0%
               sphere          -0.7%     -1.5%      0.08      0.08     +0.0%
      --------------------------------------------------------------------------------
                  Min          -4.7%    -10.9%     -9.3%     -9.3%    -50.0%
                  Max          -0.4%     +0.5%     +2.2%     +2.3%     +7.4%
       Geometric Mean          -0.8%     -0.2%     -1.3%     -1.3%     -1.8%
      
      I don't quite know how much credence to place in the runtime changes,
      but movement seems generally in the right direction.
      99d4e5b4
  15. 24 May, 2013 1 commit
  16. 21 May, 2013 1 commit
  17. 19 May, 2013 2 commits
  18. 17 May, 2013 1 commit
  19. 13 May, 2013 1 commit