1. 07 Aug, 2012 1 commit
  2. 06 Aug, 2012 1 commit
  3. 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].
      6ede0067
  4. 24 Jul, 2012 1 commit
  5. 11 Jul, 2012 2 commits
  6. 09 Jul, 2012 1 commit
  7. 05 Jul, 2012 1 commit
  8. 15 May, 2012 1 commit
    • batterseapower's avatar
      Support code generation for unboxed-tuple function arguments · 09987de4
      batterseapower authored
      This is done by a 'unarisation' pre-pass at the STG level which
      translates away all (live) binders binding something of unboxed
      tuple type.
      
      This has the following knock-on effects:
        * The subkind hierarchy is vastly simplified (no UbxTupleKind or ArgKind)
        * Various relaxed type checks in typechecker, 'foreign import prim' etc
        * All case binders may be live at the Core level
      09987de4
  9. 07 Mar, 2012 1 commit
    • Simon Marlow's avatar
      Improve the case-alternative heap checks · 65256948
      Simon Marlow authored
      The code we were generating for heap-checks in algebraic case
      alternatives wasn't working well with the common-block eliminator.  A
      small tweak to make the heap-check failure jump back to the same place
      in all branches lets the common-block eliminator squash more code.
      65256948
  10. 15 Feb, 2012 1 commit
  11. 08 Feb, 2012 1 commit
    • Simon Marlow's avatar
      New stack layout algorithm · 76999b60
      Simon Marlow authored
      Also:
       - 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
      76999b60
  12. 25 Jan, 2012 2 commits
  13. 04 Nov, 2011 1 commit
  14. 02 Nov, 2011 1 commit
    • Simon Marlow's avatar
      Overhaul of infrastructure for profiling, coverage (HPC) and breakpoints · 7bb0447d
      Simon Marlow authored
      User visible changes
      ====================
      
      Profilng
      --------
      
      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
      future.
      
      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
         tabs)
      
      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.
      
      Tickets
      =======
      
      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)
      7bb0447d
  15. 25 Aug, 2011 2 commits
  16. 08 Jul, 2011 2 commits
  17. 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.
      889c084e
  18. 26 Oct, 2010 1 commit
  19. 23 Oct, 2010 1 commit
  20. 22 Dec, 2009 1 commit
  21. 18 Dec, 2009 1 commit
  22. 17 Dec, 2009 1 commit
    • dias@cs.tufts.edu's avatar
      missed a case in a previous fix · bfb34689
      dias@cs.tufts.edu authored
      Here's the obscure problem:
      -- However, we also want to allow an assignment to be generated
      -- in the case when the types are compatible, because this allows
      -- some slightly-dodgy but occasionally-useful casts to be used,
      -- such as in RtClosureInspect where we cast an HValue to a MutVar#
      -- so we can print out the contents of the MutVar#.  If we generate
      -- code that enters the HValue, then we'll get a runtime panic, because
      -- the HValue really is a MutVar#.  The types are compatible though,
      -- so we can just generate an assignment.
      bfb34689
  23. 05 Nov, 2009 1 commit
    • dias@cs.tufts.edu's avatar
      Loop problems in native back ends, update to T3286 fix · c55eee3a
      dias@cs.tufts.edu authored
      The native back ends had difficulties with loops;
      in particular the code for branch-chain elimination
      could run in infinite loops or drop basic blocks.
      The old codeGen didn't expose these problems.
      
      Also, my fix for T3286 in the new codegen was getting
      applied to too many (some wrong) cases; a better pattern
      match fixed that.
      c55eee3a
  24. 18 Sep, 2009 1 commit
  25. 27 Jul, 2009 1 commit
  26. 01 Jul, 2009 1 commit
  27. 11 Jun, 2009 1 commit
  28. 23 Mar, 2009 3 commits
  29. 17 Mar, 2009 1 commit
  30. 03 Mar, 2009 1 commit
    • dias@eecs.harvard.edu's avatar
      A few bug fixes; some improvements spurred by paper writing · 31a9d048
      dias@eecs.harvard.edu authored
      Among others:
      - Fixed Stg->C-- translation of let-no-escapes -- it's important to use the
        right continuation...
      - Fixed infinite recursion in X86 backend (shortcutJump mishandled infinite loops)
      - Fixed yet another wrong calling convention -- primops take args only in vanilla regs,
        but they may return results on the stack!
      - Removed StackInfo from LGraph and Block -- now in LastCall and CmmZ
      - Updated avail-variable and liveness code
      31a9d048
  31. 18 Dec, 2008 1 commit
  32. 26 Nov, 2008 1 commit
  33. 17 Oct, 2008 1 commit
  34. 14 Oct, 2008 1 commit
    • dias@eecs.harvard.edu's avatar
      Don't adjust hp up when the case scrutinee won't allocate · 309f64a0
      dias@eecs.harvard.edu authored
      If the case scrutinee can't allocate, we don't need to do a heap
      check in the case alternatives. (A previous patch got that right.)
      In that case, we had better not adjust the heap pointer to recover
      unused stack space before evaluating the scrutinee -- because we
      aren't going to reallocate for the case alternative.
      309f64a0