1. 22 Nov, 2018 17 commits
  2. 21 Nov, 2018 1 commit
    • Ömer Sinan Ağacan's avatar
      Fix heap corruption during stable name allocation · 691aa715
      Ömer Sinan Ağacan authored
      See #15906 for the problem. To fix we simply call `allocate()` instead of
      `ALLOC_PRIM()`. `allocate()` does not trigger GC when the nursery is full,
      instead it extends it.
      
      Test Plan:
      This validates. memo001 now passes with `-debug` compile parameter. I'll add
      another test that runs memo001 with `-debug` once I figure out how to use
      stdout files for multiple tests.
      
      Reviewers: simonmar, bgamari, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15906
      
      Differential Revision: https://phabricator.haskell.org/D5342
      691aa715
  3. 20 Nov, 2018 1 commit
  4. 19 Nov, 2018 4 commits
    • Sebastian Graf's avatar
      Don't track free variables in STG syntax by default · 47bbc709
      Sebastian Graf authored
      Summary:
      Currently, `CoreToStg` annotates `StgRhsClosure`s with their set of non-global
      free variables.  This free variable information is only needed in the final
      code generation step (i.e. `StgCmm.codeGen`), which leads to transformations
      such as `StgCse` and `StgUnarise` having to maintain this information.
      
      This is tiresome and unnecessary, so this patch introduces a trees-to-grow-like
      approach that only introduces the free variable set into the syntax tree in the
      code gen pass, along with a free variable analysis on STG terms to generate
      that information.
      
      Fixes #15754.
      
      Reviewers: simonpj, osa1, bgamari, simonmar
      
      Reviewed By: osa1
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15754
      
      Differential Revision: https://phabricator.haskell.org/D5324
      47bbc709
    • Alp Mestanogullari's avatar
      hadrian: make it possible to run the testsuite with quickest and quick · cc615c69
      Alp Mestanogullari authored
      More generally, we so far assumed that the testsuite would be executed
      with a flavour that's as comprehensive as perf in terms of available RTS
      and library flavours (at least vanilla + dynamic + prof). This would
      manifest itself concretely by needing 3 "ways" of the iserv program,
      unconditionally.
      
      We now only require the ways among vanilla, dynamic and prof that we
      can find in our current Flavour's rtsWays.
      
      Test Plan:
      hadrian/build.sh --flavour={quick, quickest} test now goes through
      (with a few failing tests, of course).
      
      Reviewers: bgamari, tdammers
      
      Reviewed By: tdammers
      
      Subscribers: mpickering, RyanGlScott, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5355
      cc615c69
    • Matthew Pickering's avatar
      eventlog: Log the current stack size when stack overflows · 7e570676
      Matthew Pickering authored
      Reviewers: maoe, bgamari, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, carter, sjorn3
      
      Differential Revision: https://phabricator.haskell.org/D5287
      7e570676
    • Ömer Sinan Ağacan's avatar
      Tiny refactor in exitScheduler · 348ea161
      Ömer Sinan Ağacan authored
      348ea161
  5. 18 Nov, 2018 1 commit
    • Chris Done's avatar
      Fix typo in docs · ecfc7b46
      Chris Done authored
      I've been reading this line of docs for years and it ruffles my feathers.
      ecfc7b46
  6. 17 Nov, 2018 14 commits
    • Abhiroop Sarkar's avatar
      Introduce Int16# and Word16# · 36fcf9ed
      Abhiroop Sarkar authored
      This builds off of D4475.
      
      Bumps binary submodule.
      
      Reviewers: carter, AndreasK, hvr, goldfire, bgamari, simonmar
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D5006
      36fcf9ed
    • Chris Smith's avatar
      Fix trac #15702, as a followon to fix for #13704. · 0e7790ab
      Chris Smith authored
      Summary:
      The effect of this change is that -main-is changes the default
      export list for the main module, but does not apply the same
      change to non-main modules.  This fixes some cases where -main-is
      was used to wrap a module that expected that default behavior
      (exporting `main`, even when that wasn't the main entry point
      name).
      
      Reviewers: mpickering, monoidal, bgamari
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #13704, #15702
      
      Differential Revision: https://phabricator.haskell.org/D5322
      0e7790ab
    • Gabor Greif's avatar
      798c9437
    • Roland Senn's avatar
      Remove -Wamp flag (#11477) · 33f57258
      Roland Senn authored
      Summary:
      Add line
        "The deprecated ghc-flag -Wamp has been removed."
      to the release notes for 8.8.1
      
      Reviewers: bgamari, monoidal
      
      Reviewed By: monoidal
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #11477
      
      Differential Revision: https://phabricator.haskell.org/D5296
      33f57258
    • Sebastian Graf's avatar
      More compact Outputable instance for `Uniq(D)Set` · 17e771e1
      Sebastian Graf authored
      Summary:
      Until now, `UniqSet` and `UniqDSet` inherited their `Outputable`
      instances from `UniqFM` and `UniqDFM`.
      
      That made for verbose and redundant output. This patch rectifies
      that by pretty-printing these sets in common math notation.
      E.g., previously, we would render `UniqSet`s like this:
      
          [s2fE :-> x_s2fE, s2fF :-> y_s2fF, s2fG :-> z_s2fG, s2fH :-> g_s2fH]
      
      Now, they're are printed like this:
      
          {x_s2fE, y_s2fF, z_s2fG, g_s2fH}
      
      Reviewers: simonpj, bgamari, AndreasK, dfeuer, osa1
      
      Reviewed By: osa1
      
      Subscribers: osa1, rwbarton, carter
      
      GHC Trac Issues: #15879
      
      Differential Revision: https://phabricator.haskell.org/D5315
      17e771e1
    • Simon Jakobi's avatar
      Speed up MonadUtils.mapMaybeM · 5bf07866
      Simon Jakobi authored
      Summary: This version is nearly 2x faster according to a few small benchmarks.
      
      Reviewers: bgamari, monoidal
      
      Reviewed By: monoidal
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5344
      5bf07866
    • Roland Senn's avatar
      Fix #12906: GHC fails to typecheck Main module without main · 92f81841
      Roland Senn authored
      Summary: The function fail is no longer called immediately
      after adding the no-main error message to the TcM monad.
      The rest of the module will be typechecked.
      
      Test Plan: make test TEST=T12906
      
      Reviewers: dfeuer, RyanGlScott, ezyang, mpickering, bgamari
      
      Reviewed By: RyanGlScott
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #12906
      
      Differential Revision: https://phabricator.haskell.org/D5338
      92f81841
    • Roland Senn's avatar
      Fix #12525: Remove derived bindings from the TyThings from getBindings · 921fd890
      Roland Senn authored
      Summary:
      Remove derived OccNames from the list of TyThings returned by the function GHC.getBindings.
      Therefore the output of the `:show bindings `command will not contain names generated by GHC.
      
      Test Plan: make test TEST=T12525
      
      Reviewers: austin, hvr, alanz, angerman, thomie, bgamari, osa1
      
      Reviewed By: osa1
      
      Subscribers: simonpj, osa1, rwbarton, carter
      
      GHC Trac Issues: #12525
      
      Differential Revision: https://phabricator.haskell.org/D5326
      921fd890
    • Krzysztof Gogolewski's avatar
      Building GHC with hadrian on FreeBSD · 65517979
      Krzysztof Gogolewski authored
      Summary: I'm currently trying to make `hadrian` work as a build system
      on FreeBSD (https://ghc.haskell.org/trac/ghc/ticket/15860).
      I'm still having some issues with `libgmp` but one can get a working
      `ghc` using `--integer-simple` and this patch.
      
      Reviewers: bgamari, erikd, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5335
      65517979
    • Alp Mestanogullari's avatar
      fix T15898 · fc670c4d
      Alp Mestanogullari authored
      Summary:
      validate is currently broken [1] on master, this patches addresses
      the failure by removing an expected stdout file for T15898 since no output
      is generated there.
      
      [1]: https://circleci.com/gh/ghc/ghc/11416
      
      Test Plan: TEST=T15898 ./validate
      
      Reviewers: bgamari
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5345
      fc670c4d
    • Andreas Klebinger's avatar
      NCG: New code layout algorithm. · 912fd2b6
      Andreas Klebinger authored
      Summary:
      This patch implements a new code layout algorithm.
      It has been tested for x86 and is disabled on other platforms.
      
      Performance varies slightly be CPU/Machine but in general seems to be better
      by around 2%.
      Nofib shows only small differences of about +/- ~0.5% overall depending on
      flags/machine performance in other benchmarks improved significantly.
      
      Other benchmarks includes at least the benchmarks of: aeson, vector, megaparsec, attoparsec,
      containers, text and xeno.
      
      While the magnitude of gains differed three different CPUs where tested with
      all getting faster although to differing degrees. I tested: Sandy Bridge(Xeon), Haswell,
      Skylake
      
      * Library benchmark results summarized:
        * containers: ~1.5% faster
        * aeson: ~2% faster
        * megaparsec: ~2-5% faster
        * xml library benchmarks: 0.2%-1.1% faster
        * vector-benchmarks: 1-4% faster
        * text: 5.5% faster
      
      On average GHC compile times go down, as GHC compiled with the new layout
      is faster than the overhead introduced by using the new layout algorithm,
      
      Things this patch does:
      
      * Move code responsilbe for block layout in it's own module.
      * Move the NcgImpl Class into the NCGMonad module.
      * Extract a control flow graph from the input cmm.
      * Update this cfg to keep it in sync with changes during
        asm codegen. This has been tested on x64 but should work on x86.
        Other platforms still use the old codelayout.
      * Assign weights to the edges in the CFG based on type and limited static
        analysis which are then used for block layout.
      * Once we have the final code layout eliminate some redundant jumps.
      
        In particular turn a sequences of:
            jne .foo
            jmp .bar
          foo:
        into
            je bar
          foo:
            ..
      
      Test Plan: ci
      
      Reviewers: bgamari, jmct, jrtc27, simonmar, simonpj, RyanGlScott
      
      Reviewed By: RyanGlScott
      
      Subscribers: RyanGlScott, trommler, jmct, carter, thomie, rwbarton
      
      GHC Trac Issues: #15124
      
      Differential Revision: https://phabricator.haskell.org/D4726
      912fd2b6
    • Dmitry Ivanov's avatar
    • Ben Price's avatar
      user's guide: typo in ViewPatterns example · 96962829
      Ben Price authored
      96962829
    • Ömer Sinan Ağacan's avatar
      Some assertions and comments in scheduler · 66772351
      Ömer Sinan Ağacan authored
      Test Plan:
      I can't validate this because of existing errors with the debug runtime. I'll
      see if this introduces any new failures.
      
      Reviewers: simonmar, bgamari, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5337
      66772351
  7. 16 Nov, 2018 2 commits