[GHC] #14738: Investigate performance of CoreTidy

GHC ghc-devs at haskell.org
Tue Jan 30 09:14:37 UTC 2018


#14738: Investigate performance of CoreTidy
-------------------------------------+-------------------------------------
           Reporter:  tdammers       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  performance bug
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #11735 #14683
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Considering the following profile output (compiling
 [https://ghc.haskell.org/trac/ghc/attachment/ticket/14683/Grammar.hs]):
 {{{
         Thu Jan 25 13:11 2018 Time and Allocation Profiling Report
 (Final)

            ghc-stage2 +RTS -p -RTS -B/home/tobias/well-
 typed/devel/ghc/inplace/lib Grammar.hs -ddump-stg -ddump-simpl -ddump-to-
 file -fforce-recomp

         total time  =       20.99 secs   (20989 ticks @ 1000 us, 1
 processor)
         total alloc = 29,250,375,256 bytes  (excludes profiling overheads)

 COST CENTRE           MODULE     SRC
 %time %alloc

 CoreTidy              HscMain    compiler/main/HscMain.hs:1253:27-67
 24.2   28.5
 Stg2Stg               HscMain    compiler/main/HscMain.hs:1489:12-44
 20.3   24.2
 simplCast             Simplify   compiler/simplCore/Simplify.hs:871:62-87
 18.7   15.9
 tc_rn_src_decls       TcRnDriver
 compiler/typecheck/TcRnDriver.hs:(494,4)-(556,7)      9.0    6.9
 addCoerce-pushCoTyArg Simplify
 compiler/simplCore/Simplify.hs:(1236,12)-(1237,72)    7.4    6.4
 subst_ty              TyCoRep    compiler/types/TyCoRep.hs:2237:28-32
 4.3    5.1
 zonkTopDecls          TcRnDriver
 compiler/typecheck/TcRnDriver.hs:(445,16)-(446,43)    1.4    1.1
 coercionKind          Coercion   compiler/types/Coercion.hs:1725:3-7
 1.3    3.0
 simplExprF1-Lam       Simplify   compiler/simplCore/Simplify.hs:896:5-39
 1.0    1.1
 }}}

 ...the amount of time spent in `CoreTidy` is striking, and should be
 investigated.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14738>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list