summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix build with older bootstrapping compilersIan Lynagh2011-07-161-3/+3
|
* Remove more defaultTargetPlatform usesIan Lynagh2011-07-153-9/+7
|
* Remove more defaultTargetPlatform usesIan Lynagh2011-07-157-147/+166
|
* Remove some more defaultTargetPlatform usesIan Lynagh2011-07-152-9/+10
|
* Remove some defaultTargetPlatform'sIan Lynagh2011-07-153-17/+14
| | | | We now pass the correct platform in instead
* More work towards cross-compilationIan Lynagh2011-07-155-108/+121
| | | | | | | | | | | | There's now a variant of the Outputable class that knows what platform we're targetting: class PlatformOutputable a where pprPlatform :: Platform -> a -> SDoc pprPlatformPrec :: Platform -> Rational -> a -> SDoc and various instances have had to be converted to use that class, and we pass Platform around accordingly.
* Whitespace only in compiler/nativeGen/RegAlloc/Liveness.hsIan Lynagh2011-07-131-583/+583
|
* Refactoring: explicitly mark whether we have an info table in RawCmmMax Bolingbroke2011-07-061-3/+3
| | | | | | | | | | | | 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!
* Refactoring: use a structured CmmStatics type rather than [CmmStatic]Max Bolingbroke2011-07-059-59/+59
| | | | | | | | | | | | | | | | | | I observed that the [CmmStatics] within CmmData uses the list in a very stylised way. The first item in the list is almost invariably a CmmDataLabel. Many parts of the compiler pattern match on this list and fail if this is not true. This patch makes the invariant explicit by introducing a structured type CmmStatics that holds the label and the list of remaining [CmmStatic]. There is one wrinkle: the x86 backend sometimes wants to output an alignment directive just before the label. However, this can be easily fixed up by parameterising the native codegen over the type of CmmStatics (though the GenCmmTop parameterisation) and using a pair (Alignment, CmmStatics) there instead. As a result, I think we will be able to remove CmmAlign and CmmDataLabel from the CmmStatic data type, thus nuking a lot of code and failing pattern matches. This change will come as part of my next patch.
* add missing cases for ArchARMSimon Marlow2011-06-273-0/+6
|
* Fix the build with GHC 6.12.3Ian Lynagh2011-06-011-28/+28
|
* Remove CPP from nativeGen/RegAlloc/Linear/FreeRegs.hsIan Lynagh2011-05-315-90/+159
| | | | Fixes more failures on arches without an NCG
* Parameterise the RegM monad on the FreeRegs typeIan Lynagh2011-05-314-37/+37
|
* Whitespace only in nativeGen/RegAlloc/Linear/Base.hsIan Lynagh2011-05-311-73/+73
|
* Add missing type sigs in nativeGen/RegAlloc/Linear/Main.hsIan Lynagh2011-05-311-2/+35
|
* Whitespace only in nativeGen/RegAlloc/Linear/Main.hsIan Lynagh2011-05-311-428/+428
|
* Remove CPP from nativeGen/RegAlloc/Graph/TrivColorable.hsIan Lynagh2011-05-311-52/+61
| | | | This fixes build problems on arches without an NCG.
* Whitespace only in nativeGen/RegAlloc/Graph/TrivColorable.hsIan Lynagh2011-05-311-93/+93
|
* Fix bug in multi-destination jump patching.Edward Z. Yang2011-04-271-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* allocateRegsAndSpill: disable a panic for the time being (see comment)Simon Marlow2011-04-051-1/+8
|
* Fix linear register allocator bug involving read/write to same registers.Edward Z. Yang2011-04-051-24/+36
| | | | | | | | | | | | | | | | When we read a temporary value from memory, we should update its assignment to be both in memory and in register. This was only occurring when there was a free register, but not if we needed to spill an existing value in a register to the stack. I generalized the code for this case and applied it to the other two cases where this occurs (spilled value is in memory and in a register, and when the spilled value is only in a register.) Furthermore, I tightened the invariants on allocRegsAndSpill_spill with a new data type SpillLoc that captures more precisely than Maybe Loc the possible locations we are spilling from. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Fix typos and add Outputable constraints to aid debugging.Edward Z. Yang2011-04-041-7/+7
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Merge in new code generator branch.Simon Marlow2011-01-249-71/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove unncessary fromIntegral callssimonpj@microsoft.com2010-11-162-5/+5
|
* Switch more uniqFromSupply+splitUniqSupply's to takeUniqFromSupplyIan Lynagh2010-10-212-6/+5
|
* Whitespace onlyIan Lynagh2010-10-211-6/+6
|
* Fix warning: Remove unused importIan Lynagh2010-10-131-1/+0
|
* RegAlloc: Track slot liveness over jumps in spill cleanerbenl@ouroborus.net2010-10-135-74/+196
|
* Remove use of lambda with a refutable patternsimonpj@microsoft.com2010-09-231-9/+9
|
* Super-monster patch implementing the new typechecker -- at lastsimonpj@microsoft.com2010-09-131-4/+14
| | | | | | | | | This major patch implements the new OutsideIn constraint solving algorithm in the typecheker, following our JFP paper "Modular type inference with local assumptions". Done with major help from Dimitrios Vytiniotis and Brent Yorgey.
* NCG: allocatableRegs is only giving us 8 SSE regs to allocate tobenl@ouroborus.net2010-06-291-1/+1
|
* Fix warningsbenl@ouroborus.net2010-06-241-2/+2
|
* NCG: Comments and formatting onlybenl@ouroborus.net2010-06-245-51/+2
|
* NCG: Do the actual reversing of SCCsbenl@ouroborus.net2010-06-241-2/+4
|
* NCG: Fix dumping of graphs in regalloc stats for graph allocatorbenl@ouroborus.net2010-06-242-9/+33
|
* NCG: Reverse SCCs after each round in the graph allocatorbenl@ouroborus.net2010-06-241-4/+11
|
* NCG: Don't actually complain on unreachable code blocksbenl@ouroborus.net2010-06-241-3/+5
|
* NCG: Do explicit check for precondition of computeLivenessbenl@ouroborus.net2010-06-241-11/+56
| | | | | | | | computeLiveness requires the SCCs of blocks to be in reverse dependent order, and if they're not it was silently giving bad liveness info, yielding a bad allocation. Now it complains, loudly.
* NCG: Handle stripping of liveness info from procs with no blocks (like ↵benl@ouroborus.net2010-06-231-4/+9
| | | | stg_split_marker)
* NCG: Emit a warning on unreachable code block instead of panicingbenl@ouroborus.net2010-06-231-5/+6
|
* NCG: Remember to keep the entry block first when erasing liveness infoBen.Lippmeier@anu.edu.au2009-09-171-4/+15
|
* NCG: Refactor representation of code with liveness infoBen.Lippmeier@anu.edu.au2009-09-178-157/+184
| | | | | | | | | | | | | * I've pushed the SPILL and RELOAD instrs down into the LiveInstr type to make them easier to work with. * When the graph allocator does a spill cycle it now just re-annotates the LiveCmmTops instead of converting them to NatCmmTops and back. * This saves working out the SCCS again, and avoids rewriting the SPILL and RELOAD meta instructions into real machine instructions.
* NCG: Add sanity checking to linear allocatorBen.Lippmeier@anu.edu.au2009-09-171-7/+17
| | | | | If there are are unreachable basic blocks in the native code then the linear allocator might loop. Detect this case and panic instead.
* NCG: Refactor LiveCmmTop to hold a list of SCCs instead of abusing ListGraphBen.Lippmeier@anu.edu.au2009-09-174-54/+48
|
* NCG: Allow the liveness map in a LiveInfo to be NothingBen.Lippmeier@anu.edu.au2009-09-173-10/+43
|
* NCG: Also show the result of applying coalesings with -ddump-asm-regalloc-stagesBen.Lippmeier.anu.edu.au2009-09-172-7/+13
|
* joinToTargets: fix a case of panic "handleComponent cyclic"Simon Marlow2010-06-181-1/+2
|
* Remove useless UNPACK pragmassimonpj@microsoft.com2010-05-061-2/+2
|
* Replace FiniteMap and UniqFM with counterparts from containers.Milan Straka2010-05-031-15/+36
| | | | | | | | | | | | | | | The original interfaces are kept. There is small performance improvement: - when compiling for five nofib, we get following speedups: Average ----- -2.5% Average ----- -0.6% Average ----- -0.5% Average ----- -5.5% Average ----- -10.3% - when compiling HPC ten times, we get: switches oldmaps newmaps -O -fasm 117.402s 116.081s (98.87%) -O -fasm -fregs-graph 119.993s 118.735s (98.95%) -O -fasm -fregs-iterative 120.191s 118.607s (98.68%)
* Represent the free register set using Word64 on x86-64 (fixes ffi009)Simon Marlow2010-02-151-0/+4
| | | | | | Following recent changes to the numbering of registers, we overflowed Word32 on x86-64, with the result that xmm8 and later we not being allocated.