1. 19 Dec, 2012 1 commit
    • mad.one@gmail.com's avatar
      Rename all of the 'cmmz' flags and make them more consistent. · f6f881f0
      mad.one@gmail.com authored
      There's only a single compiler backend now, so the 'z' suffix means
      nothing. Also, the flags were confusingly named ('cmm-foo' vs
      'foo-cmm',) and counter-intuitively, '-ddump-cmm' did not do at all what
      you expected since the new backend went live.
      
      Basically, all of the -ddump-cmmz-* flags are now -ddump-cmm-*. Some were
      renamed to be more consistent.
      
      This doesn't update the manual; it already mentions '-ddump-cmm' and
      that flag implies all the others anyway, which is probably what you
      want.
      Signed-off-by: mad.one@gmail.com's avatarAustin Seipp <mad.one@gmail.com>
      f6f881f0
  2. 02 Dec, 2012 1 commit
  3. 24 Nov, 2012 1 commit
  4. 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
  5. 30 Oct, 2012 1 commit
  6. 24 Oct, 2012 1 commit
  7. 23 Oct, 2012 1 commit
  8. 18 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Refactor the way dump flags are handled · d4a19643
      ian@well-typed.com authored
      We were being inconsistent about how we tested whether dump flags
      were enabled; in particular, sometimes we also checked the verbosity,
      and sometimes we didn't.
      
      This lead to oddities such as "ghc -v4" printing an "Asm code" section
      which didn't contain any code, and "-v4" enabled some parts of
      "-ddump-deriv" but not others.
      
      Now all the tests use dopt, which also takes the verbosity into account
      as appropriate.
      d4a19643
  9. 16 Oct, 2012 2 commits
  10. 08 Oct, 2012 1 commit
    • 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
  11. 20 Sep, 2012 1 commit
  12. 18 Sep, 2012 1 commit
  13. 16 Sep, 2012 1 commit
  14. 12 Sep, 2012 2 commits
  15. 31 Aug, 2012 2 commits
  16. 09 Aug, 2012 1 commit
  17. 07 Aug, 2012 1 commit
    • ian@well-typed.com's avatar
      Define callerSaves for all platforms · 46b5c197
      ian@well-typed.com authored
      This means that we now generate the same code whatever platform we are
      on, which should help avoid changes on one platform breaking the build
      on another.
      
      It's also another step towards full cross-compilation.
      46b5c197
  18. 06 Aug, 2012 1 commit
  19. 02 Aug, 2012 4 commits
  20. 30 Jul, 2012 2 commits
    • Simon Marlow's avatar
      fix warnings · 8b31090c
      Simon Marlow authored
      8b31090c
    • Simon Marlow's avatar
      New codegen: do not split proc-points when using the NCG · f1ed6a10
      Simon Marlow authored
      Proc-point splitting is only required by backends that do not support
      having proc-points within a code block (that is, everything except the
      native backend, i.e. LLVM and C).
      
      Not doing proc-point splitting saves some compilation time, and might
      produce slightly better code in some cases.
      f1ed6a10
  21. 24 Jul, 2012 1 commit
  22. 17 Jul, 2012 2 commits
  23. 05 Jul, 2012 1 commit
  24. 04 Jul, 2012 1 commit
  25. 03 Jul, 2012 1 commit
  26. 13 Jun, 2012 2 commits
  27. 15 Mar, 2012 2 commits
  28. 26 Feb, 2012 1 commit
  29. 08 Feb, 2012 2 commits