summaryrefslogtreecommitdiff
path: root/compiler/llvmGen/LlvmCodeGen.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Use SDoc rather than Doc in LLVMIan Lynagh2012-06-121-7/+9
| | | | | In particular, this makes life simpler when we want to use a general GHC SDoc in the middle of some LLVM.
* Only use TBAA when LLVM > 2.8. (#5782)David Terei2012-01-171-1/+4
|
* Add '-freg-liveness' flag to control if STG liveness informationDavid Terei2012-01-121-1/+1
| | | | is used for optimisation. (enabled by default)
* Improve style of '-ddump-llvm' output. (#5750)David Terei2012-01-101-0/+1
|
* Fix ugly complexity issue in LLVM backend (#5652)David Terei2011-12-031-9/+14
| | | | | | | | Compile time still isn't as good as I'd like but no easy changes available. LLVM backend could do with a big rewrite to improve performance as there are some ugly designs in it. At least the test case isn't 10min anymore, just a few seconds now.
* Add CCS for llvmDavid Terei2011-12-031-9/+17
|
* Show LLVM mangler and code gen passes at v2David Terei2011-11-221-0/+1
|
* More CPP removal: pprDynamicLinkerAsmLabel in CLabelIan Lynagh2011-10-021-4/+4
| | | | And some knock-on changes
* Renaming onlySimon Peyton Jones2011-08-251-7/+7
| | | | | CmmTop -> CmmDecl CmmPgm -> CmmGroup
* Snapshot of codegen refactoring to share with simonpjSimon Marlow2011-08-251-3/+3
|
* More work towards cross-compilationIan Lynagh2011-07-151-1/+1
| | | | | | | | | | | | 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.
* Refactoring: explicitly mark whether we have an info table in RawCmmMax Bolingbroke2011-07-061-4/+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!
* Some general code cleaning in LLVM backendDavid Terei2011-07-061-17/+16
|
* Refactoring: use a structured CmmStatics type rather than [CmmStatic]Max Bolingbroke2011-07-051-1/+1
| | | | | | | | | | | | | | | | | | 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 new mem{cpy,set,move} cmm prim ops.David Terei2011-05-311-2/+5
|
* Merge in new code generator branch.Simon Marlow2011-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* LLVM: Use mangler to fix up stack alignment issues on OSXDavid Terei2010-07-181-17/+11
|
* LLVM: Add in new LLVM mangler for implementing TNTC on OSXDavid Terei2010-07-131-1/+3
|
* LLVM: Fix various typos in commentsDavid Terei2010-07-071-4/+4
|
* Declare some top level globals to be constant when appropriateDavid Terei2010-06-211-16/+5
| | | | | | | This involved removing the old constant handling mechanism which was fairly hard to use. Now being constant or not is simply a property of a global variable instead of a separate type.
* Reduce the number of passes over the cmm in llvm BEDavid Terei2010-06-211-87/+46
|
* Add support of TNTC to llvm backendDavid Terei2010-06-181-14/+30
| | | | | | | We do this through a gnu as feature called subsections, where you can put data/code into a numbered subsection and those subsections will be joined together in descending order by gas at compile time.
* Add new LLVM code generator to GHC. (Version 2)David Terei2010-06-151-0/+166
This was done as part of an honours thesis at UNSW, the paper describing the work and results can be found at: http://www.cse.unsw.edu.au/~pls/thesis/davidt-thesis.pdf A Homepage for the backend can be found at: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM Quick summary of performance is that for the 'nofib' benchmark suite, runtimes are within 5% slower than the NCG and generally better than the C code generator. For some code though, such as the DPH projects benchmark, the LLVM code generator outperforms the NCG and C code generator by about a 25% reduction in run times.