Skip to content
Snippets Groups Projects
  1. Aug 26, 2022
  2. Aug 25, 2022
    • M Farkas-Dyck's avatar
      Scrub some partiality in `CommonBlockElim`. · 28402eed
      M Farkas-Dyck authored and Marge Bot's avatar Marge Bot committed
      28402eed
    • Ben Gamari's avatar
      upload_ghc_libs: Add means of passing Hackage credentials · 909edcfc
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      909edcfc
    • Simon Peyton Jones's avatar
      Fix arityType: -fpedantic-bottoms, join points, etc · a90298cc
      Simon Peyton Jones authored
      This MR fixes #21694, #21755.  It also makes sure that #21948 and
      fix to #21694.
      
      * For #21694 the underlying problem was that we were calling arityType
        on an expression that had free join points.  This is a Bad Bad Idea.
        See Note [No free join points in arityType].
      
      * To make "no free join points in arityType" work out I had to avoid
        trying to use eta-expansion for runRW#. This entailed a few changes
        in the Simplifier's treatment of runRW#.  See
        GHC.Core.Opt.Simplify.Iteration Note [No eta-expansion in runRW#]
      
      * I also made andArityType work correctly with -fpedantic-bottoms;
        see Note [Combining case branches: andWithTail].
      
      * Rewrote Note [Combining case branches: optimistic one-shot-ness]
      
      * arityType previously treated join points differently to other
        let-bindings. This patch makes them unform; arityType analyses
        the RHS of all bindings to get its ArityType, and extends am_sigs.
      
        I realised that, now we have am_sigs giving the ArityType for
        let-bound Ids, we don't need the (pre-dating) special code in
        arityType for join points. But instead we need to extend the env for
        Rec bindings, which weren't doing before.  More uniform now.  See
        Note [arityType for let-bindings].
      
        This meant we could get rid of ae_joins, and in fact get rid of
        EtaExpandArity altogether.  Simpler.
      
      * And finally, it was the strange treatment of join-point Ids in
        arityType (involving a fake ABot type) that led to a serious bug:
        #21755.  Fixed by this refactoring, which treats them uniformly;
        but without breaking #18328.
      
        In fact, the arity for recursive join bindings is pretty tricky;
        see the long Note [Arity for recursive join bindings]
        in GHC.Core.Opt.Simplify.Utils.  That led to more refactoring,
        including deciding that an Id could have an Arity that is bigger
        than its JoinArity; see Note [Invariants on join points], item
        2(b) in GHC.Core
      
      * Make sure that the "demand threshold" for join points in DmdAnal
        is no bigger than the join-arity.  In GHC.Core.Opt.DmdAnal see
        Note [Demand signatures are computed for a threshold arity based on idArity]
      
      * I moved GHC.Core.Utils.exprIsDeadEnd into GHC.Core.Opt.Arity,
        where it more properly belongs.
      
      * Remove an old, redundant hack in FloatOut.  The old Note was
        Note [Bottoming floats: eta expansion] in GHC.Core.Opt.SetLevels.
      
      Compile time improves very slightly on average:
      
      Metrics: compile_time/bytes allocated
      ---------------------------------------------------------------------------------------
        T18223(normal) ghc/alloc    725,808,720    747,839,216  +3.0%  BAD
        T6048(optasm)  ghc/alloc    105,006,104    101,599,472  -3.2% GOOD
        geo. mean                                          -0.2%
        minimum                                            -3.2%
        maximum                                            +3.0%
      
      For some reason Windows was better
      
         T10421(normal) ghc/alloc    125,888,360    124,129,168  -1.4% GOOD
         T18140(normal) ghc/alloc     85,974,520     83,884,224  -2.4% GOOD
        T18698b(normal) ghc/alloc    236,764,568    234,077,288  -1.1% GOOD
         T18923(normal) ghc/alloc     75,660,528     73,994,512  -2.2% GOOD
          T6048(optasm) ghc/alloc    112,232,512    108,182,520  -3.6% GOOD
        geo. mean                                          -0.6%
      
      I had a quick look at T18223 but it is knee deep in coercions and
      the size of everything looks similar before and after.  I decided
      to accept that 3% increase in exchange for goodness elsewhere.
      
      Metric Decrease:
          T10421
          T18140
          T18698b
          T18923
          T6048
      
      Metric Increase:
          T18223
      a90298cc
  3. Aug 24, 2022
  4. Aug 23, 2022
  5. Aug 21, 2022
  6. Aug 19, 2022
  7. Aug 18, 2022
  8. Aug 17, 2022
    • Peter Becich's avatar
      Implement Response File support for HPC · 3e493dfd
      Peter Becich authored and Matthew Pickering's avatar Matthew Pickering committed
      This is an improvement to HPC authored by Richard Wallace
      (https://github.com/purefn) and myself. I have received permission from
      him to attempt to upstream it. This improvement was originally
      implemented as a patch to HPC via input-output-hk/haskell.nix:
      https://github.com/input-output-hk/haskell.nix/pull/1464
      
      
      
      Paraphrasing Richard, HPC currently requires all inputs as command line arguments.
      With large projects this can result in an argument list too long error.
      I have only seen this error in Nix, but I assume it can occur is a plain Unix environment.
      
      This MR adds the standard response file syntax support to HPC. For
      example you can now pass a file to the command line which contains the
      arguments.
      
      ```
      hpc @response_file_1 @response_file_2 ...
      
      The contents of a Response File must have this format:
      COMMAND ...
      
      example:
      report my_library.tix --include=ModuleA --include=ModuleB
      ```
      
      Updates hpc submodule
      
      Co-authored-by: default avatarRichard Wallace <rwallace@thewallacepack.net>
      
      Fixes #22050
      3e493dfd
  9. Aug 16, 2022
Loading