1. 16 Apr, 2018 1 commit
  2. 13 Apr, 2018 18 commits
    • Ben Gamari's avatar
    • Sylvain Henry's avatar
      Enhanced constant folding · fea04def
      Sylvain Henry authored
      Until now GHC only supported basic constant folding (lit op lit, expr op
      0, etc.).
      This patch uses laws of +/-/* (associativity, commutativity,
      distributivity) to support some constant folding into nested
      Examples of new transformations:
         - simple nesting: (10 + x) + 10 becomes 20 + x
         - deep nesting: 5 + x + (y + (z + (t + 5))) becomes 10 + (x + (y + (z + t)))
         - distribution: (5 + x) * 6 becomes 30 + 6*x
         - simple factorization: 5 + x + (x + (x + (x + 5))) becomes 10 + (4 *x)
         - siblings: (5 + 4*x) - (3*x + 2) becomes 3 + x
      Test Plan: validate
      Reviewers: simonpj, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      GHC Trac Issues: #9136
      Differential Revision: https://phabricator.haskell.org/D2858
    • Ben Gamari's avatar
      Configure option to disable dtrace · 4b831c27
      Ben Gamari authored
      Reviewers: hvr, bgamari
      Subscribers: lelf, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4575
    • Andreas Klebinger's avatar
      Omit ways depending on rts flags for #12870 related tests. · 9e89092d
      Andreas Klebinger authored
      Some of these tests instruct the RTS to ignore all RTS flags being
      passed.  While this is intended it causes test failures for some ways
      like profiling which depend on passing RTS flags. So we skip these ways.
      Test Plan: testsuite/tests/rts/flags$ make slow
      Reviewers: bgamari, simonmar, alpmestan
      Reviewed By: alpmestan
      Subscribers: alpmestan, thomie, carter
      GHC Trac Issues: #12870
      Differential Revision: https://phabricator.haskell.org/D4585
    • Andreas Klebinger's avatar
      Make shortcutting at the asm stage toggleable and default for O2. · 3c7f9e74
      Andreas Klebinger authored
      Shortcutting during the asm stage of codegen is often redundant as most
      cases get caught during the Cmm passes.  For example during compilation
      of all of nofib only 508 jumps are eleminated.
      For this reason I moved the pass from -O1 to -O2. I also made it
      toggleable with -fasm-shortcutting.
      Test Plan: ci
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4555
    • Ben Gamari's avatar
      Declare `catchRetry#` lazy in its first argument · 00b8ecb7
      Ben Gamari authored
      As per the results on item 1 in T14998, declaring `catchRetry#` lazy in
      its first argument opens the possibility to remove `ExnStr` complexity
      from strictness demands at virtually no regressions in NoFib.
      This brings `catchRetry#` in line with other primops from the `catch*`
      Reviewers: bgamari, simonpj, nomeata
      Reviewed By: bgamari
      Subscribers: thomie, carter
      GHC Trac Issues: #14998, #11222
      Differential Revision: https://phabricator.haskell.org/D4573
    • Ryan Scott's avatar
      Correct FixIOException's @since annotation retroactively · ce27c7d5
      Ryan Scott authored
      In D4113, a `FixIOException` data type was added with a
      `@since TODO` annotation, but it seems that `TODO` made it out into
      `base-4.11` itself. I've (retroactively) fixed this and added an
      entry to the `base-4.11` entry in the `changelog`.
      Test Plan: Read it
      Reviewers: dfeuer, hvr, bgamari
      Reviewed By: dfeuer
      Subscribers: thomie, carter
      GHC Trac Issues: #14356, #15025
      Differential Revision: https://phabricator.haskell.org/D4578
    • Ben Gamari's avatar
      Revert "Fix processHeapClosureForDead CONSTR_NOCAF case:" · 9430901d
      Ben Gamari authored
      This reverts commit a303584e.
    • U-Maokai\andi's avatar
      Use newtype deriving for Hoopl code · 6a78a40b
      U-Maokai\andi authored
      Hoopl.Collections/.Label has newtype containers which derive
      Enabling GeneralizedNewtypeDeriving improves allocation count and
      compile time when building these files for GHC.
      Vanilla, O1
      <<ghc: 378555664 bytes, 76 GCs, 8663140/18535016 avg/max bytes
      residency (5 samples), 63M in use, 0.000 INIT (0.000 elapsed), 0.219
      MUT (0.354 elapsed), 0.141 GC (0.138 elapsed) :ghc>>
      GeneralizedNewtypeDeriving , O1
      <<ghc: 301026536 bytes, 78 GCs, 8392886/17181088 avg/max bytes
      residency (5 samples), 63M in use, 0.000 INIT (0.000 elapsed), 0.156
      MUT (0.230 elapsed), 0.094 GC (0.106 elapsed) :ghc>>
      Test Plan: ci
      Reviewers: bgamari, simonmar, RyanGlScott
      Reviewed By: RyanGlScott
      Subscribers: mpickering, RyanGlScott, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4583
    • Ryan Scott's avatar
      Fix #9438 by converting a panic to an error message · 7613a812
      Ryan Scott authored
      Previously, GHC was quite eager to panic whenever it was fed
      an archive file when `DYNAMIC_GHC_PROGRAMS=YES`. This ought to be an
      explicit error message instead, so this patch accomplishes just that.
      Test Plan: make test TEST=T14708
      Reviewers: Phyx, hvr, bgamari
      Reviewed By: Phyx
      Subscribers: thomie, carter
      GHC Trac Issues: #9438, #14708, #15032
      Differential Revision: https://phabricator.haskell.org/D4589
    • Matthew Pickering's avatar
      Remove unused function: mkFunCos · 6f623030
      Matthew Pickering authored
      Reviewers: goldfire, bgamari, dfeuer
      Reviewed By: dfeuer
      Subscribers: dfeuer, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4587
    • Andrey Mokhov's avatar
      Fix rts.cabal.in · f78df87c
      Andrey Mokhov authored
      On Windows the FFI library is called `libCffi-6` instead of `libCffi`.
      This needs to be reflected in `rts.cabal.in` as otherwise we cannot
      properly `copy` and `register` the RTS package on Windows.
      See https://github.com/snowleopard/hadrian/issues/567
      Test Plan: Build GHC using Hadrian. Make build system does not use
      Reviewers: bgamari, erikd, simonmar, Phyx
      Reviewed By: Phyx
      Subscribers: thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4590
    • Andreas Klebinger's avatar
      Update JMP_TBL targets during shortcutting in X86 NCG. · 120a2617
      Andreas Klebinger authored
      Without updating the JMP_TBL information the block list in
      JMP_TBL contained blocks which were eliminated in some circumstances.
      The actual assembly generation doesn't look at these fields so this
      didn't cause any bugs yet. However as long as we carry this information
      around we should make an effort to keep it correct.
      Especially since it's useful for debugging purposes and can be used
      for passes near the end of the codegen pipeline.
      In particular it's used by jumpDestsOfInstr which without these changes
      returns the wrong destinations.
      Test Plan: ci
      Reviewers: bgamari
      Subscribers: thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4566
    • Ömer Sinan Ağacan's avatar
      Fix processHeapClosureForDead CONSTR_NOCAF case: · a303584e
      Ömer Sinan Ağacan authored
      CONSTR_NOCAF was introduced with 55d535da as a replacement for
      CONSTR_STATIC and CONSTR_NOCAF_STATIC, however, as explained in Note
      [static constructors], we copy CONSTR_NOCAFs (which can also be seen in
      evacuate) during GC, and they can become dead, like other CONSTR_X_Ys.
      processHeapClosureForDead is updated to reflect this.
      Reviewers: bgamari, simonmar, erikd
      Subscribers: thomie, carter
      GHC Trac Issues: #7836
      Differential Revision: https://phabricator.haskell.org/D4567
    • Michal Terepeta's avatar
      Revert "CmmPipeline: add a second pass of CmmCommonBlockElim" · 78ff6e54
      Michal Terepeta authored
      This reverts commit d5c4d46a.
      Please see #14989 for details.
      Test Plan: ./validate
      Reviewers: bgamari, simonmar
      Subscribers: thomie, carter
      GHC Trac Issues: #14989
      Differential Revision: https://phabricator.haskell.org/D4577
    • Takenobu Tani's avatar
      users-guide: Update release notes and language extensions · f02309fe
      Takenobu Tani authored
      Update release notes and language extensions for GHC 8.6.1.
      * Add `BlockArguments` and `NumericUndescores` in release note
      * Fix directive for `HexFloatLiterals` and `NumericUndescores`
      Test Plan: build
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4579
    • Ryan Scott's avatar
      Bump version numbers: base-, integer-gmp- · c4814ab6
      Ryan Scott authored
      This takes care of bumping the `base` and `integer-gmp`
      minor version numbers in anticipation of a GHC 8.4.2 release.
      While I was in town, I also filled in a `@since TODO` Haddock
      annotation for `powModSecInteger` in `integer-gmp` with
      ``, and updated the changelog accordingly.
      Test Plan: ./validate
      Reviewers: hvr, goldfire, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, carter
      GHC Trac Issues: #15025
      Differential Revision: https://phabricator.haskell.org/D4586
    • Alan Zimmerman's avatar
      TTG for HsBinds and Data instances Plan B · b1386942
      Alan Zimmerman authored
      - Add the balance of the TTG extensions for hsSyn/HsBinds
      - Move all the (now orphan) data instances into hsSyn/HsInstances and
      use TTG Data instances Plan B
      Updates haddock submodule.
      Illustrative numbers
      Compiling HsInstances before using Plan B.
      Max residency ~ 5G
      <<ghc: 629,864,691,176 bytes, 5300 GCs,
             321075437/1087762592 avg/max bytes residency (23 samples),
             2953M in use, 0.000 INIT (0.000 elapsed),
             383.511 MUT (384.986 elapsed), 37.426 GC (37.444 elapsed) :ghc>>
      Using Plan B
      Max residency 1.1G
      <<ghc: 78,832,782,968 bytes, 2884 GCs,
             222140352/386470152 avg/max bytes residency (34 samples),
             1062M in use, 0.001 INIT (0.001 elapsed),
             56.612 MUT (62.917 elapsed), 32.974 GC (32.923 elapsed) :ghc>>
      Test Plan: ./validate
      Reviewers: shayan-najd, goldfire, bgamari
      Subscribers: goldfire, thomie, mpickering, carter
      Differential Revision: https://phabricator.haskell.org/D4581
  3. 12 Apr, 2018 3 commits
  4. 11 Apr, 2018 4 commits
  5. 10 Apr, 2018 12 commits
  6. 09 Apr, 2018 2 commits