1. 14 Dec, 2018 3 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
    • 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
    • Ömer Sinan Ağacan's avatar
  4. 11 Dec, 2018 21 commits
    • Ben Gamari's avatar
      testsuite: Mark linkwhole as broken on FreeBSD · 65fb69b7
      Ben Gamari authored
      See #16035.
    • Ben Gamari's avatar
    • 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.
    • 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.
    • 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.
    • 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
    • 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
      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
      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
      Reviewers: simonmar, bgamari, austin
      Reviewed By: simonmar
      Subscribers: rwbarton, carter
      GHC Trac Issues: #15848
      Differential Revision: https://phabricator.haskell.org/D5288
    • 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
    • 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:
      This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for
      his GSOC project, as posted here:
      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
    • 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.ha...
    • 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
      Test Plan: Validate
      Reviewers: simonpj, osa1, goldfire
      Subscribers: rwbarton, carter
      GHC Trac Issues: #15696
      Differential Revision: https://phabricator.haskell.org/D5226
    • 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
    • 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
    • Peter Trommler's avatar
      PPC NCG: Implement MachOps for smaller sizes · 9e763afa
      Peter Trommler authored
      Generate code for MachOps with smaller than wordsize data.
      Refactor conversion MachOps.
      Fixes #15854
      Test Plan: validate (I validated on powerpc64le and x86_64 Linux)
      Reviewers: bgamari, hvr, erikd, simonmar
      Subscribers: rwbarton, carter
      GHC Trac Issues: #15854
      Differential Revision: https://phabricator.haskell.org/D5300
    • Roland Senn's avatar
      Misleading msg with qualified imports "No module named X imported" · 4c174ddd
      Roland Senn authored
      To check whether a given module has been imported, we do the following:
      From the list of all qualified names we extract the distinct module
      names to a list of module names.
      Then we check whether the given module name is in this list of module
      Test Plan: make test TEST=T14225
      Reviewers: mpickering, hvr, monoidal, osa1, bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, carter
      GHC Trac Issues: #14225
      Differential Revision: https://phabricator.haskell.org/D5331
    • David Eichmann's avatar
      Do not save performance test results if worktree is dirty. · 54ee148c
      David Eichmann authored
      Reviewers: bgamari, tdammers
      Reviewed By: bgamari, tdammers
      Subscribers: rwbarton, carter
      GHC Trac Issues: #15924
      Differential Revision: https://phabricator.haskell.org/D5368
    • Simon Marlow's avatar
      Fix recompilation bug with default class methods (#15970) · 288f681e
      Simon Marlow authored
      If a module uses a class, then it can instantiate the class and
      thereby use its default methods, so we must include the default
      methods when calculating the fingerprint for the class.
      Test Plan:
      New unit test: driver/T15970
      =====> T15970(normal) 1 of 1 [0, 0, 0]
      cd "T15970.run" && $MAKE -s --no-print-directory T15970
      Wrong exit code for T15970()(expected 0 , actual 2 )
      Stdout ( T15970 ):
      Makefile:13: recipe for target 'T15970' failed
      Stderr ( T15970 ):
      C.o:function Main_zdfTypeClassMyDataType1_info: error: undefined
      reference to 'A_toTypedData2_closure'
      C.o:function Main_main1_info: error: undefined reference to
      C.o(.data+0x298): error: undefined reference to 'A_toTypedData2_closure'
      C.o(.data+0x480): error: undefined reference to 'A_toTypedData2_closure'
      collect2: error: ld returned 1 exit status
      `gcc' failed in phase `Linker'. (Exit code: 1)
      After: test passes.
      Reviewers: bgamari, simonpj, erikd, watashi, afarmer
      Subscribers: rwbarton, carter
      GHC Trac Issues: #15970
      Differential Revision: https://phabricator.haskell.org/D5394
    • Zejun Wu's avatar
      Fix uninformative hp2ps error when the cmdline contains double quotes · 0136906c
      Zejun Wu authored
      Reapply D5346 with fix incompatible shell quoting in tests. It seems
      like `$'string'` is not recognized under all test environments, so let's
      avoid it in tests.
      Test Plan:
      hp2ps: "T15904".hp, line 2: integer must follow identifier
      use new ghc and hp2ps to profile a simple program.
      Reviewers: simonmar, bgamari, erikd, tdammers
      Reviewed By: bgamari
      Subscribers: tdammers, carter, rwbarton
      GHC Trac Issues: #15904
      Differential Revision: https://phabricator.haskell.org/D5388
    • Zejun Wu's avatar
      cosmetic change: expandtab in utils/hp2ps/HpFile.c · 0ff5ecfb
      Zejun Wu authored
      rGHCbba2b9bf2d69700dc114118658507aaac34c5e62 expand tabs in
      utils/hp2ps/HpFile.c with tabwidth 2, but the code was written as
      tabwidth 8.  This change simply retabs the code with tabwidth 8 and
      removes trailing spaces.
      Test Plan: Tested in stacked diff: {D5388}
      Reviewers: simonmar, bgamari, afarmer, tdammers
      Reviewed By: simonmar
      Subscribers: rwbarton, carter
      Differential Revision: https://phabricator.haskell.org/D5407
    • Alp Mestanogullari's avatar
      circleci: ignore gitlab branches for all jobs in the validate workflow · d7cb230a
      Alp Mestanogullari authored
      Our previous attempt ended up breaking the CircleCI config, but
      this one has been tested, see:
      which shows the builds getting triggered correctly. I also pushed the same
      branch under 'gitlab/alp/test', and that didn't trigger any build, as desired.
      Reviewers: bgamari
      Subscribers: rwbarton, carter
      Differential Revision: https://phabricator.haskell.org/D5429
    • Alp Mestanogullari's avatar
      Hadrian: ability to run a subset of the testsuite · a5e76a07
      Alp Mestanogullari authored
      This was supposed to be working already but didn't work when we
      specified several tests with --only. This patch not only fixes this
      but also makes it possible to specify a subset of tests to run with the
      TEST environment variable, like the make build system. Here are some
          hadrian/build.sh test --only=plugins01
          hadrian/build.sh test --only="plugins01 plugins02"
          TEST="plugins01 plugins02" hadrian/build.sh test
          TEST=plugins03 hadrian/build.sh test --only="plugins01 plugins02"
      When both the TEST environment variable and the --only flag are used,
      we simply concatenate the list of tests from both sources and ask the
      testsuite driver to run them all.
      This patch addresses #16026.
      Test Plan: hadrian/build.sh test --only="plugins01 plugins02"
      Reviewers: bgamari, snowleopard
      Reviewed By: bgamari, snowleopard
      Subscribers: rwbarton, carter
      GHC Trac Issues: #16026
      Differential Revision: https://phabricator.haskell.org/D5431