1. 14 Dec, 2018 11 commits
  2. 13 Dec, 2018 13 commits
  3. 12 Dec, 2018 3 commits
    • Simon Peyton Jones's avatar
      Remove dead code · f0eb404e
      Simon Peyton Jones authored
      This is a follow-up to
       d77501cd Improvements to demand analysis
      
      I forgot to remove some now-dead code
      f0eb404e
    • Simon Peyton Jones's avatar
      Improvements to demand analysis · d77501cd
      Simon Peyton Jones authored
      This patch collects a few improvements triggered by Trac #15696,
      and fixing Trac #16029
      
      * Stop making toCleanDmd behave specially for unlifted types.
        This special case was the cause of stupid behaviour in Trac
        #16029.  And to my joy I discovered the let/app invariant
        rendered it unnecessary.  (Maybe the special case pre-dated
        the let/app invariant.)
      
        Result: less special-case handling in the compiler, and
        better perf for the compiled code.
      
      * In WwLib.mkWWstr_one, treat seqDmd like U(AAA).  It was not
        being so treated before, which again led to stupid code.
      
      * Update and improve Notes
      
      There are .stderr test wibbles because we get slightly different
      strictness signatures for an argumment of unlifted type:
          <L,U> rather than <S,U>        for Int#
          <S,U> rather than <S(S),U(U)>  for Int
      d77501cd
    • Ömer Sinan Ağacan's avatar
      ded4a1db
  4. 11 Dec, 2018 13 commits
    • Ben Gamari's avatar
      testsuite: Mark linkwhole as broken on FreeBSD · 65fb69b7
      Ben Gamari authored
      See #16035.
      65fb69b7
    • Ben Gamari's avatar
      847e8b60
    • Ben Gamari's avatar
      testsuite: Skip T703 on non-Linux platforms · 4faab14b
      Ben Gamari authored
      While the test is in principle applicable to many platforms, the current
      implementation requires readelf, which we can only assume is present on
      ELF-based platforms (e.g. Linux).
      
      See Trac #703.
      4faab14b
    • Ben Gamari's avatar
      testsuite: Don't use sed -i in T15369 · e98d2206
      Ben Gamari authored
      BSD sed doesn't allow use of sed -i on symlinks and the source file is symlinked
      into place.
      e98d2206
    • Ben Gamari's avatar
      testsuite: Ensure that unregisterised function is called · 003ab6a1
      Ben Gamari authored
      Strangely the previous formulation works locally and under CircleCI but fails on
      another machine. Odd.
      003ab6a1
    • Shayne Fletcher's avatar
      Enable rebindable fail with overloaded strings · 8a4edd15
      Shayne Fletcher authored
      Summary: enable rebindable fail with overloaded strings
      
      Reviewers: bgamari, simonpj
      
      Reviewed By: bgamari, simonpj
      
      Subscribers: simonpj, ndmitchell, rwbarton, carter
      
      GHC Trac Issues: #15645
      
      Differential Revision: https://phabricator.haskell.org/D5251
      8a4edd15
    • Zejun Wu's avatar
      Explicitly pass -fno-PIC to C compiler on linux · c98e25a4
      Zejun Wu authored
      Recent gcc on some linux ditributions may have -fPIC on by default
      
      ```
      $ uname -a
      Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28
      20:45:30 CEST 2018 i686 GNU/Linux
      $ gcc --version
      gcc (GCC) 7.3.1 20180312
      $ touch dummy.c
      $ gcc -Q -v dummy.c 2>&1 | grep PIC
      options enabled:  -fPIC -fPIE -faggressive-loop-optimizations
      ```
      
      This results in following error for i686:
      
      ```
      $ TEST=T13366 make test
      ...
      c-iserv.bin:
      /home/watashi/github/ghc/libraries/ghc-prim/dist-install/build/HSghc-pri
      m-0.5.3.o:
      unknown symbol `_GLOBAL_OFFSET_TABLE_'
      ghc-stage2: unable to load package `ghc-prim-0.5.3'
      ...
      ```
      
      As our runtime linker doesn't support R_386_GOTPC relocations at all
      (#15847).
      Also while we don't have such problem on x86_64, it's not desired to
      build PIC objects either.
      
      Test Plan: `TEST=T13366 make test` passed on
      {rGHC82a716431cc680392e332bc2b1a1fd0d7faa4cd8}
      
      Reviewers: simonmar, bgamari, austin
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15848
      
      Differential Revision: https://phabricator.haskell.org/D5288
      c98e25a4
    • Ben Gamari's avatar
      testsuite: Add tests for #15270 · 18b74cdb
      Ben Gamari authored
      Reviewers: alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5216
      18b74cdb
    • Alec Theriault's avatar
      Support generating HIE files · f582379d
      Alec Theriault authored
      Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie`
      files (see the wiki page:
      https://ghc.haskell.org/trac/ghc/wiki/HIEFiles).
      
      This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for
      his GSOC project, as posted here:
      https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi
      
      Reviewed By: alanz, sjakobi
      
      Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter
      
      Differential Revision: https://phabricator.haskell.org/D5239
      f582379d
    • awson's avatar
      RTS linker: don't crash early when not finding extra-libraries · 21339c9f
      awson authored
      Allow GHCi to not crash when no assumed DLL is found in the standard
      location.  E.g. when loading the package built "dyn" way, we may well
      have the package's DLL around, and it's the system linker which loads
      necessary dependencies.
      
      Why does this (partially) fix #11042? It's because we often (and when
      having packages built `dyn` way -- almost always) don't need to load
      anything recorded in the `extra-libraries` stanza, since if the package
      DLL exists, GHCi linker simply calls the system linker (via `dlopen`/
      `LoadLibrary` APIs) to load it and doesn't bother to load package
      prelinked object file (if any) or package static library.
      
      Thus, all "regular" (with no fancy low-level package content
      manipulation) packages built "dyn" way should be OK after this fix.
      
      Reviewers: hvr, bgamari, int-index
      
      Reviewed By: bgamari, int-index
      
      Subscribers: Phyx, int-index, rwbarton, carter
      
      GHC Trac Issues: #11042
      
      Differential Revision: https://phabricator.haskell.org/D5170
      21339c9f
    • Ben Gamari's avatar
      dmdAnal: Move handling of datacon strictness to mkWWstr_one · d549c081
      Ben Gamari authored
      Previously datacon strictness was accounted for when we demand analysed a case
      analysis. However, this results in pessimistic demands in some cases. For
      instance, consider the program (from T10482)
      
          data family Bar a
          data instance Bar (a, b) = BarPair !(Bar a) !(Bar b)
          newtype instance Bar Int = Bar Int
      
          foo :: Bar ((Int, Int), Int) -> Int -> Int
          foo f k =
            case f of
              BarPair x y -> case burble of
                                True -> case x of
                                          BarPair p q -> ...
                                False -> ...
      
      We really should be able to assume that `p` is already evaluated since it came
      from a strict field of BarPair.
      
      However, as written the demand analyser can not conclude this since we may end
      up in the False branch of the case on `burble` (which places no demand on `x`).
      By accounting for the data con strictness later, applied to the demand of the
      RHS, we get the strict demand signature we want.
      
      See Note [Add demands for strict constructors] for a more comprehensive
      discussion.
      
      Test Plan: Validate
      
      Reviewers: simonpj, osa1, goldfire
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15696
      
      Differential Revision: https://phabricator.haskell.org/D5226
      d549c081
    • Peter Trommler's avatar
      PPC NCG: Generate MO_?_QuotRem for subword sizes · 9e7d58c8
      Peter Trommler authored
      Handle Int*QuotRemOP and Word*QuotRemOp in PPC NCG.
      Refactor common code with remainder operation.
      
      Test Plan: validate (I validated on Linux powerpc64le and x86_64)
      
      Reviewers: erikd, hvr, bgamari, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5323
      9e7d58c8
    • Daniel Gröber (dxld)'s avatar
      Support registering Plugins through the GHC API · da05d79d
      Daniel Gröber (dxld) authored
      This allows tooling using the GHC API to use plugins internally.
      Hopefully this will make it possible to decouple the development of
      useful plugins from (currently) kitchen-sink type tooling projects
      such as ghc-mod or HIE -- at least to some extent.
      
      Test Plan: validate
      
      Reviewers: bgamari, mpickering
      
      Subscribers: mpickering, alanz, rwbarton, carter
      
      GHC Trac Issues: #15826
      
      Differential Revision: https://phabricator.haskell.org/D5278
      da05d79d