1. 31 May, 2016 2 commits
  2. 30 May, 2016 1 commit
  3. 28 May, 2016 1 commit
  4. 27 May, 2016 8 commits
    • thomie's avatar
      Testsuite: don't use --interactive in Makefiles · d40682ec
      thomie authored
      Add a linter to encourage the use of `$(TEST_HC_OPTS_INTERACTIVE)`
      instead of `$(TEST_HC_OPTS) --interactive -ignore-dot-ghci -v0`. It's
      too easy to forget one of those flags when adding a new test.
      
      Update submodule hpc.
      
      Reviewed by: austin
      
      Differential Revision: https://phabricator.haskell.org/D2265
      
      GHC Trac Issues: #11468
      d40682ec
    • Ryan Scott's avatar
      Clarify users' guide section on GeneralizedNewtypeDeriving · d0dd572b
      Ryan Scott authored
      Summary:
      It seemed to imply that GHC was generating infelicitous code when it
      actually wasn't. Fixes #12047.
      
      Reviewers: hvr, bgamari, austin
      
      Reviewed By: austin
      
      Subscribers: thomie, Iceland_jack
      
      Differential Revision: https://phabricator.haskell.org/D2273
      
      GHC Trac Issues: #12047
      d0dd572b
    • Gabor Greif's avatar
      Typos in comments · 3f20da1c
      Gabor Greif authored
      3f20da1c
    • Ömer Sinan Ağacan's avatar
      Do not init record accessors as exported · 3a00ff92
      Ömer Sinan Ağacan authored
      This was causing redundant code generation when accessors are not
      actually exported, as they were being marked as "exported" at
      initialization.
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2270
      3a00ff92
    • Ömer Sinan Ağacan's avatar
      StgCmmExpr: Remove a redundant list · 59250dce
      Ömer Sinan Ağacan authored
      59250dce
    • Simon Peyton Jones's avatar
      Comments and white space only · 72fd407e
      Simon Peyton Jones authored
      72fd407e
    • Simon Peyton Jones's avatar
      More fixes for unboxed tuples · b43a7936
      Simon Peyton Jones authored
      This is a continuation of
         commit e9e61f18
         Date:   Thu May 26 15:24:53 2016 +0100
         Reduce special-casing for nullary unboxed tuple
      
      which related to Trac #12115.  But typecheck/should_run/tcrun051
      revealed that my patch was incomplete.
      
      This fixes it, by removing another special case in Type.repType.
      I had also missed a case in UnariseStg.unariseIdBinder.
      
      I took the opportunity to add explanatory notes
        Note [Unarisation]
        Note [Unarisation and nullary tuples]
      in UnariseStg
      b43a7936
    • Ömer Sinan Ağacan's avatar
      StgCmmCon: Do not generate moves from unused fields to local variables · cd50d236
      Ömer Sinan Ağacan authored
      Say we have a record like this:
      
          data Rec = Rec
            { f1 :: Int
            , f2 :: Int
            , f3 :: Int
            , f4 :: Int
            , f5 :: Int
            }
      
      Before this patch, the code generated for `f1` looked like this:
      
          f1_entry()
              {offset
                 ...
                 cJT:
                     _sI6::P64 = R1;
                     _sI7::P64 = P64[_sI6::P64 + 7];
                     _sI8::P64 = P64[_sI6::P64 + 15];
                     _sI9::P64 = P64[_sI6::P64 + 23];
                     _sIa::P64 = P64[_sI6::P64 + 31];
                     _sIb::P64 = P64[_sI6::P64 + 39];
                     R1 = _sI7::P64 & (-8);
                     Sp = Sp + 8;
                     call (I64[R1])(R1) args: 8, res: 0, upd: 8;
              }
      
      Note how all fields of the record are moved to local variables, even though
      they're never used. These moves make it to the final assembly:
      
          f1_info:
              ...
          _cJT:
              movq 7(%rbx),%rax
              movq 15(%rbx),%rcx
              movq 23(%rbx),%rcx
              movq 31(%rbx),%rcx
              movq 39(%rbx),%rbx
              movq %rax,%rbx
              andq $-8,%rbx
              addq $8,%rbp
              jmp *(%rbx)
      
      With this patch we stop generating these move instructions. Cmm becomes this:
      
          f1_entry()
              {offset
                 ...
                 cJT:
                     _sI6::P64 = R1;
                     _sI7::P64 = P64[_sI6::P64 + 7];
                     R1 = _sI7::P64 & (-8);
                     Sp = Sp + 8;
                     call (I64[R1])(R1) args: 8, res: 0, upd: 8;
              }
      
      Assembly becomes this:
      
          f1_info:
              ...
          _cJT:
              movq 7(%rbx),%rax
              movq %rax,%rbx
              andq $-8,%rbx
              addq $8,%rbp
              jmp *(%rbx)
      
      It turns out CmmSink already optimizes this, but it's better to generate
      better code in the first place.
      
      Reviewers: simonmar, simonpj, austin, bgamari
      
      Reviewed By: simonmar, simonpj
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2269
      cd50d236
  5. 26 May, 2016 4 commits
  6. 25 May, 2016 7 commits
  7. 24 May, 2016 16 commits
  8. 23 May, 2016 1 commit
    • Ben Gamari's avatar
      Revert "compiler/iface: compress .hi files" · 9bb27726
      Ben Gamari authored
      This appears to cause validation issues on,
      
          TEST="T11108 T9071 T11076 T7600 T7672 T8329 T10420 T10322 T8308 T4114a
          T4114c T10602 T10110 T9204 T2435 T9838 T4114d T10233 T8696 T1735 T5281
          T6056 T10134 T9580 T6018 T9762 T8103"
      
      With compiler panics of the form,
      
          Compile failed (status 256) errors were:
          ghc: panic! (the 'impossible' happened)
            (GHC version 8.1.20160523 for x86_64-unknown-linux):
                  Binary.readBinMem: decompression failed
          CallStack (from HasCallStack):
            error, called at compiler/utils/Binary.hs:192:16 in ghc:Binary
      
          Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
      
      This reverts commit d9cb7a8a.
      9bb27726