1. 16 Dec, 2009 2 commits
  2. 04 Dec, 2009 1 commit
    • Sergei Trofimovich's avatar
      configure.ac: fix libm checks (Trac #3730) · f2bfd338
      Sergei Trofimovich authored
      libbfd pulled libm as dependency and broke LIBM= detection.
      Patch moves libm in library tests as early as possible.
      Thanks to asuffield for suggesting such a simple fix.
      Thanks to Roie Kerstein and Renato Gallo for finding
      and tracking down the issue.
  3. 16 Dec, 2009 1 commit
  4. 23 Nov, 2009 1 commit
  5. 16 Dec, 2009 7 commits
  6. 15 Dec, 2009 6 commits
  7. 14 Dec, 2009 1 commit
    • simonpj@microsoft.com's avatar
      Tidy up computation of result discounts in CoreUnfold · aff23274
      simonpj@microsoft.com authored
      Mostly this patch is a tidy-up, but it did reveal one inconsistency
      that I fixed.  When computing result discounts for case expressions,
      we were *adding* result-discounts for cases on non-arguments, but
      *picking the one for the max-size branch* for arguments. I think you
      could argue the toss, but it seems neater (and the code is nicer)
      to be consistent (ie always add).  See Note [addAltSize result discounts].
      The nofib results seem fine
              Program           Size    Allocs   Runtime   Elapsed
                boyer          -0.8%     -4.8%      0.06      0.07
               sphere          -0.7%     -2.5%      0.15      0.16
                  Min          -0.8%     -4.8%    -19.1%    -24.8%
                  Max          -0.5%     +0.0%     +3.4%   +127.1%
       Geometric Mean          -0.7%     -0.1%     -4.3%     -1.3%
      The +127% elapsed is a timing error; I re-ran the same binary and it's
      unchanged from the baseline.
  8. 11 Dec, 2009 3 commits
    • simonpj@microsoft.com's avatar
      Use full equality for CSE · 21eeb926
      simonpj@microsoft.com authored
      In CSE we were getting lots of apprarently-unequal expressions with
      the same hash code.  In fact they were perfectly equal -- but we were
      using a cheap-and-cheerful equality tests for CoreExpr that said False
      for any lambda expression!
      This patch adds a proper equality test for Core, with alpha-renaming.
      It's easy to do, and will avoid silly cases of CSE failing to fire.
      We should get less of this:
        WARNING: file compiler/simplCore/CSE.lhs line 326
        extendCSEnv: long list, length 18
      from a compiler built with -DDEBUG
    • simonpj@microsoft.com's avatar
      Improve strictness analysis for bottoming functions · a33b1cd8
      simonpj@microsoft.com authored
      I found the following results from strictness analyis:
        f x = error (fst x)      -- Strictness U(SA)b
        g x = error ('y':fst x)  -- Strictness Tb
      Surely 'g' is no less strict on 'x' than 'f' is!  The fix turned out
      be to very nice and simple.  See Note [Bottom demands] in DmdAnal.
    • simonpj@microsoft.com's avatar
      Bottom extraction: float out bottoming expressions to top level · b84ba676
      simonpj@microsoft.com authored
      The idea is to float out bottoming expressions to top level,
      abstracting them over any variables they mention, if necessary.  This
      is good because it makes functions smaller (and more likely to
      inline), by keeping error code out of line. 
      See Note [Bottoming floats] in SetLevels.
      On the way, this fixes the HPC failures for cg059 and friends.
      I've been meaning to do this for some time.  See Maessen's paper 1999
      "Bottom extraction: factoring error handling out of functional
      programs" (unpublished I think).
      Here are the nofib results:
              Program           Size    Allocs   Runtime   Elapsed
                  Min          +0.1%     -7.8%    -14.4%    -32.5%
                  Max          +0.5%     +0.2%     +1.6%    +13.8%
       Geometric Mean          +0.4%     -0.2%     -4.9%     -6.7%
      Module sizes
              -1 s.d.                -----           -2.6%
              +1 s.d.                -----           +2.3%
              Average                -----           -0.2%
      Compile times:
              -1 s.d.                -----          -11.4%
              +1 s.d.                -----           +4.3%
              Average                -----           -3.8%
      I'm think program sizes have crept up because the base library
      is bigger -- module sizes in nofib decrease very slightly.  In turn
      I think that may be because the floating generates a call where
      there was no call before.  Anyway I think it's acceptable.
      The main changes are:
      * SetLevels floats out things that exprBotStrictness_maybe 
        identifies as bottom.  Make sure to pin on the right 
        strictness info to the newly created Ids, so that the
        info ends up in interface files.
        Since FloatOut is run twice, we have to be careful that we
        don't treat the function created by the first float-out as
        a candidate for the second; this is what worthFloating does.
        See SetLevels Note [Bottoming floats]
                      Note [Bottoming floats: eta expansion]
      * Be careful not to inline top-level bottoming functions; this 
        would just undo what the floating transformation achieves.
        See CoreUnfold Note [Do not inline top-level bottoming functions
        Ensuring this requires a bit of extra plumbing, but nothing drastic..
      * Similarly pre/postInlineUnconditionally should be 
        careful not to re-inline top-level bottoming things!
        See SimplUtils Note [Top-level botomming Ids]
                       Note [Top level and postInlineUnconditionally]
  9. 12 Dec, 2009 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Expose all EventLog events as DTrace probes · 015d3d46
      chak@cse.unsw.edu.au. authored
      - Defines a DTrace provider, called 'HaskellEvent', that provides a probe
        for every event of the eventlog framework.
      - In contrast to the original eventlog, the DTrace probes are available in
        all flavours of the runtime system (DTrace probes have virtually no
        overhead if not enabled); when -DTRACING is defined both the regular
        event log as well as DTrace probes can be used.
      - Currently, Mac OS X only.  User-space DTrace probes are implemented
        differently on Mac OS X than in the original DTrace implementation.
        Nevertheless, it shouldn't be too hard to enable these probes on other
        platforms, too.
      - Documentation is at http://hackage.haskell.org/trac/ghc/wiki/DTrace
  10. 11 Dec, 2009 2 commits
    • simonpj@microsoft.com's avatar
      Fix two related bugs in u_tys · dcba7784
      simonpj@microsoft.com authored
      When we normalise a type family application we must recursively call
      uTys, *not* 'go', because the latter loop is only there to look
      through type synonyms.  This bug made the type checker generate
      ill-typed coercions, which were rejected by Core Lint.
      A related bug only affects the size of coercions.  If faced with
        (m a) ~ (F b c)
      where F has arity 1, we want to decompose to 
         m ~ F Int,  a ~ c
      rather than deferring.  The application decomposition was being
      tried last, so we were missing this opportunity.
      Thanks to Roman for an example that showed all this up.
    • simonpj@microsoft.com's avatar
      Fix spelling in comment · ab222dbd
      simonpj@microsoft.com authored
  11. 08 Dec, 2009 2 commits
  12. 10 Dec, 2009 2 commits
  13. 09 Dec, 2009 6 commits
  14. 08 Dec, 2009 5 commits