summaryrefslogtreecommitdiff
path: root/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
Commit message (Collapse)AuthorAgeFilesLines
* Fix the unregisterised build; fixes #5901Ian Lynagh2012-02-271-5/+6
|
* Add a 2-word-multiply operatorIan Lynagh2012-02-241-0/+1
| | | | Currently no NCGs support it
* Add a Word add-with-carry primopIan Lynagh2012-02-231-11/+10
| | | | No special-casing in any NCGs yet
* Add a primop for unsigned quotRem; part of #5598Ian Lynagh2012-02-171-0/+1
| | | | Only amd64 has an efficient implementation currently.
* Define a quotRem CallishMachOp; fixes #5598Ian Lynagh2012-02-141-5/+10
| | | | | 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).
* Improve support for LLVM >= 3.0 write barrier. (#5814)David Terei2012-01-301-2/+5
|
* llvmGen: Use new fence instructionBen Gamari2012-01-301-9/+17
| | | | Signed-off-by: David Terei <davidterei@gmail.com>
* Add '-freg-liveness' flag to control if STG liveness informationDavid Terei2012-01-121-11/+16
| | | | is used for optimisation. (enabled by default)
* Improve LLVM TBAA hierachy (#5567).David Terei2012-01-121-2/+2
|
* Use Type Based Alias Analysis (TBAA) in LLVM backend (#5567)David Terei2012-01-121-27/+30
| | | | | | | TBAA allows us to specify a type hierachy in metadata with the property that nodes on different branches don't alias. This should somewhat improve the optimizations LLVM does that rely on alias information.
* Track STG live register information for use in LLVMDavid Terei2012-01-091-9/+23
| | | | | | | | | We now carry around with CmmJump statements a list of the STG registers that are live at that jump site. This is used by the LLVM backend so it can avoid unnesecarily passing around dead registers, improving perfromance. This gives us the framework to finally fix trac #4308.
* Remove unused arg field of CmmReturnDavid Terei2012-01-051-1/+1
|
* Remove unused argument field on CmmJumpDavid Terei2012-01-051-1/+1
|
* Remove unused importSimon Peyton Jones2011-12-041-1/+0
|
* Fix ugly complexity issue in LLVM backend (#5652)David Terei2011-12-031-7/+6
| | | | | | | | 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.
* Get rid of the "safety" field of CmmCall (OldCmm)Simon Marlow2011-11-291-1/+1
| | | | | This field was doing nothing. I think it originally appeared in a very old incarnation of the new code generator.
* Implement a capi calling convention; fixes #2979Ian Lynagh2011-11-281-0/+1
| | | | | | | | | In GHC, this provides an easy way to call a C function via a C wrapper. This is important when the function is really defined by CPP. Requires the new CApiFFI extension. Not documented yet, as it's still an experimental feature at this stage.
* Formatting fixDavid Terei2011-11-221-2/+4
|
* Specify unsupported ops, don't just use a catch allDavid Terei2011-11-221-14/+58
| | | | | | | | Better to specifically list the unsupported cases in code than to have a catch all that panics. The later method hides problems when new constructors are added such as the recent additions to the supported Cmm prim ops that weren't ported to the C backend since no one noticed.
* Remove CPP from llvmGen/LlvmCodeGen/CodeGen.hsIan Lynagh2011-10-151-11/+9
|
* More CPP removal: pprDynamicLinkerAsmLabel in CLabelIan Lynagh2011-10-021-9/+9
| | | | And some knock-on changes
* Renaming onlySimon Peyton Jones2011-08-251-11/+11
| | | | | CmmTop -> CmmDecl CmmPgm -> CmmGroup
* Add popcnt support to LLVM backendDavid Terei2011-08-201-0/+24
|
* Some general code cleaning in LLVM backendDavid Terei2011-07-061-15/+6
|
* 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-311-85/+150
|
* Merge in new code generator branch.Simon Marlow2011-01-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: Use mangler to fix up stack alignment issues on OSXDavid Terei2010-07-181-13/+14
|
* LLVM: Allow getelementptr to use LlvmVar for indexes.David Terei2010-07-121-14/+18
|
* LLVM: Fix various typos in commentsDavid Terei2010-07-071-18/+18
|
* 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: Use the inbounds keyword for getelementptr instructions.David Terei2010-07-021-3/+3
|
* LLVM: Change more operations to use getelementptrDavid Terei2010-07-011-24/+55
|
* LLVM: Use getelementptr instruction for a lot of situationsDavid Terei2010-06-301-26/+170
| | | | | | | | | | 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 'ffi005' under linux-x64David Terei2010-06-281-2/+2
|
* LLVM: Update to use new fp ops introduced in 2.7David Terei2010-06-281-4/+4
|
* Allow for stg registers to have pointer type in llvm BE.David Terei2010-06-211-22/+43
| | | | | | | | 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-241-2/+2
| | | | | | 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.
* Declare some top level globals to be constant when appropriateDavid Terei2010-06-211-12/+12
| | | | | | | 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-2/+3
|
* Fix negate op not working for -0 in llvm backendDavid Terei2010-06-211-2/+3
|
* Add support of TNTC to llvm backendDavid Terei2010-06-181-21/+19
| | | | | | | 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/+958
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.