1. 22 Dec, 2021 3 commits
    • Alan Zimmerman's avatar
      Fix panic trying to -ddump-parsed-ast for implicit fixity · 09b6cb45
      Alan Zimmerman authored and  Marge Bot's avatar Marge Bot committed
      A declaration such as
      
          infixr ++++
      
      is supplied with an implicit fixity of 9 in the parser, but uses
      an invalid SrcSpan to capture this. Use of this span triggers a panic.
      
      Fix the problem by not recording an exact print annotation for the
      non-existent fixity source.
      
      Closes #20846
      09b6cb45
    • Matthew Pickering's avatar
      ci: Fix master CI · d7cc8f19
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      I made a mistake in the bash script so there were errors about
      "$CI_MERGE_REQUEST_DIFF_BASE_SHA" not existing.
      d7cc8f19
    • doyougnu's avatar
      Cmm: DynFlags to CmmConfig refactor · 1a596d06
      doyougnu authored and  Marge Bot's avatar Marge Bot committed
      add files GHC.Cmm.Config, GHC.Driver.Config.Cmm
      
      Cmm: DynFlag references --> CmmConfig
      
      Cmm.Pipeline: reorder imports, add handshake
      
      Cmm: DynFlag references --> CmmConfig
      
      Cmm.Pipeline: DynFlag references --> CmmConfig
      
      Cmm.LayoutStack: DynFlag references -> CmmConfig
      
      Cmm.Info.Build: DynFlag references -> CmmConfig
      
      Cmm.Config: use profile to retrieve platform
      
      Cmm.CLabel: unpack NCGConfig in labelDynamic
      
      Cmm.Config: reduce CmmConfig surface area
      
      Cmm.Config: add cmmDoCmmSwitchPlans field
      
      Cmm.Config: correct cmmDoCmmSwitchPlans flag
      
      The original implementation dispatches work in cmmImplementSwitchPlans
      in an `otherwise` branch, hence we must add a not to correctly dispatch
      
      Cmm.Config: add cmmSplitProcPoints simplify Config
      
      remove cmmBackend, and cmmPosInd
      
      Cmm.CmmToAsm: move ncgLabelDynamic to CmmToAsm
      
      Cmm.CLabel: remove cmmLabelDynamic function
      
      Cmm.Config: rename cmmOptDoLinting -> cmmDoLinting
      
      testsuite: update CountDepsAst CountDepsParser
      1a596d06
  2. 21 Dec, 2021 8 commits
  3. 18 Dec, 2021 12 commits
    • Matthew Pickering's avatar
      testsuite: Ensure that -dcore-lint is not set for compiler performance tests · 887d8b4c
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      This place ensures that the default -dcore-lint option is disabled by
      default when collect_compiler_stats is used but you can still pass
      -dcore-lint as an additional option (see T1969 which tests core lint
      performance).
      
      Fixes #20830
      
      -------------------------
      Metric Decrease:
          PmSeriesS
          PmSeriesT
          PmSeriesV
          T10858
          T11195
          T11276
          T11374
          T11822
          T14052
          T14052Type
          T17096
          T17836
          T17836b
          T18478
          T18698a
          T18698b
      -------------------------
      887d8b4c
    • Sylvain Henry's avatar
      Perf: avoid using (replicateM . length) when possible · 9529d859
      Sylvain Henry authored and  Marge Bot's avatar Marge Bot committed
      Extracted from !6622
      9529d859
    • Sebastian Graf's avatar
      Demand: `Eq DmdType` modulo `defaultFvDmd` (#20827) · a3552934
      Sebastian Graf authored and  Marge Bot's avatar Marge Bot committed
      Fixes #20827 by filtering out any default free variable demands (as per
      `defaultFvDmd`) prior to comparing the assocs of the `DmdEnv`.
      The details are in `Note [Demand type Equality]`.
      a3552934
    • Cheng Shao's avatar
      Binary: make withBinBuffer safe · 94c3ff66
      Cheng Shao authored and  Marge Bot's avatar Marge Bot committed
      With this patch, withBinBuffer will construct a ByteString that
      properly captures the reference to the BinHandle internal
      MutableByteArray#, making it safe to convert a BinHandle to ByteString
      and use that ByteString outside the continuation.
      94c3ff66
    • Matthew Pickering's avatar
      Expand documentation for MulArrowT constructor · abef93f3
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Fixes #20812
      abef93f3
    • Matthew Pickering's avatar
      Fix documentation formatting in Language.Haskell.TH.CodeDo · fc9b1755
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Fixes #20543
      fc9b1755
    • Matthew Pickering's avatar
      Add regression test for T20189 · 1327c176
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Closes #20189
      1327c176
    • Matthew Pickering's avatar
      ci: Use correct metrics baseline · e04878b0
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      It turns out there was already a function in the CI script to correctly
      set the baseline for performance tests but it was just never called. I
      now call it during the initialisation to set the correct baseline.
      
      I also made the make testsuite driver take into account the
      PERF_BASELINE_COMMIT environment variable
      
      Fixes #20811
      e04878b0
    • Sylvain Henry's avatar
      Perf: inline exprIsCheapX · 3f31bfe8
      Sylvain Henry authored and  Marge Bot's avatar Marge Bot committed
      Allow specialization for the ok_app predicate.
      
      Perf improvements:
      
                                                     Baseline
                                 Test    Metric         value     New value Change
      -----------------------------------------------------------------------------
             ManyAlternatives(normal) ghc/alloc   747317244.0   746444024.0  -0.1%
             ManyConstructors(normal) ghc/alloc  4005046448.0  4001548792.0  -0.1%
            MultiLayerModules(normal) ghc/alloc  3063361000.0  3063178472.0  -0.0%
      MultiLayerModulesRecomp(normal) ghc/alloc   894208428.0   894252496.0  +0.0%
                    PmSeriesG(normal) ghc/alloc    48021692.0    47901592.0  -0.3%
                    PmSeriesS(normal) ghc/alloc    61322504.0    61149008.0  -0.3%
                    PmSeriesT(normal) ghc/alloc    90879364.0    90609048.0  -0.3%
                    PmSeriesV(normal) ghc/alloc    60155376.0    59983632.0  -0.3%
                       T10421(normal) ghc/alloc   112820720.0   112517208.0  -0.3%
                      T10421a(normal) ghc/alloc    78783696.0    78557896.0  -0.3%
                       T10547(normal) ghc/alloc    28331984.0    28354160.0  +0.1%
                       T10858(normal) ghc/alloc   180715296.0   180226720.0  -0.3%
                       T11195(normal) ghc/alloc   284139184.0   283981048.0  -0.1%
                       T11276(normal) ghc/alloc   137830804.0   137688912.0  -0.1%
                      T11303b(normal) ghc/alloc    44080856.0    43956152.0  -0.3%
                       T11374(normal) ghc/alloc   249319644.0   249059288.0  -0.1%
                       T11545(normal) ghc/alloc   971507488.0   971146136.0  -0.0%
                       T11822(normal) ghc/alloc   131410208.0   131269664.0  -0.1%
                       T12150(optasm) ghc/alloc    78866860.0    78762296.0  -0.1%
                       T12227(normal) ghc/alloc   494467900.0   494138112.0  -0.1%
                       T12234(optasm) ghc/alloc    56781044.0    56588256.0  -0.3%
                       T12425(optasm) ghc/alloc    90462264.0    90240272.0  -0.2%
                       T12545(normal) ghc/alloc  1694316588.0  1694128448.0  -0.0%
                       T12707(normal) ghc/alloc   955665168.0   955005336.0  -0.1%
                       T13035(normal) ghc/alloc   101875160.0   101713312.0  -0.2%
                       T13056(optasm) ghc/alloc   366370168.0   365347632.0  -0.3%
                       T13253(normal) ghc/alloc   333741472.0   332612920.0  -0.3%
                   T13253-spj(normal) ghc/alloc   124947560.0   124427552.0  -0.4%
                       T13379(normal) ghc/alloc   358997996.0   358879840.0  -0.0%
                       T13701(normal) ghc/alloc  2400391456.0  2399956840.0  -0.0%
                       T13719(normal) ghc/alloc  4193179228.0  4192476392.0  -0.0%
                         T14052(ghci) ghc/alloc  2734741552.0  2735731808.0  +0.0%
                     T14052Type(ghci) ghc/alloc  7323235724.0  7323042264.0  -0.0%
                       T14683(normal) ghc/alloc  2990457260.0  2988899144.0  -0.1%
                       T14697(normal) ghc/alloc   363606476.0   363452952.0  -0.0%
                       T15164(normal) ghc/alloc  1291321780.0  1289491968.0  -0.1%
                       T15304(normal) ghc/alloc  1277838020.0  1276208304.0  -0.1%
                       T15630(normal) ghc/alloc   161074632.0   160388136.0  -0.4%
                       T16190(normal) ghc/alloc   276567192.0   276235216.0  -0.1%
                       T16577(normal) ghc/alloc  7564318656.0  7535598656.0  -0.4%
                       T16875(normal) ghc/alloc    34867720.0    34752440.0  -0.3%
                       T17096(normal) ghc/alloc   288477360.0   288156960.0  -0.1%
                       T17516(normal) ghc/alloc  1712777224.0  1704655496.0  -0.5%
                       T17836(normal) ghc/alloc  1092127336.0  1091709880.0  -0.0%
                      T17836b(normal) ghc/alloc    52083516.0    51954056.0  -0.2%
                       T17977(normal) ghc/alloc    44552228.0    44425448.0  -0.3%
                      T17977b(normal) ghc/alloc    40540252.0    40416856.0  -0.3%
                       T18140(normal) ghc/alloc    81908200.0    81678928.0  -0.3%
                       T18223(normal) ghc/alloc  1166459176.0  1164418104.0  -0.2%
                       T18282(normal) ghc/alloc   131123648.0   130740432.0  -0.3%
                       T18304(normal) ghc/alloc    86486796.0    86223088.0  -0.3%
                       T18478(normal) ghc/alloc   746029440.0   745619968.0  -0.1%
                      T18698a(normal) ghc/alloc   337037580.0   336533824.0  -0.1%
                      T18698b(normal) ghc/alloc   398324600.0   397696400.0  -0.2%
                       T18923(normal) ghc/alloc    68496432.0    68286264.0  -0.3%
                        T1969(normal) ghc/alloc   760424696.0   759641664.0  -0.1%
                       T19695(normal) ghc/alloc  1421672472.0  1413682104.0  -0.6%
                       T20049(normal) ghc/alloc    88601524.0    88336560.0  -0.3%
                        T3064(normal) ghc/alloc   190808832.0   190659328.0  -0.1%
                        T3294(normal) ghc/alloc  1604483120.0  1604339080.0  -0.0%
                        T4801(normal) ghc/alloc   296501624.0   296388448.0  -0.0%
                        T5030(normal) ghc/alloc   364336308.0   364206240.0  -0.0%
                      T5321FD(normal) ghc/alloc   270688492.0   270386832.0  -0.1%
                     T5321Fun(normal) ghc/alloc   300860396.0   300559200.0  -0.1%
                        T5631(normal) ghc/alloc   575822760.0   575579160.0  -0.0%
                        T5642(normal) ghc/alloc   470243356.0   468988784.0  -0.3%
                        T5837(normal) ghc/alloc    35936468.0    35821360.0  -0.3%
                        T6048(optasm) ghc/alloc   102587024.0   102222000.0  -0.4%
                         T783(normal) ghc/alloc   386539204.0   386003344.0  -0.1%
                        T9020(optasm) ghc/alloc   247435312.0   247324184.0  -0.0%
                        T9198(normal) ghc/alloc    47170036.0    47054840.0  -0.2%
                        T9233(normal) ghc/alloc   677186820.0   676550032.0  -0.1%
                        T9630(normal) ghc/alloc  1456411516.0  1451045736.0  -0.4%
                        T9675(optasm) ghc/alloc   427190224.0   426812568.0  -0.1%
                       T9872a(normal) ghc/alloc  1704660040.0  1704681856.0  +0.0%
                       T9872b(normal) ghc/alloc  2180109488.0  2180130856.0  +0.0%
                       T9872c(normal) ghc/alloc  1760209640.0  1760231456.0  +0.0%
                       T9872d(normal) ghc/alloc   501126052.0   500973488.0  -0.0%
                        T9961(normal) ghc/alloc   353244688.0   353063104.0  -0.1%
         TcPlugin_RewritePerf(normal) ghc/alloc  2387276808.0  2387254168.0  -0.0%
                        WWRec(normal) ghc/alloc   588651140.0   587684704.0  -0.2%
               hard_hole_fits(normal) ghc/alloc   492063812.0   491798360.0  -0.1%
                       hie002(normal) ghc/alloc  9334355960.0  9334396872.0  +0.0%
                   parsing001(normal) ghc/alloc   537410584.0   537421736.0  +0.0%
      
                            geo. mean                                        -0.2%
      3f31bfe8
    • Matthew Pickering's avatar
      testsuite: Format metric results with comma separator · 9d77976d
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      As noted in #20763 the way the stats were printed was quite hard for a
      human to compare. Therefore we now insert the comma separator so that
      they are easier to compare at a glance.
      
      Before:
      
      ```
                                                    Baseline
                               Test    Metric          value      New value Change
      -----------------------------------------------------------------------------
                Conversions(normal) run/alloc       107088.0       107088.0  +0.0%
                 DeriveNull(normal) run/alloc    112050656.0    112050656.0  +0.0%
           InlineArrayAlloc(normal) run/alloc   1600040712.0   1600040712.0  +0.0%
       InlineByteArrayAlloc(normal) run/alloc   1440040712.0   1440040712.0  +0.0%
      InlineCloneArrayAlloc(normal) run/alloc   1600040872.0   1600040872.0  +0.0%
                MethSharing(normal) run/alloc    480097864.0    480097864.0  +0.0%
                     T10359(normal) run/alloc       354344.0       354344.0  +0.0%
      ```
      
      After
      
      ```
                                                       Baseline
                               Test    Metric             value         New value Change
      ----------------------------------------------------------------------------------
                Conversions(normal) run/alloc         107,088         107,088     +0.0%
                 DeriveNull(normal) run/alloc     112,050,656     112,050,656     +0.0%
           InlineArrayAlloc(normal) run/alloc   1,600,040,712   1,600,040,712     +0.0%
       InlineByteArrayAlloc(normal) run/alloc   1,440,040,712   1,440,040,712     +0.0%
      InlineCloneArrayAlloc(normal) run/alloc   1,600,040,872   1,600,040,872     +0.0%
                MethSharing(normal) run/alloc     480,097,864     480,097,864     +0.0%
                     T10359(normal) run/alloc         354,344         354,344     +0.0%
      ```
      
      Closes #20763
      9d77976d
    • Krzysztof Gogolewski's avatar
      Change isUnliftedTyCon to marshalablePrimTyCon (#20401) · 5d5620bc
      Krzysztof Gogolewski authored and  Marge Bot's avatar Marge Bot committed
      isUnliftedTyCon was used in three places: Ticky, Template Haskell
      and FFI checks.
      
      It was straightforward to remove it from Ticky and Template Haskell.
      
      It is now used in FFI only and renamed to marshalablePrimTyCon.
      
      Previously, it was fetching information from a field
      in PrimTyCon called is_unlifted. Instead, I've changed the code
      to compute liftedness based on the kind.
      
      isFFITy and legalFFITyCon are removed. They were only referred from
      an old comment that I removed.
      
      There were three functions to define a PrimTyCon, but the only difference
      was that they were setting is_unlifted to True or False.
      Everything is now done in mkPrimTyCon.
      
      I also added missing integer types in Ticky.hs, I think it was an oversight.
      
      Fixes #20401
      5d5620bc
    • Ben Gamari's avatar
      Regression test for renamer/typechecker performance (#20261) · 3c3e5c03
      Ben Gamari authored and  Marge Bot's avatar Marge Bot committed
      We use the parser generated by stack to ensure reproducibility
      3c3e5c03
  4. 15 Dec, 2021 17 commits