1. 01 Nov, 2015 16 commits
  2. 31 Oct, 2015 9 commits
  3. 30 Oct, 2015 15 commits
    • Sergei Trofimovich's avatar
      unreg: handle CmmStack in C codegen (unbreaks '-g') · e0071c3a
      Sergei Trofimovich authored
      The patch makes
          $ make test TEST="debug T10667"
      not to fail on CmmStack code generation phase
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
    • Sergei Trofimovich's avatar
    • Sergei Trofimovich's avatar
    • niteria's avatar
      Make type-class dictionary let binds deterministic · a5cb27f3
      niteria authored
      When generating dictionary let binds in dsTcEvBinds we may
      end up generating them in arbitrary order according to Unique order.
      let $dEq = GHC.Classes.$fEqInt in
      let $$dNum = GHC.Num.$fNumInt in ...
      let $dNum = GHC.Num.$fNumInt in
      let $dEq = GHC.Classes.$fEqInt in ...
      The way this change fixes it is by using `UniqDFM` - a type of
      deterministic finite maps of things keyed on `Unique`s. This way when
      you pull out evidence variables corresponding to type-class dictionaries
      they are in deterministic order.
      Currently it's the order of insertion and the way it's implemented is by
      tagging the values with the time of insertion.
      Test Plan:
      I've added a new test case to reproduce the issue.
      Reviewers: ezyang, simonmar, austin, simonpj, bgamari
      Reviewed By: simonmar, simonpj, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1396
      GHC Trac Issues: #4012
    • Matthew Pickering's avatar
      Add failing test for #11039 · fce758c5
      Matthew Pickering authored
      Reviewers: austin, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1406
      GHC Trac Issues: #11039
    • Ben Gamari's avatar
      rts: Make MBLOCK_SPACE_SIZE dynamic · f5974c88
      Ben Gamari authored
      Previously this was introduced in D524 as a compile-time constant.
      Sadly, this isn't flexible enough to allow for environments where
      ulimits restrict the maximum address space size (see, for instance,
      Consequently, we are forced to make this dynamic. In principle this
      shouldn't be so terrible as we can place both the beginning and end
      addresses within the same cache line, likely incurring only one or so
      additional instruction in HEAP_ALLOCED.
      Test Plan: validate
      Reviewers: austin, simonmar
      Reviewed By: simonmar
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1353
      GHC Trac Issues: #10877
    • Edward Z. Yang's avatar
      Reimplement shadowing on a per database basis. · 39b71e81
      Edward Z. Yang authored
      This commit reimplements shadowing on package databases by doing
      the shadowing calculation on a per-database basis: specifically,
      if a later package database shadows a package from the earlier
      databases, we first remove that package (and its transitive
      dependencies) before merging the databases together.
      This should also fix bootstrapping GHC HEAD with HEAD.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: ggreif, bgamari, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1385
    • Ben Gamari's avatar
      Generate Typeable info at definition sites · 91c6b1f5
      Ben Gamari authored
      This is the second attempt at merging D757.
      This patch implements the idea floated in Trac #9858, namely that we
      should generate type-representation information at the data type
      declaration site, rather than when solving a Typeable constraint.
      However, this turned out quite a bit harder than I expected. I still
      think it's the right thing to do, and it's done now, but it was quite
      a struggle.
      See particularly
       * Note [Grand plan for Typeable] in TcTypeable (which is a new module)
       * Note [The overall promotion story] in DataCon (clarifies existing
      The most painful bit was that to generate Typeable instances (ie
      TyConRepName bindings) for every TyCon is tricky for types in ghc-prim
       * We need to have enough data types around to *define* a TyCon
       * Many of these types are wired-in
      Also, to minimise the code generated for each data type, I wanted to
      generate pure data, not CAFs with unpackCString# stuff floating about.
      Three perf/compiler tests start to allocate quite a bit more. This isn't
      surprising, because they all allocate zillions of data types, with
      practically no other code, esp. T1969
       * T1969:    GHC allocates 19% more
       * T4801:    GHC allocates 13% more
       * T5321FD:  GHC allocates 13% more
       * T9675:    GHC allocates 11% more
       * T783:     GHC allocates 11% more
       * T5642:    GHC allocates 10% more
      I'm treating this as acceptable. The payoff comes in Typeable-heavy
      Remaining to do
       * I think that "TyCon" and "Module" are over-generic names to use for
         the runtime type representations used in GHC.Typeable. Better might
         "TrTyCon" and "TrModule". But I have not yet done this
       * Add more info the the "TyCon" e.g. source location where it was
       * Use the new "Module" type to help with Trac Trac #10068
       * It would be possible to generate TyConRepName (ie Typeable
         instances) selectively rather than all the time. We'd need to persist
         the information in interface files. Lacking a motivating reason I
         not done this, but it would not be difficult.
      As is so often the case, I ended up refactoring more than I intended.
      In particular
       * In TyCon, a type *family* (whether type or data) is repesented by a
           * a algebraic data type (including data/newtype instances) is
             represented by AlgTyCon This wasn't true before; a data family
             was represented as an AlgTyCon. There are some corresponding
             changes in IfaceSyn.
           * Also get rid of the (unhelpfully named) tyConParent.
       * In TyCon define 'Promoted', isomorphic to Maybe, used when things are
         optionally promoted; and use it elsewhere in GHC.
       * Cleanup handling of knownKeyNames
       * Each TyCon, including promoted TyCons, contains its TyConRepName, if
         it has one. This is, in effect, the name of its Typeable instance.
      Updates haddock submodule
      Test Plan: Let Harbormaster validate
      Reviewers: austin, hvr, goldfire
      Subscribers: goldfire, thomie
      Differential Revision: https://phabricator.haskell.org/D1404
      GHC Trac Issues: #9858
    • thomie's avatar
      Testsuite: suggest quoting $(TEST_HC) · 59e728bc
      thomie authored
      Test Plan: it works
      Reviewers: bgamari, rwbarton, austin
      Reviewed By: austin
      Subscribers: rwbarton
      Differential Revision: https://phabricator.haskell.org/D1377
    • Sylvain HENRY's avatar
      driver: use PROGBITS type for .debug-ghc-link-info section · f78b477b
      Sylvain HENRY authored
      Previously the `.debug-ghc-link-info` section was of type `SHT_NOTE` but
      this is not compliant with the ELF specification, which requires that
      `NOTE` sections are in a particular record-based format. We mark this
      section as `PROGBITS` instead, which is defined as implying no
      particular format.
      Fixes #11022.
      Reviewers: bgamari, austin
      Reviewed By: bgamari, austin
      Subscribers: thomie, hsyl20
      Differential Revision: https://phabricator.haskell.org/D1375
      GHC Trac Issues: #11022
    • Ben Gamari's avatar
      Move win32 tarball download logic to script · aa289d2a
      Ben Gamari authored
      This allows it to be used by users and packagers to grab the tarballs
      necessary to generate a source tarball.
      Test Plan: try it
      Reviewers: thomie, austin, Phyx
      Reviewed By: thomie, austin, Phyx
      Subscribers: erikd
      Differential Revision: https://phabricator.haskell.org/D1378
    • Ben Gamari's avatar
      Unify: Add Outputable instance for UnifyResultM · 56f9ef41
      Ben Gamari authored
      Reviewers: simonpj, austin
      Reviewed By: austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1389
    • Ömer Sinan Ağacan's avatar
      Insert an empty line between two STG definitions in dump output. · 1c80db59
      Ömer Sinan Ağacan authored
      (Simplifier and desugarer do this already)
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1395
    • Erik de Castro Lopo's avatar
      Linker: Clean up USE_MMAP usage · 3e2c227e
      Erik de Castro Lopo authored
      Test Plan: Validate on powerpc/linux, x86_64/linux and x86_64/darwin
      Reviewers: austin, bgamari, thomie
      Reviewed By: thomie
      Subscribers: Phyx, thomie
      Differential Revision: https://phabricator.haskell.org/D1398
    • Ben Gamari's avatar
      CmmParse: Expose popcnt operations · 42e85284
      Ben Gamari authored
      Make various population count operations available via C-- syntax
      under the names %popcnt{8,16,32,64}. Fixes #11037.
      Reviewers: simonmar, austin, ekmett
      Reviewed By: austin, ekmett
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1402
      GHC Trac Issues: #11037