summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmNode.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* 'Fix' a validation problem when bootstrap is 7.2.1David Terei2011-08-191-1/+1
| | | | | | Problem is with GADTs in new code gen and incomplete pattern warnings. Just disabled the warning really and created #5424 to track an actual fix.
* comment updatesSimon Marlow2011-06-281-4/+7
|
* Port MachOp folding to new code generator.Edward Z. Yang2011-06-171-0/+50
| | | | | | | | | | | | | | | * 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>
* Remove type synonyms for CmmFormals, CmmActuals (and hinted versions).Edward Z. Yang2011-06-131-4/+4
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Work around lack of saving volatile registers from unsafe foreign calls.Edward Z. Yang2011-05-151-6/+26
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* More aggressive CmmRegOff inlining, and fix failure to inline to assignments.Edward Z. Yang2011-05-151-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Comments onlySimon Peyton Jones2011-05-091-3/+25
|
* Unsafe foreign calls (fat machine instructions) do not kill all registers.Edward Z. Yang2011-04-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The new code generator was doing some interesting spilling across unsafe foreign calls: _c1ao::I32 = Hp - 4; I32[Sp - 20] = _c1ao::I32; foreign "ccall" newCAF((BaseReg, PtrHint), (R1, PtrHint))[_unsafe_call_]; _c1ao::I32 = I32[Sp - 20]; This is fairly unnecessary, and resulted from over-conservative liveness analysis from CmmLive. We can see that the old code generator only saved volatile registers across unsafe foreign calls: spilling variables was done by saveVolatileVarsAndRegs, which was only performed for ordinary calls. This commit removes the excess kill from the liveness analysis, as well as the *redundant* excess kill from spilling-and-reloading, and adds a note to CmmNode to this effect. The only registers we need to kill are the ones that the foreign call assigns to, just like any other machine instruction. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Fix warningsSimon Marlow2011-01-281-2/+7
|
* Merge in new code generator branch.Simon Marlow2011-01-241-0/+303
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.