- 16 Oct, 2013 1 commit
-
-
Jan Stolarek authored
-
- 12 Nov, 2012 2 commits
-
-
Simon Marlow authored
-
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.
-
- 30 Oct, 2012 1 commit
-
-
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.
-
- 23 Oct, 2012 1 commit
-
-
Simon Marlow authored
(PicBaseReg + lit) + N ==> PicBaseReg + (lit+N)
-
- 08 Oct, 2012 1 commit
-
-
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.
-
- 25 Sep, 2012 1 commit
-
-
Simon Marlow authored
-
- 12 Sep, 2012 1 commit
-
-
ian@well-typed.com authored
-
- 06 Aug, 2012 2 commits
-
-
ian@well-typed.com authored
This is a bit odd by itself, but it's a stepping stone on the way to putting "target unregisterised" into the settings file.
-
Simon Marlow authored
-
- 30 Jul, 2012 1 commit
-
-
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.
-
- 04 Jul, 2012 1 commit
-
-
Simon Marlow authored
-
- 20 Jun, 2012 1 commit
-
-
Ian Lynagh authored
-
- 12 Jun, 2012 1 commit
-
-
Ian Lynagh authored
-
- 15 Mar, 2012 1 commit
-
-
Simon Marlow authored
-
- 09 Mar, 2012 1 commit
-
-
Simon Marlow authored
-
- 06 Mar, 2012 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
This reverts commit 5ff03ca7.
-
- 02 Mar, 2012 1 commit
-
-
Simon Marlow authored
This reverts commit 3d8ab554.
-
- 27 Feb, 2012 1 commit
-
-
Ian Lynagh authored
-
- 23 Feb, 2012 1 commit
-
-
Ian Lynagh authored
No special-casing in any NCGs yet
-
- 15 Feb, 2012 1 commit
-
-
Simon Marlow authored
- inline x = R1, even if x occurs many times - inline past a store, if the expression is not a load (we could further refine this of course, but the idea here is to get reasonable code for not much effort)
-
- 10 Jan, 2012 1 commit
-
-
dterei authored
We now carry around with CmmJump statements a list of the STG registers that are live at that jump site. This is used by the LLVM backend so it can avoid unnesecarily passing around dead registers, improving perfromance. This gives us the framework to finally fix trac #4308.
-
- 06 Jan, 2012 2 commits
- 29 Nov, 2011 1 commit
-
-
Simon Marlow authored
This field was doing nothing. I think it originally appeared in a very old incarnation of the new code generator.
-
- 05 Nov, 2011 3 commits
-
-
Ian Lynagh authored
-
Ian Lynagh authored
-
Ian Lynagh authored
-
- 25 Aug, 2011 1 commit
-
-
CmmTop -> CmmDecl CmmPgm -> CmmGroup
-
- 06 Jul, 2011 1 commit
-
-
batterseapower authored
I introduced this to support explicitly recording the info table label in RawCmm for another patch I am working on, but it turned out to lead to significant simplification in those parts of the compiler that consume RawCmm. Now, instead of lots of tests for null [CmmStatic] we have a simple test of a Maybe, and have reduced the number of guys that need to know how to convert entry->info labels by a TON. There are only 3 callers of that function now!
-
- 23 Jun, 2011 1 commit
-
-
tibbe authored
Before this change the constant expression _ccI::I64 = (16 >> 7) + 1; wouldn't be propagated, as it wouldn't be completely folded. This meant that this expression wouldn't be unrolled thawArray# arr# 0# 16# s# The new code generator already does this correctly.
-
- 17 Jun, 2011 1 commit
-
-
Edward Z. Yang authored
* Rewrote cmmMachOpFold to cmmMachOpFoldM, which returns Nothing if no folding took place. * Wrote some generic mapping functions which take functions of form 'a -> Maybe a' and are smart about sharing. * Split up optimizations from PIC and PPC work in the native codegen, so they'll be easier to turn off later (they are not currently being turned off, however.) * Whitespace fixes! ToDo: Turn off MachOp folding when new codegenerator is being used. Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- 01 Jun, 2011 2 commits
-
-
This exposes new constants that can be propagated.
-
Currently the mini-inliner would only forward substitute assignments to registers that were used exactly once, to not risk duplicating computation. For constants there's no such risk so we always substitute. Prior to the change the Cmm fn { bits64 a, b; a = 1; b = a + a; RET_N(b); } would be optimized as fn() { [] } ca: _cb::I64 = 1; R1 = _cb::I64 + _cb::I64; jump (I64[Sp + 0]) (); } but after it would be optimized as fn() { [] } ca: R1 = 2; jump (I64[Sp + 0]) (); } Note that this pass does not deal with the now dead assignment.
-
- 05 May, 2011 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- 30 Apr, 2011 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- 05 Apr, 2011 1 commit
-
-
Edward Z. Yang authored
This change may constitute a substantial performance hit, due to the new creation of a set for every instruction we emit. Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- 25 Mar, 2011 1 commit
-
-
Edward Z. Yang authored
-
- 24 Jan, 2011 1 commit
-
-
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.
-