1. 09 Mar, 2013 5 commits
  2. 06 Mar, 2013 1 commit
  3. 18 Feb, 2013 1 commit
  4. 02 Feb, 2013 1 commit
  5. 01 Feb, 2013 7 commits
  6. 23 Jan, 2013 1 commit
  7. 15 Jan, 2013 1 commit
  8. 14 Dec, 2012 1 commit
  9. 13 Dec, 2012 1 commit
  10. 19 Nov, 2012 1 commit
    • Simon Marlow's avatar
      Code-size optimisation for top-level indirections (#7308) · 7da13762
      Simon Marlow authored
      Top-level indirections are often generated when there is a cast, e.g.
      
      foo :: T
      foo = bar `cast` (some coercion)
      
      For these we were generating a full-blown CAF, which is a fair chunk
      of code.
      
      This patch makes these indirections generate a single IND_STATIC
      closure (4 words) instead.  This is exactly what the CAF would
      evaluate to eventually anyway, we're just shortcutting the whole
      process.
      7da13762
  11. 13 Nov, 2012 1 commit
    • Simon Marlow's avatar
      Fix the Slow calling convention (#7192) · 4270d7e7
      Simon Marlow authored
      The Slow calling convention passes the closure in R1, but we were
      ignoring this and hoping it would work, which it often did.  However,
      this bug seems to have been the cause of #7192, because the
      graph-colouring allocator is more sensitive to having correct liveness
      information on jumps.
      4270d7e7
  12. 12 Nov, 2012 1 commit
    • Simon Marlow's avatar
      Remove OldCmm, convert backends to consume new Cmm · d92bd17f
      Simon Marlow authored
      This removes the OldCmm data type and the CmmCvt pass that converts
      new Cmm to OldCmm.  The backends (NCGs, LLVM and C) have all been
      converted to consume new Cmm.
      
      The main difference between the two data types is that conditional
      branches in new Cmm have both true/false successors, whereas in OldCmm
      the false case was a fallthrough.  To generate slightly better code we
      occasionally need to invert a conditional to ensure that the
      branch-not-taken becomes a fallthrough; this was previously done in
      CmmCvt, and it is now done in CmmContFlowOpt.
      
      We could go further and use the Hoopl Block representation for native
      code, which would mean that we could use Hoopl's postorderDfs and
      analyses for native code, but for now I've left it as is, using the
      old ListGraph representation for native code.
      d92bd17f
  13. 05 Nov, 2012 1 commit
  14. 01 Nov, 2012 2 commits
  15. 30 Oct, 2012 2 commits
    • gmainlan@microsoft.com's avatar
      Draw STG F and D registers from the same pool of available SSE registers on x86-64. · e2f6bbd3
      gmainlan@microsoft.com authored
      On x86-64 F and D registers are both drawn from SSE registers, so there is no
      reason not to draw them from the same pool of available SSE registers. This
      means that whereas previously a function could only receive two Double arguments
      in registers even if it did not have any Float arguments, now it can receive up
      to 6 arguments that are any mix of Float and Double in registers.
      
      This patch breaks the LLVM back end. The next patch will fix this breakage.
      e2f6bbd3
    • gmainlan@microsoft.com's avatar
      Attach global register liveness info to Cmm procedures. · 5ee08ddf
      gmainlan@microsoft.com authored
      All Cmm procedures now include the set of global registers that are live on
      procedure entry, i.e., the global registers used to pass arguments to the
      procedure. Only global registers that are use to pass arguments are included in
      this list.
      5ee08ddf
  16. 19 Oct, 2012 1 commit
    • Simon Marlow's avatar
      Remove the old codegen · 6fbd46b0
      Simon Marlow authored
      Except for CgUtils.fixStgRegisters that is used in the NCG and LLVM
      backends, and should probably be moved somewhere else.
      6fbd46b0
  17. 16 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Some alpha renaming · cd33eefd
      ian@well-typed.com authored
      Mostly d -> g (matching DynFlag -> GeneralFlag).
      Also renamed if* to when*, matching the Haskell if/when names
      cd33eefd
  18. 08 Oct, 2012 4 commits
    • rl@cse.unsw.edu.au's avatar
      5cff4fb0
    • rl@cse.unsw.edu.au's avatar
      14064836
    • Simon Marlow's avatar
      expand tabs · 620d885b
      Simon Marlow authored
      620d885b
    • Simon Marlow's avatar
      Produce new-style Cmm from the Cmm parser · a7c0387d
      Simon Marlow authored
      The main change here is that the Cmm parser now allows high-level cmm
      code with argument-passing and function calls.  For example:
      
      foo ( gcptr a, bits32 b )
      {
        if (b > 0) {
           // we can make tail calls passing arguments:
           jump stg_ap_0_fast(a);
        }
      
        return (x,y);
      }
      
      More details on the new cmm syntax are in Note [Syntax of .cmm files]
      in CmmParse.y.
      
      The old syntax is still more-or-less supported for those occasional
      code fragments that really need to explicitly manipulate the stack.
      However there are a couple of differences: it is now obligatory to
      give a list of live GlobalRegs on every jump, e.g.
      
        jump %ENTRY_CODE(Sp(0)) [R1];
      
      Again, more details in Note [Syntax of .cmm files].
      
      I have rewritten most of the .cmm files in the RTS into the new
      syntax, except for AutoApply.cmm which is generated by the genapply
      program: this file could be generated in the new syntax instead and
      would probably be better off for it, but I ran out of enthusiasm.
      
      Some other changes in this batch:
      
       - The PrimOp calling convention is gone, primops now use the ordinary
         NativeNodeCall convention.  This means that primops and "foreign
         import prim" code must be written in high-level cmm, but they can
         now take more than 10 arguments.
      
       - CmmSink now does constant-folding (should fix #7219)
      
       - .cmm files now go through the cmmPipeline, and as a result we
         generate better code in many cases.  All the object files generated
         for the RTS .cmm files are now smaller.  Performance should be
         better too, but I haven't measured it yet.
      
       - RET_DYN frames are removed from the RTS, lots of code goes away
      
       - we now have some more canned GC points to cover unboxed-tuples with
         2-4 pointers, which will reduce code size a little.
      a7c0387d
  19. 26 Sep, 2012 1 commit
    • Edward Z. Yang's avatar
      Partially fix #367 by adding HpLim checks to entry with -fno-omit-yields. · d3128bfc
      Edward Z. Yang authored
      The current fix is relatively dumb as far as where to add HpLim
      checks: it will always perform a check unless we know that we're
      returning from a closure or we are doing a non let-no-escape case
      analysis.  The performance impact on the nofib suite looks like this:
      
                  Min          +5.7%     -0.0%     -6.5%     -6.4%    -50.0%
                  Max          +6.3%     +5.8%     +5.0%     +5.5%     +0.8%
       Geometric Mean          +6.2%     +0.1%     +0.5%     +0.5%     -0.8%
      
      Overall, the executable bloat is the biggest problem, so we keep the old
      omit-yields optimization on by default. Remember that if you need an
      interruptibility guarantee, you need to recompile all of your libraries
      with -fno-omit-yields.
      
      A better fix would involve only inserting the yields necessary to break
      loops; this is left as future work.
      Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@mit.edu>
      d3128bfc
  20. 25 Sep, 2012 1 commit
  21. 24 Sep, 2012 1 commit
  22. 20 Sep, 2012 1 commit
  23. 19 Sep, 2012 2 commits
  24. 18 Sep, 2012 1 commit