cmmTopCodeGen no longer takes DynFlags as an argument It is in the NatM monad, which has DynFlags as part of its state.
Remove CPP from nativeGen/RegAlloc/Linear/FreeRegs.hs Fixes more failures on arches without an NCG
Add an ArchUnknown constructor to the arch type Fixes build problems on platforms for which we did not have and Arch constructor.
Remove most of the CPP from AsmCodeGen In particular, the "#error" for platforms without a NCG is gone, which means the module should now build on all platforms again. I'm not sure if this is the nicest way to handle multiple platforms here, but it works for now.
Fix build: Add missing import and remove unneeded #ifdef. From Erik de Castro Lopo.
Fix build
Merge branch 'coloured-core' of https://github.com/nominolo/ghc into coloured-core
Change more Config tests to Platform tests
The fix for #4914 was wrong and broke other things (see #5149). We can't emit the ffrees before a conditional jump, because we don't want to ffree the stack registers if the jump isn't taken (d'oh). This commit fixes it properly, by moving the pass that inserts the ffrees to *before* we do the jump-shortcutting which introduces the conditional non-local jumps.
Implement dead basic block elimination. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Remove dead Alpha native backend. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Implement jump table fix-ups for linear register allocator. We achieve this by splitting up instruction selection for case switches into two parts: the actual code generation, and the generation of the accompanying jump table. With this scheme, the jump fixup code can modify the contents of the jump table stored within the JMP_TBL (or BCTL) instruction, before the actual data section is created. SPARC and PPC patches are untested; they might not work! Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Start support for coloured SDoc output. The SDoc type now passes around an abstract SDocContext rather than just a PprStyle which required touching a few more files. This should also make it easier to integrate DynFlags passing, so that we can get rid of global variables.
Merge in new code generator branch. 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.
Fix error compiling AsmCodeGen.lhs for PPC Mac (unused makeFar addr)
Define cTargetArch and start to use it rather than ifdefs Using Haskell conditionals means the compiler sees all the code, so there should be less rot of code specific to uncommon arches. Code for other platforms should still be optimised away, although if we want to support targetting other arches then we'll need to compile it for-real anyway.
Fix error compiling AsmCodeGen.lhs for PPC Mac (rtsPackageId)
Fix unused import warning on OS X
Fix warnings in AsmCodeGen
NCG: Refactor representation of code with liveness info * 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.