1. 28 Jun, 2021 1 commit
  2. 20 Jun, 2021 8 commits
    • Fraser Tweedale's avatar
      hadrian/README.md: update bignum options · 5abf5997
      Fraser Tweedale authored and  Marge Bot's avatar Marge Bot committed
      5abf5997
    • Matthew Pickering's avatar
      Linker/darwin: Properly honour -fno-use-rpaths · 6281a333
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      The specification is now simple
      
      * On linux, use `-Xlinker -rpath -Xlinker` to set the rpath of the
      executable
      * On darwin, never use `-Xlinker -rpath -Xlinker`, always inject
      the rpath afterwards, see `runInjectRPaths`.
      * If `-fno-use-rpaths` is passed then *never* inject anything into the
      rpath.
      
      Fixes #20004
      6281a333
    • Zubin's avatar
      Set min LLVM version to 9 and make version checking use a non-inclusive upper · 6c783817
      Zubin authored and  Marge Bot's avatar Marge Bot committed
      bound.
      
      We use a non-inclusive upper bound so that setting the upper bound to 13 for
      example means that all 12.x versions are accepted.
      6c783817
    • Matthew Pickering's avatar
      rts: Pass -Wl,_U,___darwin_check_fd_set_overflow on Darwin · 4a65c0f8
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Note [fd_set_overflow]
      ~~~~~~~~~~~~~~~~~~~~~~
      In this note is the very sad tale of __darwin_fd_set_overflow.
      The 8.10.5 release was broken because it was built in an environment
      where the libraries were provided by XCode 12.*, these libraries introduced
      a reference to __darwin_fd_set_overflow via the FD_SET macro which is used in
      Select.c. Unfortunately, this symbol is not available with XCode 11.* which
      led to a linker error when trying to link anything. This is almost certainly
      a bug in XCode but we still have to work around it.
      
      Undefined symbols for architecture x86_64:
       "___darwin_check_fd_set_overflow", referenced from:
           _awaitEvent in libHSrts.a(Select.o)
      ld: symbol(s) not found for architecture x86_64
      
      One way to fix this is to upgrade your version of xcode, but this would
      force the upgrade on users prematurely. Fortunately it also seems safe to pass
      the linker option "-Wl,-U,___darwin_check_fd_set_overflow" because the usage of
      the symbol is guarded by a guard to check if it's defined.
      
      __header_always_inline int
      __darwin_check_fd_set(int _a, const void *_b)
      {
         if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {
             return __darwin_check_fd_set_overflow(_a, _b, 1);
             return __darwin_check_fd_set_overflow(_a, _b, 0);
         } else {
             return 1;
         }
      
      Across the internet there are many other reports of this issue
       See: https://github.com/mono/mono/issues/19393
          , https://github.com/sitsofe/fio/commit/b6a1e63a1ff607692a3caf3c2db2c3d575ba2320
      
      The issue was originally reported in #19950
      
      Fixes #19950
      4a65c0f8
    • Matthew Pickering's avatar
      Darwin CI: Don't explicitly pass ncurses/iconv paths · 689016dc
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Passing --with-ncurses-libraries means the path which gets backed in
      progagate into the built binaries. This is incorrect when we want to
      distribute the binaries because the user might not have the library in
      that specific place. It's the user's reponsibility to direct the dynamic
      linker to the right place.
      
      Fixes #19968
      689016dc
    • Moritz Angermann's avatar
      Guard Allocate Exec via LIBFFI by LIBFFI · a6a8d3f5
      Moritz Angermann authored and  Marge Bot's avatar Marge Bot committed
      We now have two darwin flavours. AArch64-Darwin, and
      x86_64-darwin, the latter one which has proper custom
      adjustor support, the former though relies on libffi.
      
      Mixing both leads to odd crashes, as the closures might
      not fit the size of the libffi closures. Hence this
      needs to be guarded by the USE_LBFFI_FOR_ADJUSTORS guard.
      
      Original patch by Hamish Mackenzie
      a6a8d3f5
    • Ryan Scott's avatar
      Simplify pprLHsContext · 4c87a3d1
      Ryan Scott authored and  Marge Bot's avatar Marge Bot committed
      This removes an _ad hoc_ special case for empty `LHsContext`s in
      `pprLHsContext`, fixing #20011. To avoid regressions in
      pretty-printing data types and classes constructed via TH, we now
      apply a heuristic where we convert empty datatype contexts and superclasses
      to a `Nothing` (rather than `Just` an empty context). This will, for instance,
      avoid pretty-printing every TH-constructed data type as `data () => Blah ...`.
      4c87a3d1
    • Vladislav Zavialov's avatar
      Do not reassociate lexical negation (#19838) · 3f60a7e5
      Vladislav Zavialov authored and  Marge Bot's avatar Marge Bot committed
      3f60a7e5
  3. 19 Jun, 2021 9 commits
  4. 18 Jun, 2021 4 commits
    • Gleb Popov's avatar
      Pass -DLIBICONV_PLUG when building base library on FreeBSD. · 5d3d9925
      Gleb Popov authored and  Marge Bot's avatar Marge Bot committed
      If libiconv is installed from packages on the build machine, there is a high
      chance that the build system will pick up /usr/local/include/iconv.h instead
      of base /usr/include/iconv.h
      
      This additional preprocessor define makes package's libiconv header compatible
      with system one, fixing the build.
      
      Closes issue #19958
      5d3d9925
    • Simon Peyton Jones's avatar
      Improve pretty-printing of coercions · db7e6dc5
      Simon Peyton Jones authored and  Marge Bot's avatar Marge Bot committed
      With -dsuppress-coercions, it's still good to be able to see the
      type of the coercion. This patch prints the type.  Maybe we should
      have a flag to control this too.
      db7e6dc5
    • Simon Peyton Jones's avatar
      Improve abstractVars quantification ordering · c6a00c15
      Simon Peyton Jones authored and  Marge Bot's avatar Marge Bot committed
      When floating a binding out past some type-variable binders,
      don't gratuitiously change the order of the binders.
      
      This small change gives code that is simpler, has less risk of
      non-determinism, and does not gratuitiously change type-variable
      order.
      
      See Note [Which type variables to abstract over] in
      GHC.Core.Opt.Simplify.Utils.
      
      This is really just refactoring; no change in behaviour.
      c6a00c15
    • Simon Peyton Jones's avatar
      Enhance cast worker/wrapper for INLINABLE · 3b783496
      Simon Peyton Jones authored and  Marge Bot's avatar Marge Bot committed
      In #19890 we realised that cast worker/wrapper didn't really work
      properly for functions with an INLINABLE pragma, and hence a stable
      unfolding. This patch fixes the problem.
      
      Instead of disabling cast w/w when there is a stable unfolding (as
      we did before), we now tranfer the stable unfolding to the worker.
      
      It turned out that it was easier to do that if I moved the cast
      w/w stuff from prepareBinding to completeBind.
      
      No chnages at all in nofib results:
      --------------------------------------------------------------------------------
              Program           Size    Allocs   Runtime   Elapsed  TotalMem
      --------------------------------------------------------------------------------
                  Min          -0.0%      0.0%    -63.8%    -78.2%      0.0%
                  Max          -0.0%      0.0%    +11.8%    +11.7%      0.0%
       Geometric Mean          -0.0%     -0.0%    -26.6%    -33.4%     -0.0%
      
      Small decreases in compile-time allocation for two tests (below)
      of around 2%.
      
      T12545 increased in compile-time alloc by 4%, but it's not
      reproducible on my machine, and is a known-wobbly test.
      
      Metric Increase:
          T12545
      
      Metric Decrease:
          T18698a
          T18698b
      3b783496
  5. 17 Jun, 2021 8 commits
  6. 16 Jun, 2021 1 commit
  7. 10 Jun, 2021 6 commits
    • Simon Peyton Jones's avatar
      Fix INLINE pragmas in desugarer · 3d5cb335
      Simon Peyton Jones authored and  Marge Bot's avatar Marge Bot committed
      In #19969 we discovered that GHC has has a bug *forever* that means it
      sometimes essentially discarded INLINE pragams.  This happened when you have
      * Two more more mutually recursive functions
      * Some of which (presumably not all!) have an INLINE pragma
      * Completely monomorphic.
      
      This hits a particular case in GHC.HsToCore.Binds.dsAbsBinds, which was
      simply wrong -- it put the INLINE pragma on the wrong binder.
      
      This patch fixes the bug, rather easily, by adjusting the
      no-tyvar, no-dict case of GHC.HsToCore.Binds.dsAbsBinds.
      
      I also discovered that the GHC.Core.Opt.Pipeline.shortOutIndirections
      was not doing a good job for
      
          {-# INLINE lcl_id #-}
          lcl_id = BIG
      
          gbl_id = lcl_id
      
      Here we want to transfer the stable unfolding to gbl_id (we do), but
      we also want to remove it from lcl_id (we were not doing that).
      Otherwise both Ids have large stable unfoldings.  Easily fixed.
      Note [Transferring IdInfo] explains.
      3d5cb335
    • sheaf's avatar
      Reword: representation instead of levity · 472c2bf0
      sheaf authored and  Marge Bot's avatar Marge Bot committed
      fixes #19756, updates haddock submodule
      472c2bf0
    • Sylvain Henry's avatar
      Fix redundant import · 61c51c00
      Sylvain Henry authored and  Marge Bot's avatar Marge Bot committed
      61c51c00
    • Matthew Pickering's avatar
      Add (broken) test for #19966 · fb6b6379
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      fb6b6379
    • Xia Li-yao's avatar
      User's Guide: reword and fix punctuation in description of PostfixOperators · 8baa8874
      Xia Li-yao authored and  Marge Bot's avatar Marge Bot committed
      8baa8874
    • Simon Peyton Jones's avatar
      Do not add unfoldings to lambda-binders · f4a5e30e
      Simon Peyton Jones authored and  Marge Bot's avatar Marge Bot committed
      For reasons described in GHC.Core.Opt.Simplify
      Historical Note [Case binders and join points],
      we used to keep a Core unfolding in one of the lambda-binders
      for a join point.  But this was always a gross hack -- it's
      very odd to have an unfolding in a lambda binder, that refers to
      earlier lambda binders.
      
      The hack bit us in various ways:
      * Most seriously, it is incompatible with linear types in Core.
      * It complicated demand analysis, and could worsen results
      * It required extra care in the simplifier (simplLamBinder)
      * It complicated !5641 (look for "join binder unfoldings")
      
      So this patch just removes the hack.  Happily, doind so turned out to
      have no effect on performance.
      f4a5e30e
  8. 09 Jun, 2021 2 commits
  9. 08 Jun, 2021 1 commit