Skip to content
Snippets Groups Projects
  1. Apr 19, 2024
    • Alan Zimmerman's avatar
      EPA: Fix comments in mkListSyntaxTy0 · f0701585
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      Also extend the test to confirm.
      
      Addresses #24669, 1 of 4
      f0701585
    • Simon Peyton Jones's avatar
      Do not float HNFs out of lambdas · 55a9d699
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This MR adjusts SetLevels so that it is less eager to float a
      HNF (lambda or constructor application) out of a lambda, unless
      it gets to top level.
      
      Data suggests that this change is a small net win:
       * nofib bytes-allocated falls by -0.09% (but a couple go up)
       * perf/should_compile bytes-allocated falls by -0.5%
       * perf/should_run bytes-allocated falls by -0.1%
      See !12410 for more detail.
      
      When fiddling elsewhere, I also found that this patch had a huge
      positive effect on the (very delicate) test
        perf/should_run/T21839r
      But that improvement doesn't show up in this MR by itself.
      
      Metric Decrease:
          MultiLayerModulesRecomp
          T15703
          parsing001
      55a9d699
    • Matthew Pickering's avatar
      testsuite: Rename isCross() predicate to needsTargetWrapper() · 5eaa46e7
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      isCross() was a misnamed because it assumed that all cross targets would
      provide a target wrapper, but the two most common cross targets
      (javascript, wasm) don't need a target wrapper.
      
      Therefore we rename this predicate to `needsTargetWrapper()` so
      situations in the testsuite where we can check whether running
      executables requires a target wrapper or not.
      5eaa46e7
  2. Apr 17, 2024
  3. Apr 15, 2024
  4. Apr 12, 2024
  5. Apr 10, 2024
    • Alan Zimmerman's avatar
      EPA: Remove unnecessary XRec in CompleteMatchSig · 1b1a92bd
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      The XRec for [LIdP pass] is not needed for exact printing, remove it.
      1b1a92bd
    • Ben Gamari's avatar
      testsuite: Add test for lookupSymbolInNativeObj · dccd3ea1
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      dccd3ea1
    • Rodrigo Mesquita's avatar
      Use symbol cache in internal interpreter too · 12931698
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      This commit makes the symbol cache that was used by the external
      interpreter available for the internal interpreter too.
      
      This follows from the analysis in #23415 that suggests the internal
      interpreter could benefit from this cache too, and that there is no good
      reason not to have the cache for it too. It also makes it a bit more
      uniform to have the symbol cache range over both the internal and
      external interpreter.
      
      This commit also refactors the cache into a function which is used by
      both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the
      caching logic to `lookupSymbolInDLL` too.
      12931698
    • Rodrigo Mesquita's avatar
      rts: Make addDLL a wrapper around loadNativeObj · dcfaa190
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Rewrite the implementation of `addDLL` as a wrapper around the more
      principled `loadNativeObj` rts linker function. The latter should be
      preferred while the former is preserved for backwards compatibility.
      
      `loadNativeObj` was previously only available on ELF platforms, so this
      commit further refactors the rts linker to transform loadNativeObj_ELF
      into loadNativeObj_POSIX, which is available in ELF and MachO platforms.
      
      The refactor made it possible to remove the `dl_mutex` mutex in favour
      of always using `linker_mutex` (rather than a combination of both).
      
      Lastly, we implement `loadNativeObj` for Windows too.
      dcfaa190
    • Alexis King's avatar
      linker: Avoid linear search when looking up Haskell symbols via dlsym · e008a19a
      Alexis King authored and Marge Bot's avatar Marge Bot committed
      
      See the primary Note [Looking up symbols in the relevant objects] for a
      more in-depth explanation.
      
      When dynamically loading a Haskell symbol (typical when running a splice or
      GHCi expression), before this commit we would search for the symbol in
      all dynamic libraries that were loaded. However, this could be very
      inefficient when too many packages are loaded (which can happen if there are
      many package dependencies) because the time to lookup the would be
      linear in the number of packages loaded.
      
      This commit drastically improves symbol loading performance by
      introducing a mapping from units to the handles of corresponding loaded
      dlls. These handles are returned by dlopen when we load a dll, and can
      then be used to look up in a specific dynamic library.
      
      Looking up a given Name is now much more precise because we can get
      lookup its unit in the mapping and lookup the symbol solely in the
      handles of the dynamic libraries loaded for that unit.
      
      In one measurement, the wait time before the expression was executed
      went from +-38 seconds down to +-2s.
      
      This commit also includes Note [Symbols may not be found in pkgs_loaded],
      explaining the fallback to the old behaviour in case no dll can be found
      in the unit mapping for a given Name.
      
      Fixes #23415
      
      Co-authored-by: default avatarRodrigo Mesquita <(@alt-romes)>
      e008a19a
    • Rodrigo Mesquita's avatar
      rts: free error message before returning · dd530bb7
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Fixes a memory leak in rts/linker/PEi386.c
      dd530bb7
    • Jade's avatar
      Validate -main-is flag using parseIdentifier · 3d0806fc
      Jade authored and Marge Bot's avatar Marge Bot committed
      Fixes #24368
      3d0806fc
  6. Apr 09, 2024
  7. Apr 08, 2024
Loading