Skip to content
Snippets Groups Projects
  1. May 12, 2023
  2. May 11, 2023
    • Cheng Shao's avatar
      hadrian: fix no_dynamic_libs flavour transformer · 1bb24432
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This patch fixes the no_dynamic_libs flavour transformer and make
      fully_static reuse it. Previously building with no_dynamic_libs fails
      since ghc program is still dynamic and transitively brings in dyn ways
      of rts which are produced by no rules.
      1bb24432
    • Matthew Pickering's avatar
      rts: Refine memory retention behaviour to account for pinned/compacted objects · 05cea68c
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      When using the copying collector there is still a lot of data which
      isn't copied (such as pinned, compacted, large objects etc). The logic
      to decide how much memory to retain didn't take into account that these
      wouldn't be copied. Therefore we pessimistically retained 2* the amount
      of memory for these blocks even though they wouldn't be copied by the
      collector.
      
      The solution is to split up the heap into two parts, the parts which
      will be copied and the parts which won't be copied. Then the appropiate
      factor is applied to each part individually (2 * for copying and 1.2 *
      for not copying).
      
      The T23221 test demonstrates this improvement with a program which first
      allocates many unpinned ByteArray# followed by many pinned ByteArray#
      and observes the difference in the ultimate memory baseline between the
      two.
      
      There are some charts on #23221.
      
      Fixes #23221
      05cea68c
    • Krzysztof Gogolewski's avatar
      Add a test for #21278 · ad16a066
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      ad16a066
    • sheaf's avatar
      Add fused multiply-add instructions · 87eebf98
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This patch adds eight new primops that fuse a multiplication and an
      addition or subtraction:
      
        - `{fmadd,fmsub,fnmadd,fnmsub}{Float,Double}#`
      
      fmadd x y z is x * y + z, computed with a single rounding step.
      
      This patch implements code generation for these primops in the following
      backends:
      
        - X86, AArch64 and PowerPC NCG,
        - LLVM
        - C
      
      WASM uses the C implementation. The primops are unsupported in the
      JavaScript backend.
      
      The following constant folding rules are also provided:
      
        - compute a * b + c when a, b, c are all literals,
        - x * y + 0 ==> x * y,
        - ±1 * y + z ==> z ± y and x * ±1 + z ==> z ± x.
      
      NB: the constant folding rules incorrectly handle signed zero.
      This is a known limitation with GHC's floating-point constant folding
      rules (#21227), which we hope to resolve in the future.
      87eebf98
    • Bodigrim's avatar
      Document unlawfulness of instance Num Fixed · 630b1fea
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
      Fixes #22712
      630b1fea
    • Krzysztof Gogolewski's avatar
      Add a test for #17284 · bd0b056e
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      Since !10123 we now reject this program.
      bd0b056e
    • Rodrigo Mesquita's avatar
      Move "target has RTS linker" out of settings · c17bb82f
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      We move the "target has RTS linker" information out of configure into a
      predicate in GHC, and remove this option from the settings file where it
      is unnecessary -- it's information statically known from the platform.
      
      Note that previously we would consider `powerpc`s and `s390x`s other
      than `powerpc-ibm-aix*` and `s390x-ibm-linux` to have an RTS linker,
      but the RTS linker supports neither platform.
      
      Closes #23361
      c17bb82f
    • Simon Peyton Jones's avatar
      Look both ways when looking for quantified equalities · 40c7daed
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      When looking up (t1 ~# t2) in the quantified constraints,
      check both orientations.  Forgetting this led to #23333.
      40c7daed
    • Matthew Pickering's avatar
      Build vanilla alpine bindists · 29be39ba
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      We currently attempt to build and distribute fully static alpine
      bindists (ones which could be used on any linux platform) but most
      people who use the alpine bindists want to use alpine to build their own
      static applications (for which a fully static bindist is not necessary).
      We should build and distribute these bindists for these users whilst the
      fully-static bindist is still unusable.
      
      Fixes #23349
      29be39ba
    • Ben Gamari's avatar
      base: Export GHC.Conc.Sync.fromThreadId · 0a513952
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Closes #22706.
      0a513952
  3. May 10, 2023
  4. May 09, 2023
  5. May 08, 2023
    • Ben Gamari's avatar
      rts: Fix data-race in hs_init_ghc · 3e3a6be4
      Ben Gamari authored and Cheng Shao's avatar Cheng Shao committed
      As noticed by @TerrorJack, `hs_init_ghc` previously used non-atomic
      increment/decrement on the RTS's initialization count. This may go wrong
      in a multithreaded program which initializes the runtime multiple times.
      
      Closes #22756.
      3e3a6be4
  6. May 06, 2023
  7. May 05, 2023
  8. May 04, 2023
    • Ryan Scott's avatar
      Fix type variable substitution in gen_Newtype_fam_insts · e8b72ff6
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Previously, `gen_Newtype_fam_insts` was substituting the type variable binders
      of a type family instance using `substTyVars`, which failed to take type
      variable dependencies into account. There is similar code in
      `GHC.Tc.TyCl.Class.tcATDefault` that _does_ perform this substitution properly,
      so this patch:
      
      1. Factors out this code into a top-level `substATBndrs` function, and
      2. Uses `substATBndrs` in `gen_Newtype_fam_insts`.
      
      Fixes #23329.
      e8b72ff6
    • Andrei Borzenkov's avatar
      Improved documentation for the Data.OldList.nub function · b3226616
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      There was recomentation to use map head . group . sort instead of nub
      function, but containers library has more suitable and efficient
      analogue
      b3226616
Loading