Skip to content
Snippets Groups Projects
  1. Feb 19, 2024
  2. Jun 13, 2023
  3. May 25, 2023
  4. Apr 27, 2023
  5. Mar 21, 2023
  6. Feb 02, 2023
    • jeffrey young's avatar
      CI: JavaScript backend runs testsuite · 394b91ce
      jeffrey young authored and Marge Bot's avatar Marge Bot committed
      This MR runs the testsuite for the JS backend. Note that this is a
      temporary solution until !9515 is merged.
      
      Key point: The CI runs hadrian on the built cross compiler _but not_ on
      the bindist.
      
      Other Highlights:
      
       - stm submodule gets a bump to mark tests as broken
       - several tests are marked as broken or are fixed by adding more
       - conditions to their test runner instance.
      
      List of working commit messages:
      
      CI: test cross target _and_ emulator
      
      CI: JS: Try run testsuite with hadrian
      
      JS.CI: cleanup and simplify hadrian invocation
      
      use single bracket, print info
      
      JS CI: remove call to test_compiler from hadrian
      
      don't build haddock
      
      JS: mark more tests as broken
      
      Tracked in #22576
      
      JS testsuite: don't skip sum_mod test
      
      Its expected to fail, yet we skipped it which automatically makes it
      succeed leading to an unexpected success,
      
      JS testsuite: don't mark T12035j as skip
      
      leads to an unexpected pass
      
      JS testsuite: remove broken on T14075
      
      leads to unexpected pass
      
      JS testsuite: mark more tests as broken
      
      JS testsuite: mark T11760 in base as broken
      
      JS testsuite: mark ManyUnbSums broken
      
      submodules: bump process and hpc for JS tests
      
      Both submodules has needed tests skipped or marked broken for th JS
      backend. This commit now adds these changes to GHC.
      
      See:
      
      HPC: hpc/hpc!21
      
      Process: https://github.com/haskell/process/pull/268
      
      remove js_broken on now passing tests
      
      separate wasm and js backend ci
      
      test: T11760: add threaded, non-moving only_ways
      
      test: T10296a add req_c
      
      T13894: skip for JS backend
      
      tests: jspace, T22333: mark as js_broken(22573)
      
      test: T22513i mark as req_th
      
      stm submodule: mark stm055, T16707 broken for JS
      
      tests: js_broken(22374) on unpack_sums_6, T12010
      
      dont run diff on JS CI, cleanup
      
      fixup: More CI cleanup
      
      fix: align text to master
      
      fix: align exceptions submodule to master
      
      CI: Bump DOCKER_REV
      
      Bump to ci-images commit that has a deb11 build with node. Required for
      !9552
      
      testsuite: mark T22669 as js_skip
      
      See #22669
      
      This test tests that .o-boot files aren't created when run in using the
      interpreter backend. Thus this is not relevant for the JS backend.
      
      testsuite: mark T22671 as broken on JS
      
      See #22835
      
      base.testsuite: mark Chan002 fragile for JS
      
      see #22836
      
      revert: submodule process bump
      
      bump stm submodule
      
      New hash includes skips for the JS backend.
      
      testsuite: mark RnPatternSynonymFail broken on JS
      
      Requires TH:
       - see !9779
       - and #22261
      
      compiler: GHC.hs ifdef import Utils.Panic.Plain
      394b91ce
  7. Dec 03, 2022
  8. Nov 29, 2022
  9. Oct 10, 2022
    • Simon Peyton Jones's avatar
      Make rewrite rules "win" over inlining · 96d32ff2
      Simon Peyton Jones authored and Simon Peyton Jones's avatar Simon Peyton Jones committed
      If a rewrite rule and a rewrite rule compete in the simplifier, this
      patch makes sure that the rewrite rule "win".  That is, in general
      a bit fragile, but it's a huge help when making specialisation work
      reliably, as #21851 and #22097 showed.
      
      The change is fairly straightforwad, and documented in
         Note [Rewrite rules and inlining]
      in GHC.Core.Opt.Simplify.Iteration.
      
      Compile-times change, up and down a bit -- in some cases because
      we get better specialisation.  But the payoff (more reliable
      specialisation) is large.
      
      Metrics: compile_time/bytes allocated
      -----------------------------------------------
          T10421(normal)   +3.7% BAD
         T10421a(normal)   +5.5%
          T13253(normal)   +1.3%
            T14052(ghci)   +1.8%
          T15304(normal)   -1.4%
          T16577(normal)   +3.1% BAD
          T17516(normal)   +2.3%
          T17836(normal)   -1.9%
          T18223(normal)   -1.8%
           T8095(normal)   -1.3%
           T9961(normal)   +2.5% BAD
      
               geo. mean   +0.0%
               minimum     -1.9%
               maximum     +5.5%
      
      Nofib results are (bytes allocated)
      
      +-------------------------------++----------+
      |                               ||tsv (rel) |
      +===============================++==========+
      |           imaginary/paraffins ||   +0.27% |
      |                imaginary/rfib ||   -0.04% |
      |                     real/anna ||   +0.02% |
      |                      real/fem ||   -0.04% |
      |                    real/fluid ||   +1.68% |
      |                   real/gamteb ||   -0.34% |
      |                       real/gg ||   +1.54% |
      |                   real/hidden ||   -0.01% |
      |                      real/hpg ||   -0.03% |
      |                    real/infer ||   -0.03% |
      |                   real/prolog ||   +0.02% |
      |                  real/veritas ||   -0.47% |
      |       shootout/fannkuch-redux ||   -0.03% |
      |         shootout/k-nucleotide ||   -0.02% |
      |               shootout/n-body ||   -0.06% |
      |        shootout/spectral-norm ||   -0.01% |
      |         spectral/cryptarithm2 ||   +1.25% |
      |             spectral/fibheaps ||  +18.33% |
      |           spectral/last-piece ||   -0.34% |
      +===============================++==========+
      |                     geom mean ||   +0.17% |
      
      There are extensive notes in !8897 about the regressions.
      Briefly
      
      * fibheaps: there was a very delicately balanced inlining that
        tipped over the wrong way after this change.
      
      * cryptarithm2 and paraffins are caused by #22274, which is
        a separate issue really.  (I.e. the right fix is *not* to
        make inlining "win" over rules.)
      
      So I'm accepting these changes
      
      Metric Increase:
          T10421
          T16577
          T9961
      96d32ff2
  10. Sep 28, 2022
  11. Jun 22, 2022
  12. May 26, 2022
    • Fraser Tweedale's avatar
      fix executablePath test for NetBSD · afde4276
      Fraser Tweedale authored and Marge Bot's avatar Marge Bot committed
      executablePath support for NetBSD was added in
      a172be07, but the test was not
      updated.
      
      Update the test so that it works for NetBSD.  This requires handling
      some quirks:
      
      - The result of getExecutablePath could include "./" segments.
        Therefore use System.FilePath.equalFilePath to compare paths.
      
      - The sysctl(2) call returns the original executable name even after
        it was deleted.  Add `canQueryAfterDelete :: [FilePath]` and
        adjust expectations for the post-delete query accordingly.
      
      Also add a note to the `executablePath` haddock to advise that
      NetBSD behaves differently from other OSes when the file has been
      deleted.
      
      Also accept a decrease in memory usage for T16875.  On Windows, the
      metric is -2.2% of baseline, just outside the allowed ±2%.  I don't
      see how this commit could have influenced this metric, so I suppose
      it's something in the CI environment.
      
      Metric Decrease:
          T16875
      afde4276
    • Fraser Tweedale's avatar
      executablePath test: fix file extension treatment · b22979fb
      Fraser Tweedale authored and Marge Bot's avatar Marge Bot committed
      The executablePath test strips the file extension (if any) when
      comparing the query result with the expected value.  This is to
      handle platforms where GHC adds a file extension to the output
      program file (e.g. .exe on Windows).
      
      After the initial check, the file gets deleted (if supported).
      However, it tries to delete the *stripped* filename, which is
      incorrect.  The test currently passes only because Windows does not
      allow deleting the program while any process created from it is
      alive.
      
      Make the test program correct in general by deleting the
      *non-stripped* executable filename.
      b22979fb
  13. May 05, 2022
  14. Dec 15, 2021
  15. Nov 18, 2021
  16. Sep 11, 2021
    • Sylvain Henry's avatar
      Canonicalize bignum literals · 089de88e
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Before this patch Integer and Natural literals were desugared into "real"
      Core in Core prep. Now we desugar them directly into their final ConApp
      form in HsToCore. We only keep the double representation for BigNat#
      (literals larger than a machine Word/Int) which are still desugared in
      Core prep.
      
      Using the final form directly allows case-of-known-constructor to fire
      for bignum literals, fixing #20245.
      
      Slight increase (+2.3) in T4801 which is a pathological case with
      Integer literals.
      
      Metric Increase:
          T4801
          T11545
      089de88e
  17. Sep 08, 2021
  18. Jul 06, 2021
  19. Jul 02, 2021
  20. May 29, 2021
  21. May 20, 2021
  22. Mar 03, 2021
    • Sylvain Henry's avatar
      Fix array and cleanup conversion primops (#19026) · d8dc0f96
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      The first change makes the array ones use the proper fixed-size types,
      which also means that just like before, they can be used without
      explicit conversions with the boxed sized types. (Before, it was Int# /
      Word# on both sides, now it is fixed sized on both sides).
      
      For the second change, don't use "extend" or "narrow" in some of the
      user-facing primops names for conversions.
      
        - Names like `narrowInt32#` are misleading when `Int` is 32-bits.
      
        - Names like `extendInt64#` are flat-out wrong when `Int is
          32-bits.
      
        - `narrow{Int,Word}<N>#` however map a type to itself, and so don't
          suffer from this problem. They are left as-is.
      
      These changes are batched together because Alex happend to use the array
      ops. We can only use released versions of Alex at this time, sadly, and
      I don't want to have to have a release thatwon't work for the final GHC
      9.2. So by combining these we get all the changes for Alex done at once.
      
      Bump hackage state in a few places, and also make that workflow slightly
      easier for the future.
      
      Bump minimum Alex version
      
      Bump Cabal, array, bytestring, containers, text, and binary submodules
      d8dc0f96
    • Daniel Winograd-Cort's avatar
      Add cmpNat, cmpSymbol, and cmpChar · eea96042
      Daniel Winograd-Cort authored and Marge Bot's avatar Marge Bot committed
      Add Data.Type.Ord
      Add and update tests
      Metric Increase:
          MultiLayerModules
      eea96042
  23. Feb 14, 2021
  24. Jan 30, 2021
    • Sylvain Henry's avatar
      Fix -dynamic-too with wired-in modules (#19264) · a3d995fa
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      See T19264 for a tricky corner case when explicitly importing
      GHC.Num.BigNat and another module. With -dynamic-too, the FinderCache
      contains paths for non-dynamic interfaces so they must be loaded first,
      which is usually the case, except for some interfaces loaded in the
      backend (e.g. in CorePrep).
      
      So we must run the backend for the non-dynamic way first for
      -dynamic-too to work as it is but I broke this invariant in
      c85f4928 by mistakenly making the
      backend run for the dynamic way first.
      a3d995fa
  25. Jan 27, 2021
    • Sylvain Henry's avatar
      Fix spurious failures of T16916 on CI (#16966) · 9c87f97e
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      * disable idle GC which has a big impact on time measures
      
      * use average measures (before and after event registration)
      
      * use warmup measures (for some reason the first measure of a batch
        seems to be often quite different from the others)
      
      * drop the division by monotonic clock time: this clock is impacted by
        the load of the runner.  We only want to measure the time spent in the
        RTS while the mutator is idle so I don't understand why it was used.
      9c87f97e
  26. Jan 23, 2021
    • Sylvain Henry's avatar
      Bignum: add Natural constant folding rules (#15821) · 773e2828
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      * Implement constant folding rules for Natural (similar to Integer ones)
      
      * Add mkCoreUbxSum helper in GHC.Core.Make
      
      * Remove naturalTo/FromInt
      
        We now only provide `naturalTo/FromWord` as
        the semantics is clear (truncate/zero-extend). For Int we have to deal
        with negative numbers (throw an exception? convert to Word
        beforehand?) so we leave the decision about what to do to the caller.
      
        Moreover, now that we have sized types (Int8#, Int16#, ..., Word8#,
        etc.) there is no reason to bless `Int#` more than `Int8#` or `Word8#`
        (for example).
      
      * Replaced a few `()` with `(# #)`
      773e2828
  27. Jan 10, 2021
  28. Nov 26, 2020
    • Moritz Angermann's avatar
      [Sized Cmm] properly retain sizes. · be5d74ca
      Moritz Angermann authored and Marge Bot's avatar Marge Bot committed
      
      This replaces all Word<N> = W<N># Word# and Int<N> = I<N># Int#  with
      Word<N> = W<N># Word<N># and Int<N> = I<N># Int<N>#, thus providing us
      with properly sized primitives in the codegenerator instead of pretending
      they are all full machine words.
      
      This came up when implementing darwinpcs for arm64.  The darwinpcs reqires
      us to pack function argugments in excess of registers on the stack.  While
      most procedure call standards (pcs) assume arguments are just passed in
      8 byte slots; and thus the caller does not know the exact signature to make
      the call, darwinpcs requires us to adhere to the prototype, and thus have
      the correct sizes.  If we specify CInt in the FFI call, it should correspond
      to the C int, and not just be Word sized, when it's only half the size.
      
      This does change the expected output of T16402 but the new result is no
      less correct as it eliminates the narrowing (instead of the `and` as was
      previously done).
      
      Bumps the array, bytestring, text, and binary submodules.
      
      Co-Authored-By: default avatarBen Gamari <ben@well-typed.com>
      
      Metric Increase:
          T13701
          T14697
      be5d74ca
  29. Oct 10, 2020
  30. Oct 09, 2020
    • Sylvain Henry's avatar
      Bignum: match on small Integer/Natural · 12191a99
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Previously we only matched on *variables* whose unfoldings were a ConApp
      of the form `IS lit#` or `NS lit##`. But we forgot to match on the
      ConApp directly... As a consequence, constant folding only worked after
      the FloatOut pass which creates bindings for most sub-expressions. With
      this patch, matching on bignums works even with -O0 (see bignumMatch
      test).
      12191a99
  31. Oct 02, 2020
  32. Oct 01, 2020
  33. Sep 26, 2020
  34. Aug 12, 2020
    • Ben Gamari's avatar
      testsuite: Increase tolerance of T16916 · db6dd810
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      T16916 (testing #16916) has been slightly fragile in CI due to its
      reliance on CPU times. While it's hard to see how to eliminate
      the time-dependence entirely, we can nevertheless make it more tolerant.
      
      Fixes #16966.
      db6dd810
Loading