Skip to content
Snippets Groups Projects
  1. May 21, 2022
    • Norman Ramsey's avatar
      Change `Backend` type and remove direct dependencies · 4aa3c5bd
      Norman Ramsey authored and Cheng Shao's avatar Cheng Shao committed
      With this change, `Backend` becomes an abstract type
      (there are no more exposed value constructors).
      Decisions that were formerly made by asking "is the
      current back end equal to (or different from) this named value
      constructor?" are now made by interrogating the back end about
      its properties, which are functions exported by `GHC.Driver.Backend`.
      
      There is a description of how to migrate code using `Backend` in the
      user guide.
      
      Clients using the GHC API can find a backdoor to access the Backend
      datatype in GHC.Driver.Backend.Internal.
      
      Bumps haddock submodule.
      
      Fixes #20927
      4aa3c5bd
  2. May 20, 2022
  3. May 19, 2022
  4. May 18, 2022
    • Andreas Klebinger's avatar
      Give all EXTERN_INLINE closure macros prototypes · 828fbd8a
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      828fbd8a
    • Sylvain Henry's avatar
      Don't store LlvmConfig into DynFlags · ef3c8d9e
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      LlvmConfig contains information read from llvm-passes and llvm-targets
      files in GHC's top directory. Reading these files is done only when
      needed (i.e. when the LLVM backend is used) and cached for the whole
      compiler session. This patch changes the way this is done:
      
      - Split LlvmConfig into LlvmConfig and LlvmConfigCache
      
      - Store LlvmConfigCache in HscEnv instead of DynFlags: there is no
        good reason to store it in DynFlags. As it is fixed per session, we
        store it in the session state instead (HscEnv).
      
      - Initializing LlvmConfigCache required some changes to driver functions
        such as newHscEnv. I've used the opportunity to untangle initHscEnv
        from initGhcMonad (in top-level GHC module) and to move it to
        GHC.Driver.Main, close to newHscEnv.
      
      - I've also made `cmmPipeline` independent of HscEnv in order to remove
        the call to newHscEnv in regalloc_unit_tests.
      ef3c8d9e
  5. May 17, 2022
    • Matthew Pickering's avatar
      Add test for #21558 · 0e2d16eb
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This is now fixed on master and 9.2 branch.
      
      Closes #21558
      0e2d16eb
    • Ben Gamari's avatar
      codeGen: Ensure that static datacon apps are included in SRTs · b048a9f4
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      When generating an SRT for a recursive group, GHC.Cmm.Info.Build.oneSRT
      filters out recursive references, as described in Note [recursive SRTs].
      However, doing so for static functions would be unsound, for the reason
      described in Note [Invalid optimisation: shortcutting].
      
      However, the same argument applies to static data constructor
      applications, as we discovered in #20959. Fix this by ensuring that
      static data constructor applications are included in recursive SRTs.
      
      The approach here is not entirely satisfactory, but it is a starting
      point.
      
      Fixes #20959.
      b048a9f4
    • Ben Gamari's avatar
      CafAnal: Improve code clarity · cb52b4ae
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we implement a few measures to improve the clarity of the CAF
      analysis implementation. Specifically:
      
      * Use CafInfo instead of Bool since the former is more descriptive
      * Rename CAFLabel to CAFfyLabel, since not all CAFfyLabels are in fact
        CAFs
      * Add numerous comments
      cb52b4ae
    • Vladislav Zavialov's avatar
      Remove unused test files (#21582) · 2343457d
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Those files were moved to the perf/ subtree in 11c9a469, and then
      accidentally reintroduced in 680ef2c8.
      2343457d
    • Matthew Pickering's avatar
      Bump time submodule to 1.12.2 · 70f52443
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This bumps the time submodule to the 1.12.2 release.
      
      Fixes #21571
      70f52443
    • Simon Peyton Jones's avatar
      Fix bad interaction between withDict and the Specialiser · d2284c4c
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This MR fixes a bad bug, where the withDict was inlined too
      vigorously, which in turn made the type-class Specialiser generate
      a bogus specialisation, because it saw the same overloaded function
      applied to two /different/ dictionaries.
      
      Solution: inline `withDict` later.  See (WD8) of Note [withDict]
      in GHC.HsToCore.Expr
      
      See #21575, which is fixed by this change.
      d2284c4c
    • Simon Peyton Jones's avatar
      Adjust flags for pprTrace · eccdb208
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      We were using defaultSDocContext for pprTrace, which suppresses
      lots of useful infomation. This small MR adds
      
         GHC.Utils.Outputable.traceSDocContext
      
      and uses it for pprTrace and pprTraceUserWarning.
      
      traceSDocContext is a global, and hence not influenced by flags,
      but that seems unavoidable.  But I made the sdocPprDebug bit
      controlled by unsafeHasPprDebug, since we have the latter for
      exactly this purpose.
      
      Fixes #21569
      eccdb208
    • Alex D's avatar
      OverloadedRecordFields: mention parent name in 'ambiguous occurrence' error... · 5f6527e0
      Alex D authored and Marge Bot's avatar Marge Bot committed
      OverloadedRecordFields: mention parent name in 'ambiguous occurrence' error for better disambiguation (#17420)
      5f6527e0
    • Ben Gamari's avatar
      testsuite: Add tests for system-cxx-std-lib package · 03efe283
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Test that we can successfully link against C++ code both in GHCi and
      batch compilation.
      
      See #20010
      03efe283
    • Ben Gamari's avatar
      Introduce package to capture dependency on C++ stdlib · 0ef249aa
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we introduce a new "virtual" package into the initial package
      database, `system-cxx-std-lib`. This gives users a convenient, platform
      agnostic way to link against C++ libraries, addressing #20010.
      
      Fixes #20010.
      0ef249aa
    • Ben Gamari's avatar
      testsuite: Build T20918 with HC, not CXX · 43628ed4
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      43628ed4
    • Ben Gamari's avatar
      driver: Introduce pgmcxx · fb579e15
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we introduce proper support for compilation of C++ objects. This
      includes:
      
       * logic in `configure` to detect the C++ toolchain and propagating this
         information into the `settings` file
       * logic in the driver to use the C++ toolchain when compiling C++
         sources
      fb579e15
  6. May 16, 2022
  7. May 14, 2022
Loading