summaryrefslogtreecommitdiff
path: root/compiler/cmm/OldCmmUtils.hs
Commit message (Collapse)AuthorAgeFilesLines
* Remove OldCmm, convert backends to consume new CmmSimon Marlow2012-11-121-100/+0
| | | | | | | | | | | | | | | | | | This removes the OldCmm data type and the CmmCvt pass that converts new Cmm to OldCmm. The backends (NCGs, LLVM and C) have all been converted to consume new Cmm. The main difference between the two data types is that conditional branches in new Cmm have both true/false successors, whereas in OldCmm the false case was a fallthrough. To generate slightly better code we occasionally need to invert a conditional to ensure that the branch-not-taken becomes a fallthrough; this was previously done in CmmCvt, and it is now done in CmmContFlowOpt. We could go further and use the Hoopl Block representation for native code, which would mean that we could use Hoopl's postorderDfs and analyses for native code, but for now I've left it as is, using the old ListGraph representation for native code.
* Pass DynFlags down to bWordIan Lynagh2012-09-121-8/+9
| | | | | | 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.
* Add a Word add-with-carry primopIan Lynagh2012-02-231-14/+0
| | | | No special-casing in any NCGs yet
* Add a primop for unsigned quotRem; part of #5598Ian Lynagh2012-02-171-0/+4
| | | | Only amd64 has an efficient implementation currently.
* Define a quotRem CallishMachOp; fixes #5598Ian Lynagh2012-02-141-0/+11
| | | | | This means we no longer do a division twice when we are using quotRem (on platforms on which the op is supported; currently only amd64).
* Remove type synonyms for CmmFormals, CmmActuals (and hinted versions).Edward Z. Yang2011-06-131-2/+2
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Merge in new code generator branch.Simon Marlow2011-01-241-0/+98
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.