summaryrefslogtreecommitdiff
path: root/compiler/codeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Produce new-style Cmm from the Cmm parserSimon Marlow2012-10-0822-357/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Partially fix #367 by adding HpLim checks to entry with -fno-omit-yields.Edward Z. Yang2012-09-262-23/+38
| | | | | | | | | | | | | | | | | | | | | 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 <ezyang@mit.edu>
* Remove some old-codegen cruftSimon Marlow2012-09-252-238/+4
|
* Misc tidyupSimon Marlow2012-09-241-6/+1
|
* non-tablesNextToCode fix for returns in the new codegenSimon Marlow2012-09-201-1/+3
|
* Change some "else return ()"s to use when/unlessIan Lynagh2012-09-202-3/+3
|
* Add the necessary REP_* constants to platformConstantsIan Lynagh2012-09-194-19/+8
|
* Remove redundant #includesIan Lynagh2012-09-192-4/+0
|
* Add some LDV_* constants to platformConstantsIan Lynagh2012-09-192-28/+8
|
* Remove a little more CPPIan Lynagh2012-09-183-5/+5
|
* Make StgWord a portable type tooIan Lynagh2012-09-188-40/+38
| | | | | StgWord is a newtyped Word64, as it needed to be something that has a UArray instance.
* Make StgHalfWord a portable typeIan Lynagh2012-09-186-56/+60
| | | | | It's now a newtyped Integer. Perhaps a newtyped Word32 would make more sense, though.
* Remove some CPPIan Lynagh2012-09-174-12/+15
|
* Move tAG_BITS into platformConstantsIan Lynagh2012-09-1615-110/+116
|
* Move more constants to platformConstantsIan Lynagh2012-09-162-5/+5
|
* Move wORD_SIZE into platformConstantsIan Lynagh2012-09-1620-171/+177
|
* Move wORD_SIZE_IN_BITS to DynFlagsIan Lynagh2012-09-142-4/+4
| | | | This frees wORD_SIZE up to be moved out of HaskellConstants
* Move some more constants into platformConstantsIan Lynagh2012-09-142-2/+2
|
* Move more constants to platformConstantsIan Lynagh2012-09-143-14/+12
|
* Move more constants into platformConstantsIan Lynagh2012-09-143-35/+40
|
* Move some more constants fo platformConstantsIan Lynagh2012-09-144-17/+15
|
* Start moving other constants from (Haskell)Constants to platformConstantsIan Lynagh2012-09-142-5/+4
|
* Use oFFSET_* from platformConstants rather than ConstantsIan Lynagh2012-09-1312-119/+124
|
* Use sIZEOF_* from platformConstants rather than ConstantsIan Lynagh2012-09-136-6/+6
|
* Pass DynFlags down to wordWidthIan Lynagh2012-09-1220-754/+779
|
* Pass DynFlags down to gcWordIan Lynagh2012-09-127-12/+13
|
* Pass DynFlags down to bWordIan Lynagh2012-09-1230-939/+993
| | | | | | 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.
* Whitespace only in codeGen/CgProf.hsIan Lynagh2012-09-111-50/+43
|
* Pass Platform down to halfWordMaskIan Lynagh2012-09-102-4/+4
|
* Pass Platform down to halfWordWidthIan Lynagh2012-09-104-36/+48
| | | | We don't actually use it yet
* A further fix for -split-objs with the new codegenSimon Marlow2012-09-051-1/+4
|
* Fix -split-objs with the new code generatorSimon Marlow2012-09-043-28/+6
| | | | | | We need to make the SRT label external and unique when splitting, because it is shared amongst all the functions in the module. Also some SRT-related cleanup.
* Narrow the args of the popCnt# primitives (new codegen)Simon Marlow2012-09-041-5/+10
| | | | (this change was previously done in the old codegen only)
* Make -fhpc a dynamic flagIan Lynagh2012-09-032-9/+9
|
* Remove doingTickyProfilingIan Lynagh2012-09-034-6/+6
| | | | It's now just 'dopt Opt_Ticky'
* Narrow the arg of popCnt# to the correct widthSimon Marlow2012-08-311-6/+15
| | | | | | | Fixes cgrun071 on recent Mac OS X versions. This is the right fix at least until we have proper types for Word8#, Word16# etc.
* Cleanup: add mkIntExpr and zeroExpr utilsSimon Marlow2012-08-3112-54/+53
|
* Fix fencepost and byte/word bugs in cloneArray/copyArray (#7185)Simon Marlow2012-08-312-26/+43
|
* Move more code into codeGen/CodeGen/Platform.hsIan Lynagh2012-08-288-15/+39
| | | | | | | | HaskellMachRegs.h is no longer included in anything under compiler/ Also, includes/CodeGen.Platform.hs now includes "stg/MachRegs.h" rather than <stg/MachRegs.h> which means that we always get the file from the tree, rather than from the bootstrapping compiler.
* Fix callerSaves, activeStgRegs, haveRegBase when unregisterisedSimon Marlow2012-08-281-0/+6
|
* StgCmmUtils no longer needs to include HaskellMachRegs.hIan Lynagh2012-08-211-1/+0
|
* Use haveRegBase in StgCmmUtils tooIan Lynagh2012-08-211-13/+13
|
* Whitespace only in StgCmmUtilsIan Lynagh2012-08-211-200/+194
|
* CgUtils no longer needs to #include HaskellMachRegs.hIan Lynagh2012-08-211-1/+0
|
* Add haveRegBase to CodeGen.PlatformIan Lynagh2012-08-212-16/+31
|
* Move activeStgRegs into CodeGen.PlatformIan Lynagh2012-08-2111-118/+74
|
* Fix the generation of CallerSaves; fixes #7163Ian Lynagh2012-08-2111-53/+97
| | | | | | | | | Simon Marlow spotted that we were #include'ing MachRegs.h several times, but that doesn't work as (a) it uses ifdeffery to avoid being included multiple times, and (b) even if we work around that, then the #define's from previous inclusions are still defined when we #include it again. So we now put the platform code for each platform in a separate .hs file.
* remove tabsSimon Marlow2012-08-211-93/+86
|
* remove tabsSimon Marlow2012-08-211-124/+117
|
* remove tabsSimon Marlow2012-08-211-52/+45
|