1. 02 Dec, 2011 2 commits
    • Simon Marlow's avatar
      More changes aimed at improving call stacks. · 1469f1eb
      Simon Marlow authored
        - Attach a SrcSpan to every CostCentre.  This had the side effect
          that CostCentres that used to be merged because they had the same
          name are now considered distinct; so I had to add a Unique to
          CostCentre to give them distinct object-code symbols.
      
        - New flag: -fprof-auto-calls.  This flag adds an automatic SCC to
          every call site (application, to be precise).  This is typically
          more useful for call stacks than annotating whole functions.
      
      Various tidy-ups at the same time: removed unused NoCostCentre
      constructor, and refactored a bit in Coverage.lhs.
      
      The call stack we get from traceStack now looks like this:
      
      Stack trace:
        Main.CAF (<entire-module>)
        Main.main.xs (callstack002.hs:18:12-24)
        Main.map (callstack002.hs:13:12-16)
        Main.map.go (callstack002.hs:15:21-34)
        Main.map.go (callstack002.hs:15:21-23)
        Main.f (callstack002.hs:10:7-43)
      1469f1eb
    • Simon Marlow's avatar
      remove unused coreExprCc · 6f4bde14
      Simon Marlow authored
      6f4bde14
  2. 01 Dec, 2011 5 commits
  3. 30 Nov, 2011 9 commits
    • Ian Lynagh's avatar
      Fix parsing of OPTIONS*/LANGUAGE pragmas in haddock mode · b3e30449
      Ian Lynagh authored
      When getting options from basicTypes/RdrName.lhs, we were seeing
      text like "-- |\n-- ...\n" in the buffer, and lexer then recognises
      "-- |\n-- ..." as a complete ITdocCommentNext token, with the end of
      the buffer not reached.
      
      Next time round, when we get more input into the buffer, it started
      "\n-- * 'Var.Var': see", so the lexer gave us an ITdocSection token.
      
      However, getOptions' only knew about ITdocCommentNext, and so it
      stopped at that point, and didn't see the pragmas further down the file.
      This caused the build to fail due to -fwarn-tabs not being turned off.
      
      But actually, we don't really want the haddock docs at this point, so
      now we just unset Opt_Haddock in getOptionsFromFile.
      b3e30449
    • Ian Lynagh's avatar
    • Simon Marlow's avatar
      Include a stack trace in the panic message, when GHC is compiled profiled. · f85c084c
      Simon Marlow authored
      I tried this out on the panic we're currently getting for #3103:
      
      ghc-stage2: panic! (the 'impossible' happened)
        (GHC version 7.3.20111128 for x86_64-unknown-linux):
              tcIfaceGlobal (local): not found:
          base:GHC.Word.W#{d 6w}
          [(32R, Type constructor `base:GHC.Word.Word{tc 32R}'),
           (r6O, Identifier `base:GHC.Word.$fNumWord{v r6O}'),
           (r6P, Identifier `base:GHC.Word.$fEqWord{v r6P}'),
           (r6Q, Identifier `base:GHC.Word.$fNumWord1{v r6Q}'),
           (r6R, Identifier `base:GHC.Word.$fNumWord2{v r6R}'),
           (r6S, Data constructor `base:GHC.Word.W#{d r6S}'),
           (r6U, Identifier `base:GHC.Word.W#{v r6U}'),
           (r75, Identifier `base:GHC.Word.$fNumWord_$csignum{v r75}'),
           (r76, Identifier `base:GHC.Word.$fEqWord_$c/={v r76}'),
           (r77, Identifier `base:GHC.Word.$fEqWord_$c=={v r77}')]
      { Main.main
         GHC.defaultErrorHandler
          GHC.runGhc
           GhcMonad.>>=
            GhcMonad.>>=.\
             Main.main'
              Main.doMake
               GhcMake.load
                GhcMake.load2
                 GhcMake.upsweep
                  GhcMake.upsweep.upsweep'
                   GhcMake.reTypecheckLoop
                    GhcMake.typecheckLoop
                     GhcMake.typecheckLoop.\
                      TcRnMonad.initIfaceCheck
                       TcRnMonad.initTcRnIf
                        IOEnv.runIOEnv
                         IOEnv.thenM
                          IOEnv.thenM.\
                           TcIface.typecheckIface
                            TcIface.typecheckIface.\
                             LoadIface.loadDecls
                              LoadIface.loadDecl
                               TcIface.tcIfaceDecl
                                TcIface.tc_iface_decl
                                 TcIface.tcIdInfo
                                  MonadUtils.foldlM
                                   TcIface.tcIdInfo.tcPrag
                                    TcIface.tcUnfolding
                                     TcIface.tcPragExpr
                                      TcIface.tcIfaceExpr
                                       TcIface.tcIfaceAlt
                                        TcIface.tcIfaceDataCon }
      f85c084c
    • Simon Marlow's avatar
      Further tweaks to the ccs primops · 1fc25dfd
      Simon Marlow authored
       - add getCCSOf# :: a -> State# s -> (# State# s, Addr# #)
         (returns the CCS attached to the supplied object)
      
       - remove traceCcs# (obsoleted by getCCSOf#)
      
       - rename getCCCS# to getCurrentCCS#
      1fc25dfd
    • Simon Marlow's avatar
      remove obsolete notes (#5660) · b35a12aa
      Simon Marlow authored
      b35a12aa
    • Simon Marlow's avatar
      53055bb5
    • Ian Lynagh's avatar
      2d68dbbb
    • Ian Lynagh's avatar
    • Simon Peyton Jones's avatar
  4. 29 Nov, 2011 17 commits
  5. 28 Nov, 2011 7 commits
    • Ian Lynagh's avatar
      Implement a capi calling convention; fixes #2979 · 36f8cabe
      Ian Lynagh authored
      In GHC, this provides an easy way to call a C function via a C wrapper.
      This is important when the function is really defined by CPP.
      
      Requires the new CApiFFI extension.
      
      Not documented yet, as it's still an experimental feature at this stage.
      36f8cabe
    • dimitris's avatar
      825e0a3e
    • dimitris's avatar
      isReflCo no longer reliable for detection of type identity. · e5449309
      dimitris authored
      Details:
      isReflCo is no longer reliable for detection of no-rewriting/flattening
      since we are using cached reflexivity solved goals. Introduced a boolean
      flag in the flattener for this purpose, instead.
      e5449309
    • dimitris's avatar
      Implemented -dsuppress-var-kinds flag to remove silly kinds when dppr-debug is on. · cae91683
      dimitris authored
      Adding commentary, and fixing a knot-tie related bug.
      
      Commentary only.
      cae91683
    • dimitris's avatar
      Solved goal caching and zonking optimisations. · 4bc84da3
      dimitris authored
      1) Stopped rewriting and caching solveds in the inerts because
      profiling showed that a lot of time was spent on rewriting
      already solved goals.
      
      2) Optimisations in zonkEvBinds for common-case
      evidence bindings generated from the constraint solver.
      
      3) Now solved goals cache their evidence terms, so that we can more
      aggressively optimize Refl coercions during constraint solving.
      This patch also includes a rewrite of rewriteInertEqsFromInertEq
      which greatly improves its efficiency.
      4bc84da3
    • dimitris's avatar
      This patch includes: · f3183d9a
      dimitris authored
      0) Typo in panic message.
      1) prioritization of equalities over family equalities in the worklists.
      2) rewriting of inert substitutions and solveds on-the-spot instead of
         kicking them out in the inerts. This required a monadic map over
         substitutions hence the modifications in UniqFM.
      3) Just comments and removing stale commented code.
      
      4) Useful SCC for simplifyInfer.
      
      5) Making CoreStats outputable.
      f3183d9a
    • Simon Marlow's avatar
      57d657a8