summaryrefslogtreecommitdiff
path: root/compiler/llvmGen/LlvmCodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Remove some CPP from llvmGen/LlvmCodeGen/Ppr.hsIan Lynagh2012-08-281-35/+24
| | | | | | I changed the behaviour slightly, e.g. i386/FreeBSD will no longer fall through and use the Linux "i386-pc-linux-gnu", but will get the final empty case instead. I assume that that's the right thing to do.
* Move activeStgRegs into CodeGen.PlatformIan Lynagh2012-08-212-16/+25
|
* Fix inverted test for platformUnregisterised (should fix the optllvm breakage)Simon Marlow2012-08-211-2/+2
|
* Define callerSaves for all platformsIan Lynagh2012-08-071-5/+5
| | | | | | | | This means that we now generate the same code whatever platform we are on, which should help avoid changes on one platform breaking the build on another. It's also another step towards full cross-compilation.
* Add "Unregisterised" as a field in the settings fileIan Lynagh2012-08-072-14/+16
| | | | | | To explicitly choose whether you want an unregisterised build you now need to use the "--enable-unregisterised"/"--disable-unregisterised" configure flags.
* New codegen: do not split proc-points when using the NCGSimon Marlow2012-07-301-2/+3
| | | | | | | | | Proc-point splitting is only required by backends that do not support having proc-points within a code block (that is, everything except the native backend, i.e. LLVM and C). Not doing proc-point splitting saves some compilation time, and might produce slightly better code in some cases.
* Warn if using unsupported version of LLVM.David Terei2012-06-251-2/+9
|
* Fix #6158. LLVM 3.1 doesn't like certain constructions that 3.0 andDavid Terei2012-06-251-3/+15
| | | | earlier did, so we avoid them.
* Remove some more redundant Platform argumentsIan Lynagh2012-06-201-3/+3
|
* Use SDoc rather than Doc in LLVMIan Lynagh2012-06-123-9/+14
| | | | | In particular, this makes life simpler when we want to use a general GHC SDoc in the middle of some LLVM.
* Add a quotRemWord2 primopIan Lynagh2012-04-211-6/+7
| | | | | | | | It allows you to do (high, low) `quotRem` d provided high < d. Currently only has an inefficient fallback implementation.
* 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>
* Fix validation errorDavid Terei2012-01-121-2/+2
|
* Add '-freg-liveness' flag to control if STG liveness informationDavid Terei2012-01-122-16/+27
| | | | is used for optimisation. (enabled by default)
* Improve LLVM TBAA hierachy (#5567).David Terei2012-01-122-3/+10
|
* Use Type Based Alias Analysis (TBAA) in LLVM backend (#5567)David Terei2012-01-123-34/+84
| | | | | | | 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.
* More improvements to llvm output style (#5750)David Terei2012-01-121-1/+1
|
* Track STG live register information for use in LLVMDavid Terei2012-01-092-11/+29
| | | | | | | | | 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
|
* Fix trac # 5486David Terei2011-12-052-5/+27
| | | | | | | | | LLVM has a problem when the user imports some FFI types like memcpy and memset in a manner that conflicts with the types that GHC uses internally. So now we pre-initialise the environment with the most general types for these functions.
* Remove unused importSimon Peyton Jones2011-12-041-1/+0
|
* Fix ugly complexity issue in LLVM backend (#5652)David Terei2011-12-032-33/+25
| | | | | | | | 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.
* Formatt wibbleDavid Terei2011-12-031-1/+0
|
* Add CCS for llvmDavid Terei2011-12-031-9/+18
|
* 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-024-37/+43
| | | | And some knock-on changes
* Renaming onlySimon Peyton Jones2011-08-253-17/+17
| | | | | CmmTop -> CmmDecl CmmPgm -> CmmGroup
* enable ARM specific target data layout and triple againKarel Gardas2011-08-211-5/+5
| | | | | | | | | | This patch is allowed by the 'on ARMv7 with VFPv3[D16] support pass appropriate -mattr value to LLVM llc' patch. The trick is that LLVM by default (probably!) does not enable VFP, but GHC requires it so LLVM's llc asserts on unavailable floating point register. i.e. GHC/LLVM backend compiles into LLVM code which is using floats, but llc thinks no float regs for this are available. Passing appropriate llc option which is implemented in patch mentioned above fixes this issue.
* Add popcnt support to LLVM backendDavid Terei2011-08-201-0/+24
|
* disable for now ARM specific target data layout and tripleKarel Gardas2011-08-101-5/+5
| | | | | | | | This patch disables ARM specific target data layout and triple. The reason for this is that LLVM asserts on some files if this is in use. The assert looks: Formal argument #8 has unhandled type i32UNREACHABLE executed at /llvm-ghc-arm/lib/CodeGen/CallingConvLower.cpp:81!
* fix ARM/LLVM target data layout specification together with target tripleKarel Gardas2011-08-101-2/+2
| | | | | | This patch fixes ARM/LLVM target data layout specification based on what Clang is using itself. I've modified Clang's used triple a little bit from armv4t-* to arm-* though
* LLVM: set target data layout for arm-unknown-linux tripletKarel Gardas2011-08-101-1/+8
|
* Refactoring: explicitly mark whether we have an info table in RawCmmMax Bolingbroke2011-07-062-11/+11
| | | | | | | | | | | | 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-15/+6
|
* 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-053-7/+5
| | | | | | | | | | | | | | | | | | 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.
* 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-312-94/+178
|