1. 07 Sep, 2019 1 commit
    • Ömer Sinan Ağacan's avatar
      Minor refactoring in deriveConstants · 821bece9
      Ömer Sinan Ağacan authored
      Mainly we now generate this
      
          data PlatformConstants = PlatformConstants {
                pc_CONTROL_GROUP_CONST_291 :: Int,
                pc_STD_HDR_SIZE :: Int,
                pc_PROF_HDR_SIZE :: Int,
                pc_BLOCK_SIZE :: Int,
            }
      
      instead of
      
          data PlatformConstants = PlatformConstants {
              pc_platformConstants :: ()
              , pc_CONTROL_GROUP_CONST_291 :: Int
              , pc_STD_HDR_SIZE :: Int
              , pc_PROF_HDR_SIZE :: Int
              , pc_BLOCK_SIZE :: Int
              ...
            }
      
      The first field has no use and according to (removed) comments it was to
      make code generator's work easier.. if anything this version is simpler
      because it has less repetition (the commas in strings are gone).
      821bece9
  2. 05 Sep, 2019 2 commits
  3. 02 Sep, 2019 2 commits
  4. 01 Sep, 2019 1 commit
  5. 31 Aug, 2019 2 commits
    • Ömer Sinan Ağacan's avatar
      Remove redundant special case in STG pretty-printer · e56251f6
      Ömer Sinan Ağacan authored
      This special case existed for no reason, and made things inconsistent.
      
      Before
      
          Boolean.$bT :: Boolean.Boolean
          [GblId, Str=m, Unf=OtherCon []] =
              CAF_ccs  \ u  []  Boolean.$bT1;
      
      After
      
          Boolean.$bF :: Boolean.Boolean
          [GblId, Str=m, Unf=OtherCon []] =
              \u [] Boolean.$bF1;
      
      The cost-centre is now hidden when not profiling, as is the case with
      other types of closures.
      e56251f6
    • Eric Wolf's avatar
      Add additional step to T16804 · 7e6aeb13
      Eric Wolf authored
      Add another small test step
      
      Use the same identifier name in different
      scopes and see, if ':uses' handles that.
      
      Add another test step
      
      to check wether local bindings with the
      same identifier name might get confused
      
      Add easier to understand test output
      
      Fix annotated lines from file correctly
      7e6aeb13
  6. 30 Aug, 2019 2 commits
  7. 29 Aug, 2019 5 commits
    • Ömer Sinan Ağacan's avatar
      Small optimization in the SRT algorithm · 304067a0
      Ömer Sinan Ağacan authored
      Noticed by @simonmar in !1362:
      
          If the srtEntry is Nothing, then it should be safe to omit
          references to this SRT from other SRTs, even if it is a static
          function.
      
      When updating SRT map we don't omit references to static functions (see
      Note [Invalid optimisation: shortcutting]), but there's no reason to add
      an SRT entry for a static function if the function is not CAFFY.
      
      (Previously we'd add SRT entries for static functions even when they're
      not CAFFY)
      
      Using 9151b99e I checked sizes of all SRTs when building GHC and
      containers:
      
      - GHC: 583736 (HEAD), 581695 (this patch). 2041 less SRT entries.
      - containers: 2457 (HEAD), 2381 (this patch). 76 less SRT entries.
      304067a0
    • Ben Gamari's avatar
      gitlab-ci: Fix URL of Darwin's cabal-install tarball · fc746e98
      Ben Gamari authored
      This was inadvertently referring to the cabal-install-latest/ directory
      which is volatile.
      fc746e98
    • Ömer Sinan Ağacan's avatar
      Fix LLVM version check yet again · bf9dfe1c
      Ömer Sinan Ağacan authored
      There were two problems with LLVM version checking:
      
      - The parser would only parse x and x.y formatted versions. E.g. 1.2.3
        would be rejected.
      
      - The version check was too strict and would reject x.y formatted
        versions. E.g. when we support version 7 it'd reject 7.0 ("LLVM
        version 7.0") and only accept 7 ("LLVM version 7").
      
      We now parse versions with arbitrarily deep minor numbering (x.y.z.t...)
      and accept versions as long as the major version matches the supported
      version (e.g. 7.1, 7.1.2, 7.1.2.3 ...).
      bf9dfe1c
    • Luca Zulian's avatar
      Remove Unused flag -ddump-shape [skip ci] · 66282ba5
      Luca Zulian authored
      66282ba5
    • Ryan Scott's avatar
      Balance parentheses in GHC 8.10.1 release notes · 137c24e1
      Ryan Scott authored
      [ci skip]
      137c24e1
  8. 28 Aug, 2019 2 commits
    • Sebastian Graf's avatar
      Fix #17112 · a308b435
      Sebastian Graf authored
      The `mkOneConFull` function of the pattern match checker used to try to
      guess the type arguments of the data type's type constructor by looking
      at the ambient type of the match. This doesn't work well for Pattern
      Synonyms, where the result type isn't even necessarily a TyCon
      application, and it shows in #11336 and #17112.
      
      Also the effort seems futile; why try to try hard when the type checker
      has already done the hard lifting? After this patch, we instead supply
      the type constructors arguments as an argument to the function and
      lean on the type-annotated AST.
      a308b435
    • Ömer Sinan Ağacan's avatar
      Return results of Cmm streams in backends · 1c7ec449
      Ömer Sinan Ağacan authored
      This generalizes code generators (outputAsm, outputLlvm, outputC, and
      the call site codeOutput) so that they'll return the return values of
      the passed Cmm streams.
      
      This allows accumulating data during Cmm generation and returning it to
      the call site in HscMain.
      
      Previously the Cmm streams were assumed to return (), so the code
      generators returned () as well.
      
      This change is required by !1304 and !1530.
      
      Skipping CI as this was tested before and I only updated the commit
      message.
      
      [skip ci]
      1c7ec449
  9. 27 Aug, 2019 3 commits
  10. 23 Aug, 2019 4 commits
    • Sergei Trofimovich's avatar
      configure.ac: fix '--disable-dwarf-debug' · cff44d86
      Sergei Trofimovich authored
      Before the change
          ./configure --disable-dwarf-debug
      enabled DWARF debugging unconditionally.
      
      This happened due to use of 5-argument form of `AC_ARG_ENABLE`
      without actually checking the passed  `$enableval` parameter:
      
      ```
      AC_ARG_ENABLE(dwarf-unwind,
          [AC_HELP_STRING([--enable-dwarf-unwind],
              [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])],
          [AC_CHECK_LIB(dw, dwfl_attach_state,
            [UseLibdw=YES],
            [AC_MSG_ERROR([Cannot find system libdw (required by --enable-dwarf-unwind)])])]
          [UseLibdw=NO]
      )
      ```
      
      Note:
      
      - `[UseLibdw=NO]` is called when `--{enable,disable}-dwarf-unwind`
        is not passed at all as a parameter (ok).
      - `[AC_CHECK_LIB(dw, dwfl_attach_state, [UseLibdw=YES],` is called
        for both:
      
        * `--enable-dwarf-unwind` being passed: `$enableval = "yes"` (ok).
        *  --disable-dwarf-unwind` being passed: `$enableval = "no"` (bad).
      
      The change is to use 3-argument `AC_ARG_ENABLE` and check for passed
      value as `"$enable_dwarf_unwind" = "yes"`.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      cff44d86
    • Andreas Klebinger's avatar
      Use variable length encoding for Binary instances. · 47070144
      Andreas Klebinger authored
      Use LEB128 encoding for Int/Word variants. This reduces
      the size of interface files significantly. (~19%).
      
      Also includes a few small optimizations to make unboxing
      work better that I have noticed while looking at the core.
      47070144
    • Ömer Sinan Ağacan's avatar
      Make non-streaming LLVM and C backends streaming · a8300520
      Ömer Sinan Ağacan authored
      This adds a Stream.consume function, uses it in LLVM and C code
      generators, and removes the use of Stream.collect function which was
      used to collect streaming Cmm generation results into a list.
      
      LLVM and C backends now properly use streamed Cmm generation, instead of
      collecting Cmm groups into a list before generating LLVM/C code.
      a8300520
    • Ömer Sinan Ağacan's avatar
      Remove special case in SRT generation with -split-sections · c3e26ab3
      Ömer Sinan Ağacan authored
      Previously we were using an empty ModuleSRTInfo for each Cmm group with
      -split-section. As far as I can see this has no benefits, and
      simplifying this makes another patch simpler (!1304).
      
      We also remove some outdated comments: we no longer generate one
      module-level SRT.
      c3e26ab3
  11. 22 Aug, 2019 4 commits
  12. 19 Aug, 2019 5 commits
  13. 18 Aug, 2019 5 commits
  14. 16 Aug, 2019 2 commits