summaryrefslogtreecommitdiff
path: root/compiler/llvmGen
Commit message (Collapse)AuthorAgeFilesLines
...
* LLVM: Fix bug with osx mangler and jump tables.David Terei2011-05-011-4/+6
|
* LLVM: Fix #5131. Add support for missing stg regsDavid Terei2011-04-191-0/+2
|
* LLVM: Fix #4995, llvm mangler broken for large compilesDavid Terei2011-03-091-5/+8
|
* LLVM: Huge improvement to mangler speed.David Terei2011-02-131-179/+102
| | | | | | | The old llvm mangler was horrible! Very slow due to bad design and code. New version is linear complexity as it should be and far lower coefficients. This fixes trac 4838.
* Merge in new code generator branch.Simon Marlow2011-01-245-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Defensify naked read in LLVM manglerBen Lippmeier2010-12-101-10/+27
|
* Formatting onlyBen Lippmeier2010-12-101-19/+19
|
* LLVM: Fix compilation of writebarrier, #4308David Terei2010-10-041-0/+5
|
* LLVM: Code and speed improvement to dominateAllocs pass.David Terei2010-07-211-7/+5
|
* LLVM: Fix OSX to work again with TNTC disabled.David Terei2010-07-201-6/+12
|
* LLVM: Fix printing of local vars so LLVM works with -fnew-codegenDavid Terei2010-07-201-1/+2
|
* LLVM: Fix up botched last commitDavid Terei2010-07-191-2/+2
|
* LLVM: Fix warning introduce in last commit.David Terei2010-07-191-2/+2
|
* LLVM: Use mangler to fix up stack alignment issues on OSXDavid Terei2010-07-184-48/+111
|
* LLVM: Add inline assembly to binding.David Terei2010-07-142-0/+26
|
* LLVM: Fix mistype in last commit which broke TNTC under win/linux.David Terei2010-07-141-1/+1
|
* Remove unnecessary #includeIan Lynagh2010-07-131-1/+0
|
* LLVM: Add in new LLVM mangler for implementing TNTC on OSXDavid Terei2010-07-133-12/+155
|
* LLVM: Allow getelementptr to use LlvmVar for indexes.David Terei2010-07-123-20/+22
|
* LLVM: Fix various typos in commentsDavid Terei2010-07-076-29/+29
|
* LLVM: Add alias type defenitions to LlvmModule.David Terei2010-07-076-34/+38
|
* LLVM: Use packed structure type instead of structure typeDavid Terei2010-07-071-4/+4
| | | | | | | The regular structure type adds padding to conform to the platform ABI, which causes problems with structures storing doubles under windows since we don't conform to the platform ABI there. So we use packed structures instead now that don't do any padding.
* LLVM: Stop llvm saving stg caller-save regs across C callsDavid Terei2010-07-051-8/+29
| | | | | | | | This is already handled by the Cmm code generator so LLVM is simply duplicating work. LLVM also doesn't know which ones are actually live so saves them all which causes a fair performance overhead for C calls on x64. We stop llvm saving them across the call by storing undef to them just before the call.
* LLVM: Add in literal undefined value to bindingDavid Terei2010-07-051-0/+4
|
* LLVM: Add a literal NULL value to bindingDavid Terei2010-07-051-0/+4
| | | | Patch from Erik de Castro Lopo <erikd@mega-nerd.com>.
* LLVM: Use the inbounds keyword for getelementptr instructions.David Terei2010-07-023-8/+10
|
* LLVM: Change more operations to use getelementptrDavid Terei2010-07-011-24/+55
|
* LLVM: Use getelementptr instruction for a lot of situationsDavid Terei2010-06-302-31/+171
| | | | | | | | | | LLVM supports creating pointers in two ways, firstly through pointer arithmetic (by casting between pointers and ints) and secondly using the getelementptr instruction. The second way is preferable as it gives LLVM more information to work with. This patch changes a lot of pointer related code from the first method to the getelementptr method.
* LLVM: Use intrinsic functions for pow, sqrt, sin, cosDavid Terei2010-06-281-8/+8
| | | | | | | | Instead of calling the C library for these Cmm functions we use intrinsic functions provided by llvm. LLVM will then either create a compile time constant if possible, or use a cpu instruction or as a last resort call the C library.
* LLVM: Fix test '2047' under linux-x64David Terei2010-06-281-5/+5
|
* LLVM: Fix test 'ffi005' under linux-x64David Terei2010-06-281-2/+2
|
* LLVM: Update to use new fp ops introduced in 2.7David Terei2010-06-282-9/+18
|
* Add noalias and nocapture attributes to pointer stg registersDavid Terei2010-06-281-3/+7
| | | | | | | | At the moment this gives a very slight performance boost of around 1 - 2%. Future changes to the generated code though so that pointers are kept as pointers more often instead of being cast to integer types straight away should hopefully improve the benefit this brings.
* LLVM: Fix bug with calling tail with empty listDavid Terei2010-06-252-9/+16
|
* Allow for stg registers to have pointer type in llvm BE.David Terei2010-06-213-32/+60
| | | | | | | | Before all the stg registers were simply a bit type or floating point type but now they can be declared to have a pointer type to one of these. This will allow various optimisations in the future in llvm since the type is more accurate.
* Add support for parameter attributes to the llvm BE bindingDavid Terei2010-06-247-28/+108
| | | | | | These allow annotations of the code produced by the backend which should bring some perforamnce gains. At the moment the attributes aren't being used though.
* More updates to datalayout description in llvm BEDavid Terei2010-06-221-7/+9
|
* Update datalayout info in llvm BEDavid Terei2010-06-221-2/+2
|
* Fix handling of float literals in llvm BEDavid Terei2010-06-221-1/+11
|
* Declare some top level globals to be constant when appropriateDavid Terei2010-06-219-102/+89
| | | | | | | 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-214-113/+71
|
* Fix negate op not working for -0 in llvm backendDavid Terei2010-06-213-18/+11
|
* Add win32 datalayout support to llvm backendDavid Terei2010-06-181-3/+6
|
* Add support of TNTC to llvm backendDavid Terei2010-06-189-241/+292
| | | | | | | 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-1510-0/+2928
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.