1. 06 Aug, 2012 1 commit
  2. 02 Aug, 2012 1 commit
    • Simon Marlow's avatar
      Explicitly share some return continuations · 6ede0067
      Simon Marlow authored
      Instead of relying on common-block-elimination to share return
      continuations in the common case (case-alternative heap checks) we do
      it explicitly.  This isn't hard to do, is more robust, and saves some
      compilation time.  Full commentary in Note [sharing continuations].
  3. 30 Jul, 2012 2 commits
  4. 24 Jul, 2012 1 commit
  5. 11 Jul, 2012 1 commit
  6. 13 Jun, 2012 1 commit
  7. 11 Jun, 2012 1 commit
  8. 07 Jun, 2012 1 commit
    • Simon Marlow's avatar
      Fix for earger blackholing of thunks with no free variables (#6146) · 21a53a1c
      Simon Marlow authored
      A thunk with no free variables was not getting blackholed when
      -feager-blackholing was on, but we were nevertheless pushing the
      stg_bh_upd_frame version of the update frame that expects to see a
      black hole.
      I fixed this twice for good measure:
       - we now call blackHoleOnEntry when pushing the update frame to check
         whether the closure was actually blackholed, and so that we use the
         same predicate in both places
       - we now black hole thunks even if they have no free variables.
         These only occur when optimisation is off, but presumably if you say
         -feager-blackholing then that's what you want to happen.
  9. 07 Mar, 2012 1 commit
  10. 14 Feb, 2012 1 commit
    • Simon Marlow's avatar
      Fix an SRT-related bug · b8172ba1
      Simon Marlow authored
      We were using the SRT information generated by the computeSRTs pass to
      decide whether to add a static link field to a constructor or not, and
      this broke when I disabled computeSRTs for the new code generator.  So
      I've hacked it for now to only rely on the SRT information generated
      by CoreToStg.
  11. 08 Feb, 2012 1 commit
    • Simon Marlow's avatar
      New stack layout algorithm · 76999b60
      Simon Marlow authored
       - improvements to code generation: push slow-call continuations
         on the stack instead of generating explicit continuations
       - remove unused CmmInfo wrapper type (replace with CmmInfoTable)
       - squash Area and AreaId together, remove now-unused RegSlot
       - comment out old unused stack-allocation code that no longer
         compiles after removal of RegSlot
  12. 25 Jan, 2012 1 commit
  13. 04 Nov, 2011 1 commit
  14. 02 Nov, 2011 2 commits
    • Simon Marlow's avatar
      Overhaul of infrastructure for profiling, coverage (HPC) and breakpoints · 7bb0447d
      Simon Marlow authored
      User visible changes
      Flags renamed (the old ones are still accepted for now):
        OLD            NEW
        ---------      ------------
        -auto-all      -fprof-auto
        -auto          -fprof-exported
        -caf-all       -fprof-cafs
      New flags:
        -fprof-auto              Annotates all bindings (not just top-level
                                 ones) with SCCs
        -fprof-top               Annotates just top-level bindings with SCCs
        -fprof-exported          Annotates just exported bindings with SCCs
        -fprof-no-count-entries  Do not maintain entry counts when profiling
                                 (can make profiled code go faster; useful with
                                 heap profiling where entry counts are not used)
      Cost-centre stacks have a new semantics, which should in most cases
      result in more useful and intuitive profiles.  If you find this not to
      be the case, please let me know.  This is the area where I have been
      experimenting most, and the current solution is probably not the
      final version, however it does address all the outstanding bugs and
      seems to be better than GHC 7.2.
      Stack traces
      +RTS -xc now gives more information.  If the exception originates from
      a CAF (as is common, because GHC tends to lift exceptions out to the
      top-level), then the RTS walks up the stack and reports the stack in
      the enclosing update frame(s).
      Result: +RTS -xc is much more useful now - but you still have to
      compile for profiling to get it.  I've played around a little with
      adding 'head []' to GHC itself, and +RTS -xc does pinpoint the problem
      quite accurately.
      I plan to add more facilities for stack tracing (e.g. in GHCi) in the
      Coverage (HPC)
       * derived instances are now coloured yellow if they weren't used
       * likewise record field names
       * entry counts are more accurate (hpc --fun-entry-count)
       * tab width is now correct (markup was previously off in source with
      Internal changes
      In Core, the Note constructor has been replaced by
              Tick (Tickish b) (Expr b)
      which is used to represent all the kinds of source annotation we
      support: profiling SCCs, HPC ticks, and GHCi breakpoints.
      Depending on the properties of the Tickish, different transformations
      apply to Tick.  See CoreUtils.mkTick for details.
      This commit closes the following tickets, test cases to follow:
        - Close #2552: not a bug, but the behaviour is now more intuitive
          (test is T2552)
        - Close #680 (test is T680)
        - Close #1531 (test is result001)
        - Close #949 (test is T949)
        - Close #2466: test case has bitrotted (doesn't compile against current
          version of vector-space package)
    • Simon Marlow's avatar
  15. 17 Oct, 2011 1 commit
  16. 02 Oct, 2011 1 commit
  17. 06 Sep, 2011 1 commit
  18. 25 Aug, 2011 7 commits
  19. 23 Mar, 2011 1 commit
    • Edward Z. Yang's avatar
      Immediately tag initialization code to prevent untagged spills. · cb5260d4
      Edward Z. Yang authored
      When allocating new objects on the heap, we previously returned
      a CmmExpr containing the heap pointer as well as the tag expression,
      which would be added to the code graph upon first usage.  Unfortunately,
      this meant that untagged heap pointers living in registers might
      be spilled to the stack, where they interacted poorly with garbage
      collection (we saw this bug specifically with the compacting garbage
      This fix immediately tags the register containing the heap pointer,
      so that unless we have extremely unfriendly spill code, the new pointer
      will never be spilled to the stack untagged.
      An alternate solution might have been to modify allocDynClosure to
      tag the pointer upon the initial register allocation, but not all
      invocations of allocDynClosure tag the resulting pointer, and
      threading the consequent CgIdInfo for the cases that did would have
      been annoying.
  20. 24 Jan, 2011 1 commit
    • Simon Marlow's avatar
      Merge in new code generator branch. · 889c084e
      Simon Marlow authored
      This changes the new code generator to make use of the Hoopl package
      for dataflow analysis.  Hoopl is a new boot package, and is maintained
      in a separate upstream git repository (as usual, GHC has its own
      lagging darcs mirror in http://darcs.haskell.org/packages/hoopl).
      During this merge I squashed recent history into one patch.  I tried
      to rebase, but the history had some internal conflicts of its own
      which made rebase extremely confusing, so I gave up. The history I
      squashed was:
        - Update new codegen to work with latest Hoopl
        - Add some notes on new code gen to cmm-notes
        - Enable Hoopl lag package.
        - Add SPJ note to cmm-notes
        - Improve GC calls on new code generator.
      Work in this branch was done by:
         - Milan Straka <fox@ucw.cz>
         - John Dias <dias@cs.tufts.edu>
         - David Terei <davidterei@gmail.com>
      Edward Z. Yang <ezyang@mit.edu> merged in further changes from GHC HEAD
      and fixed a few bugs.
  21. 05 Jan, 2010 1 commit
  22. 06 Nov, 2009 1 commit
    • Ben.Lippmeier@anu.edu.au's avatar
      * Refactor CLabel.RtsLabel to CLabel.CmmLabel · a02e7f40
      Ben.Lippmeier@anu.edu.au authored
      The type of the CmmLabel ctor is now
        CmmLabel :: PackageId -> FastString -> CmmLabelInfo -> CLabel
       - When you construct a CmmLabel you have to explicitly say what
         package it is in. Many of these will just use rtsPackageId, but
         I've left it this way to remind people not to pretend labels are
         in the RTS package when they're not. 
       - When parsing a Cmm file, labels that are not defined in the 
         current file are assumed to be in the RTS package. 
         Labels imported like
            import label
         are assumed to be in a generic "foreign" package, which is different
         from the current one.
         Labels imported like
            import "package-name" label
         are marked as coming from the named package.
         This last one is needed for the integer-gmp library as we want to
         refer to labels that are not in the same compilation unit, but
         are in the same non-rts package.
         This should help remove the nasty #ifdef __PIC__ stuff from
  23. 18 Oct, 2009 1 commit
  24. 24 Jul, 2009 1 commit
  25. 07 Jul, 2009 1 commit
  26. 23 Mar, 2009 2 commits
  27. 14 Jan, 2009 1 commit
  28. 18 Dec, 2008 1 commit
  29. 26 Nov, 2008 3 commits