summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor the way dump flags are handledIan Lynagh2012-10-181-3/+3
| | | | | | | | | | | | | 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.
* Some alpha renamingIan Lynagh2012-10-161-6/+6
| | | | | Mostly d -> g (matching DynFlag -> GeneralFlag). Also renamed if* to when*, matching the Haskell if/when names
* Produce new-style Cmm from the Cmm parserSimon Marlow2012-10-081-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-09-203-32/+37
|\
| * fix warningsSimon Marlow2012-09-201-4/+1
| |
| * fix warningSimon Marlow2012-09-201-0/+5
| |
| * Teach the linear register allocator how to allocate more stack if necessarySimon Marlow2012-09-202-29/+32
| | | | | | | | | | | | | | | | | | This squashes the "out of spill slots" panic that occasionally happens on x86, by adding instructions to bump and retreat the C stack pointer as necessary. The panic has become more common since the new codegen, because we lump code into larger blocks, and the register allocator isn't very good at reusing stack slots for spilling (see Note [extra spill slots]).
* | Remove redundant pragmas from RegAlloc.LivenessIan Lynagh2012-09-201-2/+0
| |
* | Make addSRM to strict additionsIan Lynagh2012-09-201-1/+4
| | | | | | | | I assume that this is what is intended, as it is used with foldl'
* | Fix warnings in RegAlloc.Graph.StatsIan Lynagh2012-09-201-1/+6
| |
* | Whitespace only in nativeGen/RegAlloc/Graph/Stats.hsIan Lynagh2012-09-201-198/+192
|/
* Move some more constants into platformConstantsIan Lynagh2012-09-147-27/+28
|
* Remove more Platform argumentsIan Lynagh2012-09-142-50/+51
|
* Whitespace only in nativeGen/RegAlloc/Linear/JoinToTargets.hsIan Lynagh2012-09-141-205/+196
|
* Remove more Platform argumentsIan Lynagh2012-09-143-30/+33
|
* Remove a load of Platform arguments from RegM functionsIan Lynagh2012-09-141-74/+73
|
* Put DynFlags into the RegM monadIan Lynagh2012-09-143-20/+26
| | | | | Also moved the type definition into RegAlloc.Linear.State to de-orphan the Monad instance.
* Whitespace only in nativeGen/RegAlloc/Linear/State.hsIan Lynagh2012-09-141-55/+50
|
* Remove some CPPIan Lynagh2012-09-104-26/+81
|
* Move more code into codeGen/CodeGen/Platform.hsIan Lynagh2012-08-285-41/+40
| | | | | | | | 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.
* Whitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hsIan Lynagh2012-08-211-24/+17
|
* Pass platform down to lastintIan Lynagh2012-08-213-8/+8
|
* Pass platform down to lastxmmIan Lynagh2012-08-218-75/+91
|
* Start separating out the RTS and Haskell imports of MachRegs.hIan Lynagh2012-08-061-1/+1
| | | | No functional differences yet
* comment wibbleSimon Marlow2012-08-021-1/+1
|
* Improve code generated when real registers are clobberedSimon Marlow2012-07-311-32/+59
| | | | | | | | There was a long-standing ToDo here that I just did: if a real register is clobbered by the current instruction, then we should move it to another free register rather than spilling it to memory. This case crops up more often now that the register allocator can allocate into the fixed Rn registers.
* New codegen: do not split proc-points when using the NCGSimon Marlow2012-07-301-2/+2
| | | | | | | | | 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.
* bugfix: cope when a source reg is dead at a join pointSimon Marlow2012-07-301-10/+4
| | | | | We didn't trip over this one until I started generating code without proc-point splitting, which has more join points and loops.
* Fix a warningIan Lynagh2012-07-161-1/+7
|
* Remove redundant warning suppressionIan Lynagh2012-07-161-1/+0
|
* Move -fno-warn-orphan flag into individual modulesIan Lynagh2012-07-151-0/+1
|
* fix warningSimon Marlow2012-07-061-1/+0
|
* Allow the register allocator access to argument regs (R1.., F1.., etc.)Simon Marlow2012-07-061-8/+15
| | | | | | | | | | | | | | | This was made possible by the recent change to codeGen to attach the live GlobalRegs to every CmmJump, and we'll be relying on it quite heavily in the new code generator too. What this means essentially is that when we see x = R1 the register allocator will automatically assign x to R1 and generate no code at all (also known as "coalescing"). It wasn't possible before because the register allocator had to assume that R1 was always live, because it didn't have access to accurate liveness information.
* bugfix: coalescing moves from RealReg to VirtualReg got broken at some pointSimon Marlow2012-07-061-1/+6
|
* Stop exporting, and stop using, some deprecated functionsIan Lynagh2012-06-131-3/+3
|
* Remove more unused Platform argumentsIan Lynagh2012-06-133-11/+8
|
* Remove PlatformOutputableIan Lynagh2012-06-135-68/+63
| | | | | We can now get the Platform from the DynFlags inside an SDoc, so we no longer need to pass the Platform in.
* Whitespace only in nativeGen/RegAlloc/Graph/Main.hsIan Lynagh2012-06-131-306/+299
|
* add support for ARM hard-float ABI (fixes #5914)Karel Gardas2012-04-273-42/+42
| | | | | | | This patch enhances Platform's ArchARM to include ARM ABI value. It also tweaks configure machinery to detect hard-float ABI and to set it wherever needed. Finally when hard-float ABI is in use, pass appropriate compiler option to the LLVM's llc. Fixes #5914.
* some small optimisationsSimon Marlow2011-12-131-1/+1
|
* Remove registerised code for dead architectures: mips, ia64, alpha,David Terei2011-11-223-18/+0
| | | | hppa1, m68k
* Use -fwarn-tabs when validatingIan Lynagh2011-11-0415-0/+105
| | | | | We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
* Eliminate all uses of IF_ARCH_i386, and remove the definitionIan Lynagh2011-10-231-2/+2
|
* A little more CPP removalIan Lynagh2011-10-193-0/+18
|
* Revert "Remove ArchUnknown"Ian Lynagh2011-10-193-4/+10
| | | | | | | This reverts commit 2dea11a442e1d14d86fa661804de06a721943bf0. On second thoughts, this does make sense, for unregisterised via-C arches at least.
* Remove ArchUnknownIan Lynagh2011-10-183-10/+4
| | | | | | | It doesn't make sense. If platformArch is ArchUnknown then we don't know the answer to any questions about the arch. So now if we don't recognise the arch we just fail, and the new arch will need to be added to the datatype.
* More CPP removal: pprDynamicLinkerAsmLabel in CLabelIan Lynagh2011-10-023-19/+31
| | | | And some knock-on changes
* Add type sigs to functions in RegAlloc.Graph.SpillIan Lynagh2011-08-311-201/+220
|
* Renaming onlySimon Peyton Jones2011-08-259-52/+52
| | | | | CmmTop -> CmmDecl CmmPgm -> CmmGroup
* enhance ArchARM with ISA and ISA extensionsKarel Gardas2011-08-213-6/+6
| | | | | | | This patch enhances ArchARM with ARM ISA and ISA extensions details as is suggested in the comment in Platform.hs file. The patch is needed by future patch which will use ARM ISA information in order to pass appropriate command-line option to the LLVM llc tool.