1. 03 Mar, 2017 20 commits
    • rwbarton's avatar
      Deserialize IfaceId more lazily · 64462544
      rwbarton authored
      This change sped up the total validate --build-only time by 0.8%
      on my test system; hopefully a representative result.
      
      I didn't bother making the other constructors lazy because for
      IfaceData and IfaceClass we need to pull on some of the fields
      in loadDecl, and all the others seem much more rare than IfaceId.
      
      Test Plan: validate, perf
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3269
      64462544
    • Ben Gamari's avatar
      testsuite: Add test for floating-point abs (numrun015) · 10d28d0a
      Ben Gamari authored
      Test Plan: Validate
      
      Reviewers: idontgetoutmuch, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3273
      10d28d0a
    • Ben Gamari's avatar
      Produce KindReps for common kinds in GHC.Types · c1dacb8a
      Ben Gamari authored
      Unfortunately this comes with a fair bit of implementation cost. Perhaps
      some refactoring would help, but in the interest of getting 8.2 out the
      door I'm pushing as-is.
      
      While this doesn't have nearly the effect on compiler allocations
      that D3166 has, it's still nothing to sneeze at. nofib shows,
      ```
      ------------------------------------------------------------------------
              Program               master           D3166            D3219
      ------------------------------------------------------------------------
              -1 s.d.                -----          -3.555%          -4.081%
              +1 s.d.                -----          +1.937%          +1.593%
              Average                -----          -0.847%          -1.285%
      ```
      
      Test Plan: Validate
      
      Reviewers: austin
      
      Subscribers: thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D3219
      c1dacb8a
    • Ben Gamari's avatar
      TcTypeable: Try to reuse KindReps · a694cee7
      Ben Gamari authored
      Here we rework the TcTypeable implementation to reuse KindRep bindings
      when possible. This is an attempt at minimizing the impact of Typeable
      binding generation by reducing the number of bindings that we produce.
      
      It turns out that this produces some pretty reasonable compiler
      allocations improvements. It seems to erase most of the increases
      initially introduced by TTypeable in the testsuite. Moreover, nofib
      shows,
      ```
              -1 s.d.                -----          -3.555%
              +1 s.d.                -----          +1.937%
              Average                -----          -0.847%
      ```
      
      Here are a few of the high-scorers (ignore last column, which is for
      D3219),
      ```
      veritas
                Types             88800920         -18.945%         -21.480%
      
      veritas
              Tactics            540766744         -27.256%         -27.338%
      
      sched
                 Main            567013384          -4.947%          -5.358%
      
      listcompr
                 Main            532300000          -4.273%          -4.572%
      
      listcopy
                 Main            537785392          -4.382%          -4.635%
      
      anna
             BaseDefs           1984225032         -10.639%         -10.832%
      
      ```
      as expected, these tend to be modules with either very many or very
      large types.
      
      Test Plan: Validate
      
      Reviewers: austin, dfeuer
      
      Subscribers: simonmar, dfeuer, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3166
      a694cee7
    • Ben Gamari's avatar
    • Ben Gamari's avatar
      testsuite: Bump down allocations for T12707 · 9808ebc8
      Ben Gamari authored
      9808ebc8
    • rwbarton's avatar
      Update test completesig04 · 61e760b0
      rwbarton authored
      It relied on an orphan COMPLETE pragma, so was broken by commit fce3d37c.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3266
      61e760b0
    • Ben Gamari's avatar
      Revert "Read COMPLETE sets from external packages" · c02896ab
      Ben Gamari authored
      This reverts commit 0d2f7330.
      c02896ab
    • Ben Gamari's avatar
      testsuite: Fix output due to recent COMPLETE changes · ca538b84
      Ben Gamari authored
      It's unclear why this didn't show up in my initial local validation. Oh
      well.
      ca538b84
    • Ryan Scott's avatar
      Read COMPLETE sets from external packages · 0d2f7330
      Ryan Scott authored
      Currently, `COMPLETE` pragmas are not read from external packages at
      all, which quite limits their usefulness. This extends
      `ExternalPackageState` to include `COMPLETE` sets from other packages,
      and plumbs around the appropriate values to make it work the way you'd
      expect it to.
      
      Fixes #13350.
      
      Test Plan: make test TEST=T13350
      
      Reviewers: rwbarton, mpickering, austin, simonpj, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3257
      0d2f7330
    • Ben Gamari's avatar
      Show: Add ShowS for ", " · 615ded12
      Ben Gamari authored
      This is produced often enough in derived Show instances that it is likely
      worthwhile defining it once.
      615ded12
    • rwbarton's avatar
      testsuite: Move echoing commands in make invocations to VERBOSE=5 · 6421c6f2
      rwbarton authored
      D2894 added a new verbosity level VERBOSE=4 to strip -s/--silent
      flags from make invocations in test commands. This will probably
      cause the test to fail of course, but is useful for seeing what
      a test that's already failing is doing.
      
      However there was already an undocumented meaning of VERBOSE=4,
      added in commit cfeededf, that causes the results of performance
      tests to be printed unconditionally (even when they are within the
      expected range). nomeata's ghc builder uses these figures to
      collect historical data on performance test figures. The new
      meaning of VERBOSE=4 added in D2894 means that any test that uses
      make now fails on the builder.
      
      This commit moves the new behavior of D2894 to the level VERBOSE=5
      so that nomeata's ghc builder again produces useful results on
      failing tests. It also adds documentation for both settings.
      
      Test Plan: did some manual testing
      
      Reviewers: austin, bgamari, Phyx, nomeata
      
      Reviewed By: bgamari, Phyx
      
      Subscribers: nomeata, thomie, Phyx
      
      Differential Revision: https://phabricator.haskell.org/D3141
      6421c6f2
    • ruperthorlick's avatar
      Changed parser message for RankNTypes (#12811) · 488a9daa
      ruperthorlick authored
      Added a check for whether RankNTypes is enabled
      and changed error message accordingly
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D3262
      488a9daa
    • ruperthorlick's avatar
      Add suggestion for PatternSynonyms parse error (fixes #12429) · 4b1f0721
      ruperthorlick authored
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3261
      4b1f0721
    • rwbarton's avatar
      Don't float out expressions that are okay for speculation · 27bf6b68
      rwbarton authored
      It turned out not to be worth the overhead according to nofib
      (+11.62% on fannkuch-redux, +4.3% on k-nucleotide, and some other
      smaller losses, with no significant gains).
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3250
      27bf6b68
    • David Feuer's avatar
      Fix up test results. · e12ebf88
      David Feuer authored
      Set up test results and Makefile as SPJ intended (I believe).
      Previous changes accidentally did something a bit different.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3248
      e12ebf88
    • rwbarton's avatar
      Don't allow orphan COMPLETE pragmas (#13349) · fce3d37c
      rwbarton authored
      We might support them properly in the future, but for now it's simpler
      to disallow them.
      
      Test Plan: validate
      
      Reviewers: mpickering, austin, bgamari, simonpj
      
      Reviewed By: mpickering, simonpj
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3243
      fce3d37c
    • Edward Z. Yang's avatar
      Print out sub-libraries of packages more nicely. · 0b922909
      Edward Z. Yang authored
      
      
      Previously, we would print out the munged package name
      which looked like z-bkpcabal01-z-p-0.1.0.0.  Now
      it looks like: bkpcabal01-0.1.0.0:p.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, bgamari, austin
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3235
      0b922909
    • Simon Marlow's avatar
      Add -fwhole-archive-hs-libs · a6874e54
      Simon Marlow authored
      We're building a demo to show how to hot-swap Haskell code in a
      running process, and unfortunately it wasn't possible to convince GHC
      to generate the correct linker command line without this extra knob.
      
      Test Plan:
      Tested it on a hot-swapping demo (which is not released yet, but will
      be shortly)
      
      Reviewers: niteria, austin, erikd, JonCoens, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: Phyx, rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3136
      a6874e54
    • David Feuer's avatar
      Fix T12234 stat mistakes · 57d969ec
      David Feuer authored
      I goofed up updating the expected and recent historical results
      here. They should be right now.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3264
      57d969ec
  2. 02 Mar, 2017 18 commits
  3. 01 Mar, 2017 2 commits
    • David Feuer's avatar
      Upgrade UniqSet to a newtype · cbe569a5
      David Feuer authored
      The fundamental problem with `type UniqSet = UniqFM` is that `UniqSet`
      has a key invariant `UniqFM` does not. For example, `fmap` over
      `UniqSet` will generally produce nonsense.
      
      * Upgrade `UniqSet` from a type synonym to a newtype.
      
      * Remove unused and shady `extendVarSet_C` and `addOneToUniqSet_C`.
      
      * Use cached unique in `tyConsOfType` by replacing
        `unitNameEnv (tyConName tc) tc` with `unitUniqSet tc`.
      
      Reviewers: austin, hvr, goldfire, simonmar, niteria, bgamari
      
      Reviewed By: niteria
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3146
      cbe569a5
    • David Feuer's avatar
      Change catch# demand signature · 701256df
      David Feuer authored
      * Give `catch#` a lazy demand signature, to make it more honest.
      
      * Make `catchException` and `catchAny` force their arguments so they
      actually behave as advertised.
      
      * Use `catch` rather than `catchException` in `forkIO`, `forkOn`, and
      `forkOS` to avoid losing exceptions.
      
      Fixes #13330
      
      Reviewers: rwbarton, simonpj, simonmar, bgamari, hvr, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D3244
      701256df