1. 27 Oct, 2021 4 commits
  2. 26 Oct, 2021 3 commits
  3. 25 Oct, 2021 2 commits
  4. 24 Oct, 2021 5 commits
    • John Ericson's avatar
      Fix dangling reference to RtsConfig.h · 98aa29d3
      John Ericson authored and  Marge Bot's avatar Marge Bot committed
      It hasn't existed since a2a67cd5 -- in
    • Joachim Breitner's avatar
      undefined: Neater CallStack in error message · 3417a81a
      Joachim Breitner authored and  Marge Bot's avatar Marge Bot committed
      Users of `undefined` don’t want to see
      files.hs: Prelude.undefined:
      CallStack (from HasCallStack):
        error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err
        undefined, called at file.hs:151:19 in main:Main
      but want to see
      files.hs: Prelude.undefined:
      CallStack (from HasCallStack):
        undefined, called at file.hs:151:19 in main:Main
      so let’s make that so.
      The function for that is `withFrozenCallStack`, but that is not usable
      here (module dependencies, and also not representation-polymorphic). And
      even if it were, it could confuse GHC’s strictness analyzer, leading to
      big regressions in some perf tests (T10421 in particular).
      So after shuffling modules and definitions around, I eventually noticed
      that the easiest way is to just not call `error` here.
      Fixes #19886
    • Alan Zimmerman's avatar
      EPA: Use LocatedA for ModuleName · 691c450f
      Alan Zimmerman authored and  Marge Bot's avatar Marge Bot committed
      This allows us to use an Anchor with a DeltaPos in it when exact
    • Sebastian Graf's avatar
      DmdAnal: Implement Boxity Analysis (#19871) · 3bab222c
      Sebastian Graf authored and  Marge Bot's avatar Marge Bot committed
      This patch fixes some abundant reboxing of `DynFlags` in
      `GHC.HsToCore.Match.Literal.warnAboutOverflowedLit` (which was the topic
      of #19407) by introducing a Boxity analysis to GHC, done as part of demand
      analysis. This allows to accurately capture ad-hoc unboxing decisions previously
      made in worker/wrapper in demand analysis now, where the boxity info can
      propagate through demand signatures.
      See the new `Note [Boxity analysis]`. The actual fix for #19407 is described in
      `Note [No lazy, Unboxed demand in demand signature]`, but
      `Note [Finalising boxity for demand signature]` is probably a better entry-point.
      To support the fix for #19407, I had to change (what was)
      `Note [Add demands for strict constructors]` a bit
      (now `Note [Unboxing evaluated arguments]`). In particular, we now take care of
      it in `finaliseBoxity` (which is only called from demand analaysis) instead of
      I also had to resurrect `Note [Product demands for function body]` and rename
      it to `Note [Unboxed demand on function bodies returning small products]` to
      avoid huge regressions in `join004` and `join007`, thereby fixing #4267 again.
      See the updated Note for details.
      A nice side-effect is that the worker/wrapper transformation no longer needs to
      look at strictness info and other bits such as `InsideInlineableFun` flags
      (needed for `Note [Do not unbox class dictionaries]`) at all. It simply collects
      boxity info from argument demands and interprets them with a severely simplified
      `wantToUnboxArg`. All the smartness is in `finaliseBoxity`, which could be moved
      to DmdAnal completely, if it wasn't for the call to `dubiousDataConInstArgTys`
      which would be awkward to export.
      I spent some time figuring out the reason for why `T16197` failed prior to my
      amendments to `Note [Unboxing evaluated arguments]`. After having it figured
      out, I minimised it a bit and added `T16197b`, which simply compares computed
      strictness signatures and thus should be far simpler to eyeball.
      The 12% ghc/alloc regression in T11545 is because of the additional `Boxity`
      field in `Poly` and `Prod` that results in more allocation during `lubSubDmd`
      and `plusSubDmd`. I made sure in the ticky profiles that the number of calls
      to those functions stayed the same. We can bear such an increase here, as we
      recently improved it by -68% (in b760c1f7).
      T18698* regress slightly because there is more unboxing of dictionaries
      happening and that causes Lint (mostly) to allocate more.
      Fixes #19871, #19407, #4267, #16859, #18907 and #13331.
      Metric Increase:
      Metric Decrease:
    • Ben Gamari's avatar
      driver: Export wWarningFlagMap · 8300ca2e
      Ben Gamari authored and  Marge Bot's avatar Marge Bot committed
      A new feature requires Ghcide to be able to convert warnings to CLI
      flags (WarningFlag -> String). This is most easily implemented in terms
      of the internal function flagSpecOf, which uses an inefficient
      implementation based on linear search through a linked list. This PR
      derives Ord for WarningFlag, and replaces that list with a Map.
      Closes #19087.
  5. 22 Oct, 2021 9 commits
  6. 20 Oct, 2021 14 commits
  7. 19 Oct, 2021 3 commits