summaryrefslogtreecommitdiff
path: root/compiler/llvmGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the unused CmmAlign and CmmDataLabel from CmmStaticMax Bolingbroke2011-07-051-7/+0
|
* Refactoring: use a structured CmmStatics type rather than [CmmStatic]Max Bolingbroke2011-07-054-8/+6
| | | | | | | | | | | | | | | | | | 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.
* Fix LLVM backend in unregisterised build to use CDavid Terei2011-06-271-1/+3
| | | | | | calling convention. Patch based on one by Karel Gardas.
* Fix silly mistake in last commitDavid Terei2011-06-251-5/+5
|
* Speed improvement to LLVM Mangler for large sections.David Terei2011-06-251-8/+9
| | | | Patch by Peter Wortmann!
* 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>
* Add new mem{cpy,set,move} cmm prim ops.David Terei2011-05-315-96/+190
|
* LLVM: Support LLVM 2.9 (#5103)David Terei2011-05-042-39/+44
| | | | | Instead of using the GNU As subsection feature on Linux/Windows for TNTC we now use the LLVM Mangler on all platforms.
* LLVM: Add support for 64bit OSX. (partial #4210)David Terei2011-05-041-4/+12
|
* 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
|