1. 22 May, 2015 3 commits
    • Simon Peyton Jones's avatar
      Fix quadratic behaviour in tidyOccName · c89bd681
      Simon Peyton Jones authored
      In the test program from comment:3 of Trac #10370, it turned out
      that 25% of all compile time was going in OccName.tidyOccName!
      It was all becuase the algorithm for finding an unused OccName
      had a quadratic case.
      This patch fixes it.  THe effect is pretty big:
      	total time  =       34.30 secs   (34295 ticks @ 1000 us, 1 processor)
      	total alloc = 15,496,011,168 bytes  (excludes profiling overheads)
      	total time  =       25.41 secs   (25415 ticks @ 1000 us, 1 processor)
      	total alloc = 11,812,744,816 bytes  (excludes profiling overheads)
    • Simon Peyton Jones's avatar
      Reduce magic for seqId · eae703aa
      Simon Peyton Jones authored
      An upcoming commit means that the RULES for 'seq' get only
      one value arg, not two.  This patch prepares for that by
      - reducing the arity of seq's built-in rule, to take one value arg
      - making 'seq' not inline on the LHS of RULES
      - and removing the horrid un-inlining in DsBinds.decomposeRuleLhs
    • Simon Peyton Jones's avatar
      White space layout only · 369dd0c6
      Simon Peyton Jones authored
  2. 21 May, 2015 3 commits
  3. 20 May, 2015 1 commit
  4. 19 May, 2015 12 commits
  5. 18 May, 2015 8 commits
    • Sergei Trofimovich's avatar
      includes/stg/SMP.h: implement simple load_/store_load_barrier on armv6 and older · eaaa38ba
      Sergei Trofimovich authored
      Assuming there is no real SMP systems on these CPUs
      I've added only compiler barrier (otherwise write_barrier
      and friends need to be fixed as well).
      Patch also fixes build breakage reported in #10244.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      Reviewers: rwbarton, nomeata, austin
      Reviewed By: nomeata, austin
      Subscribers: bgamari, thomie
      Differential Revision: https://phabricator.haskell.org/D894
      GHC Trac Issues: #10244
    • Simon Peyton Jones's avatar
      Make the "matchable-given" check happen first · 228ddb95
      Simon Peyton Jones authored
      This change makes the matchable-given check apply uniformly to
           - constraint tuples
           - natural numbers
           - Typeable
      as well as to vanilla class constraints.
      See Note [Instance and Given overlap] in TcInteract
    • Simon Peyton Jones's avatar
      Refactor tuple constraints · ffc21506
      Simon Peyton Jones authored
      Make tuple constraints be handled by a perfectly ordinary
      type class, with the component constraints being the
          class (c1, c2) => (c2, c2)
      This change was provoked by
        #10359  inability to re-use a given tuple
                constraint as a whole
        #9858   confusion between term tuples
                and constraint tuples
      but it's generally a very nice simplification. We get rid of
       -  In Type, the TuplePred constructor of PredTree,
          and all the code that dealt with TuplePreds
       -  In TcEvidence, the constructors EvTupleMk, EvTupleSel
      See Note [How tuples work] in TysWiredIn.
      Of course, nothing is ever entirely simple. This one
      proved quite fiddly.
      - I did quite a bit of renaming, which makes this patch
        touch a lot of modules. In partiuclar tupleCon -> tupleDataCon.
      - I made constraint tuples known-key rather than wired-in.
        This is different to boxed/unboxed tuples, but it proved
        awkward to have all the superclass selectors wired-in.
        Easier just to use the standard mechanims.
      - While I was fiddling with known-key names, I split the TH Name
        definitions out of DsMeta into a new module THNames.  That meant
        that the known-key names can all be gathered in PrelInfo, without
        causing module loops.
      - I found that the parser was parsing an import item like
            T( .. )
        as a *data constructor* T, and then using setRdrNameSpace to
        fix it.  Stupid!  So I changed the parser to parse a *type
        constructor* T, which means less use of setRdrNameSpace.
        I also improved setRdrNameSpace to behave better on Exact Names.
        Largely on priciple; I don't think it matters a lot.
      - When compiling a data type declaration for a wired-in thing like
        tuples (,), or lists, we don't really need to look at the
        declaration.  We have the wired-in thing!  And not doing so avoids
        having to line up the uniques for data constructor workers etc.
        See Note [Declarations for wired-in things]
      - I found that FunDeps.oclose wasn't taking superclasses into
        account; easily fixed.
      - Some error message refactoring for invalid constraints in TcValidity
      - Haddock needs to absorb the change too; so there is a submodule update
    • Simon Peyton Jones's avatar
      Delete commented-out line · 76024fdb
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Test Trac #10248 · fa0bdd3d
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Test Trac #10403 · f1f265df
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Test Trac #10359 · 3f42de51
      Simon Peyton Jones authored
    • Joachim Breitner's avatar
      CmmCommonBlockElim: Improve hash function · 73f836f5
      Joachim Breitner authored
      Previously, the hash function used to cut down the number of block
      comparisons did not take local registers into account, causing far too
      many similar, but different bocks to be considered candidates for the
      (expensive!) comparision.
      Adding register to the hash takes CmmCommonBlockElim's share of the
      runtime of the example in #10397 from 17% to 2.5%, and eliminates all
      unwanted hash collisions.
      This patch also replaces the fancy trie by a plain Data.Map. It turned
      out to be not performance critical, so this simplifies the code.
      Differential Revision: https://phabricator.haskell.org/D896
  6. 16 May, 2015 2 commits
  7. 15 May, 2015 1 commit
  8. 14 May, 2015 3 commits
  9. 13 May, 2015 7 commits