1. 07 Feb, 2018 2 commits
    • Simon Peyton Jones's avatar
      Comments only · 41d29d5a
      Simon Peyton Jones authored
      41d29d5a
    • Simon Peyton Jones's avatar
      Fix utterly bogus TagToEnum rule in caseRules · 4aa98f4a
      Simon Peyton Jones authored
      In prelRules we had:
      
        tx_con_tte :: DynFlags -> AltCon -> AltCon
        tx_con_tte _      DEFAULT      = DEFAULT
        tx_con_tte dflags (DataAlt dc)
          | tag == 0  = DEFAULT   -- See Note [caseRules for tagToEnum]
          | otherwise = LitAlt (mkMachInt dflags (toInteger tag))
      
      The tag==0 case is totally wrong, and led directly to Trac #14768.
      
      See "Beware" in Note [caseRules for tagToEnum] (in the patch).
      
      Easily fixed, though!
      4aa98f4a
  2. 06 Feb, 2018 10 commits
  3. 05 Feb, 2018 1 commit
  4. 04 Feb, 2018 2 commits
    • Ben Gamari's avatar
      testsuite: Add testcase for #14754 · 606edbfb
      Ben Gamari authored
      606edbfb
    • Ben Gamari's avatar
      cmm: Revert more aggressive CBE due to #14226 · 50adbd7c
      Ben Gamari authored
      Trac #14226 noted that the C-- CBE pass frequently fails to
      common up semantically identical blocks due to the differences in local
      register naming. These patches fixed this by making the pass consider
      equality up to alpha-renaming.
      
      However, the new logic failed to consider the possibility that local
      register naming *may* matter across multiple blocks. This lead to the
      regression #14754. I'll need to do a bit of thinking on a proper
      solution to this but in the meantime I'm reverting all four patches.
      
      This reverts commit a27056f9.
      This reverts commit 6f990c54.
      This reverts commit 9aa73892.
      This reverts commit 7920a7d9.
      50adbd7c
  5. 03 Feb, 2018 3 commits
  6. 02 Feb, 2018 7 commits
  7. 01 Feb, 2018 14 commits
    • Simon Peyton Jones's avatar
      Add -ddump-ds-preopt · efce943c
      Simon Peyton Jones authored
      This allows you to see the output immediately after desugaring
      but before any optimisation.
      
      I've wanted this for some time, but I was triggered into action
      by Trac #13032 comment:9.
      
      Interestingly, the change means that with -dcore-lint we will
      now Lint the output before the very simple optimiser;
      and this showed up Trac #14749.  But that's not the fault
      of -ddump-ds-preopt!
      efce943c
    • Simon Peyton Jones's avatar
      Re-center improved perf for T3064 · db5a4b83
      Simon Peyton Jones authored
      There's a 6% reduction in allocation on T3064.  I think it's due to
      
        commit e4ab65bd
        Author: Tobias Dammers <tdammers@gmail.com>
        Date:   Wed Jan 31 21:39:45 2018 -0500
      
            Optimize coercionKind (Trac #11735)
      
      I'm not certain -- but, hey, it's good news
      db5a4b83
    • Simon Peyton Jones's avatar
      Experiment with eliminating the younger tyvar · 618a805b
      Simon Peyton Jones authored
      This patch is comments only, plus a minor refactor that
      does not change behaviour.
      
      It just records an idea I had for reducing kick-out in the type
      constraint-solver.
      
      See Note [Eliminate younger unification variables] in TcUnify.
      
      Sadly, it didn't improve perf, so I've put it aside, leaving
      some breadcrumbs for future generations of GHC hackers.
      618a805b
    • Tao He's avatar
      UnboxedTuples can't be used as constraints · ced9fbd3
      Tao He authored
      Fixes #14740.
      
      Test Plan: make test TEST="14740"
      
      Reviewers: bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, rwbarton, thomie, carter
      
      GHC Trac Issues: #14740
      
      Differential Revision: https://phabricator.haskell.org/D4359
      ced9fbd3
    • Tobias Dammers's avatar
      Optimize coercionKind (Trac #11735) · e4ab65bd
      Tobias Dammers authored
      Reviewers: simonpj, goldfire, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #11735
      
      Differential Revision: https://phabricator.haskell.org/D4355
      e4ab65bd
    • Andreas Klebinger's avatar
      Mark xmm6 as caller saved in the register allocator for windows. · add4e1f1
      Andreas Klebinger authored
      This prevents the register being picked up as a scratch register.
      Otherwise the allocator would be free to use it before a call. This
      fixes #14619.
      
      Test Plan: ci, repro case on #14619
      
      Reviewers: bgamari, Phyx, erikd, simonmar, RyanGlScott, simonpj
      
      Reviewed By: Phyx, RyanGlScott, simonpj
      
      Subscribers: simonpj, RyanGlScott, Phyx, rwbarton, thomie, carter
      
      GHC Trac Issues: #14619
      
      Differential Revision: https://phabricator.haskell.org/D4348
      add4e1f1
    • Ben Gamari's avatar
      rts: Ensure that forkOS releases Task on termination · 382c12d1
      Ben Gamari authored
      Test Plan: validate
      
      Reviewers: simonmar, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14725
      
      Differential Revision: https://phabricator.haskell.org/D4346
      382c12d1
    • Ryan Scott's avatar
      Sequester deriving-related validity check into cond_stdOK · 1a911f21
      Ryan Scott authored
      Currently, any standalone-derived instance must satisfy the
      property that the tycon of the data type having an instance being
      derived for it must be either a normal ADT tycon or a data family
      tycon. But there are several other primitive tycons—such as `(->)`,
      `Int#`, and others—which cannot have standalone-derived instances
      (via the `anyclass` strategy) as a result of this check! See
      https://ghc.haskell.org/trac/ghc/ticket/13154#comment:8 for an
      example of where this overly conservative restriction bites.
      
      Really, this validity check only makes sense in the context of
      `stock` deriving, where we need the property that the tycon is that
      of a normal ADT or a data family in order to inspect its data
      constructors. Other deriving strategies don't require this validity
      check, so the most sensible way to fix this error is to move the
      logic of this check into `cond_stdOK`, which is specific to
      `stock` deriving.
      
      This makes progress towards fixing (but does not entirely fix)
      
      Test Plan: make test TEST=T13154a
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #13154
      
      Differential Revision: https://phabricator.haskell.org/D4337
      1a911f21
    • takano-akio's avatar
      Implement BlockArguments (#10843) · be84823b
      takano-akio authored
      This patch implements the BlockArguments extension, as proposed at
      https://github.com/ghc-proposals/ghc-proposals/pull/90. It also
      fixes #10855 as a side-effect.
      
      This patch adds a large number of shift-reduce conflicts to the parser.
      All of them concern the ambiguity as to where constructs like `if` and
      `let` end. Fortunately they are resolved correctly by preferring shift.
      
      The patch is based on @gibiansky's ArgumentDo implementation (D1219).
      
      Test Plan: ./validate
      
      Reviewers: goldfire, bgamari, alanz, mpickering
      
      Reviewed By: bgamari, mpickering
      
      Subscribers: Wizek, dfeuer, gibiansky, rwbarton, thomie, mpickering, carter
      
      GHC Trac Issues: #10843, #10855
      
      Differential Revision: https://phabricator.haskell.org/D4260
      be84823b
    • Julian Priestley's avatar
      Don't add targets that can't be found in GHCi · 0bff9e67
      Julian Priestley authored
      When using the :add command in haxlsh/ghci, a module/file that can't
      be found is still added to the list of targets, resulting in an error
      message for the bad module/file for every subsequent usage of the
      command. The add command should verify that the module/file can be
      found before adding it to the list of targets.
      
      Also add a ":show targets" command to show the currently added list of
      commands, and an ":unadd" command to remove a target.
      
      Test Plan:
      Add a new GHCi testcase that checks that :add doesn't remember either
      files or modules that could not be found, and that both the new :show
      and :unadd commands work as expected.
      
      Reviewers: simonmar, bgamari
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14676
      
      Differential Revision: https://phabricator.haskell.org/D4321
      0bff9e67
    • blaze's avatar
      Make RTS keep less memory (fixes #14702) · 0171e09e
      blaze authored
      Currently runtime keeps hold to 4*used_memory. This includes, in
      particular, nursery, which can be quite large on multiprocessor
      machines: 16 CPUs x 64Mb each is 1GB. Multiplying it by 4 means whatever
      actual memory usage is, runtime will never release memory under 4GB, and
      this is quite excessive for processes which only need a lot of memory
      shortly (think building data structures from large files).
      
      This diff makes multiplier to apply only to GC-managed memory, leaving
      all "static" allocations alone.
      
      Test Plan: make test TEST="T14702"
      
      Reviewers: bgamari, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14702
      
      Differential Revision: https://phabricator.haskell.org/D4338
      0171e09e
    • Ben Gamari's avatar
      appveyor: Refactor · 5f922fbb
      Ben Gamari authored
      Move build logic into a dedicated bash script, avoiding repetitive
      bash invocations. Furthermore, disable pacman update step as it breaks
      things in non-predictable ways.
      5f922fbb
    • Ben Gamari's avatar
      testsuite: Fix test output broken by efba0546 · 7d9812e8
      Ben Gamari authored
      Looks right to me.
      7d9812e8
    • Ben Gamari's avatar
      testsuite: Fix test output of T14715 · fe6fdf68
      Ben Gamari authored
      Arguably the warning should just be disabled for this test to eliminate
      unnecessary wiggle in the future.
      fe6fdf68
  8. 31 Jan, 2018 1 commit