summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmLayoutStack.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Attach global register liveness info to Cmm procedures.Geoffrey Mainland2012-10-301-2/+2
| | | | | | | 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.
* Generalize register sets and liveness calculations.Geoffrey Mainland2012-10-301-6/+6
| | | | | | We would like to calculate register liveness for global registers as well as local registers, so this patch generalizes the existing infrastructure to set the stage.
* Add a type signature needed when using GADTsSimon Peyton Jones2012-10-121-0/+1
|
* Produce new-style Cmm from the Cmm parserSimon Marlow2012-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Misc tidyupSimon Marlow2012-09-241-3/+3
|
* add a missing entryCodeSimon Marlow2012-09-201-1/+3
|
* Move wORD_SIZE into platformConstantsIan Lynagh2012-09-161-41/+43
|
* Pass DynFlags down to wordWidthIan Lynagh2012-09-121-11/+11
|
* Pass DynFlags down to gcWordIan Lynagh2012-09-121-2/+2
|
* Pass DynFlags down to bWordIan Lynagh2012-09-121-30/+33
| | | | | | I've switched to passing DynFlags rather than Platform, as (a) it's simpler to not have to extract targetPlatform in so many places, and (b) it may be useful to have DynFlags around in future.
* Cleanup: add mkIntExpr and zeroExpr utilsSimon Marlow2012-08-311-3/+3
|
* small cleanupSimon Marlow2012-08-071-5/+2
|
* Define callerSaves for all platformsIan Lynagh2012-08-071-1/+1
| | | | | | | | 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.
* Add "Unregisterised" as a field in the settings fileIan Lynagh2012-08-071-1/+1
| | | | | | To explicitly choose whether you want an unregisterised build you now need to use the "--enable-unregisterised"/"--disable-unregisterised" configure flags.
* Continue by jumping to the top-of-stack after a safe foreign callSimon Marlow2012-08-061-5/+7
|
* No need to do removeDeadAssignments, just do cmmLiveness insteadSimon Marlow2012-08-021-1/+7
|
* optimise away some unnecessary stack checksSimon Marlow2012-07-301-1/+19
|
* New codegen: do not split proc-points when using the NCGSimon Marlow2012-07-301-7/+6
| | | | | | | | | 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.
* Fixes for the stack layout algorithm to handle join pointsSimon Marlow2012-07-301-38/+51
|
* Make -fscc-profiling a dynamic flagIan Lynagh2012-07-241-7/+8
| | | | All the flags that 'ways' imply are now dynamic
* GHC 7.4 is now required for building HEADIan Lynagh2012-07-201-3/+0
|
* Move sinking into a separate module, and add a simple inlining passSimon Marlow2012-07-171-85/+14
|
* Fix build with GHC 7.0Ian Lynagh2012-07-131-0/+3
|
* Support the 2-result primops in the new code generatorSimon Marlow2012-07-111-1/+1
|
* Track liveness of GlobalRegs in the new code generatorSimon Marlow2012-07-091-6/+7
| | | | | | This gives the register allocator access to R1.., F1.., D1.. etc. for the new code generator, and is a cheap way to eliminate all the extra "x = R1" assignments that we get from copyIn.
* Remove "fuel", adapt to Hoopl changes, fix warningsSimon Marlow2012-07-051-7/+7
|
* Fix merge-related problemsSimon Marlow2012-07-041-1/+4
|
* Add an experimental sinking passSimon Marlow2012-07-031-2/+72
|
* refactoring and commentsSimon Marlow2012-03-151-26/+34
|
* Remove the old stack layout algorithmsSimon Marlow2012-03-151-2/+2
| | | | | | | | Also, do removeDeadAssignments instead of cmmLiveness before stack allocation, because the former also does liveness analysis, and we can do just one liveness analysis instead of two. The stack layout algorithm doesn't introduce any dead assignments, so this doesn't affect the generated code.
* Add type signature necessary for GHC 7.0.4Max Bolingbroke2012-03-091-1/+2
|
* An optimisation to reduce code size in a common caseSimon Marlow2012-03-081-121/+182
|
* Refactoring onlySimon Marlow2012-03-081-196/+241
|
* Lower safe foreign calls separately from stack layoutSimon Marlow2012-03-071-40/+30
|
* refactoring onlySimon Marlow2012-03-071-33/+69
|
* Lower safe foreign calls in the new CmmLayoutStackSimon Marlow2012-03-061-38/+195
| | | | | | | | We also generate much better code for safe foreign calls (and maybe also unsafe foreign calls) than previously. See the two new Notes: Note [lower safe foreign calls] Note [safe foreign call convention]
* Eliminate some redundant stack assignments and empty stack checksSimon Marlow2012-02-141-49/+122
|
* Build info tables with the new stack layout codeSimon Marlow2012-02-081-18/+77
|
* New stack layout algorithmSimon Marlow2012-02-081-0/+545
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