summaryrefslogtreecommitdiff
path: root/compiler/llvmGen/Llvm/AbsSyn.hs
Commit message (Collapse)AuthorAgeFilesLines
* Modules: Llvm (#13009)Sylvain Henry2020-02-181-352/+0
|
* A bunch of typofixesGabor Greif2017-09-261-2/+2
|
* compiler: introduce custom "GhcPrelude" PreludeHerbert Valerio Riedel2017-09-191-0/+2
| | | | | | | | | | | | | | | | | | This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989
* Fix note references and some typosGabor Greif2017-07-261-2/+2
|
* Typos in comments [ci skip]Gabor Greif2017-05-261-1/+1
|
* Spelling fixes in comments [ci skip]Gabor Greif2017-01-181-1/+1
|
* LLVM: Implement atomic operations in terms of LLVM primitivesBen Gamari2015-10-021-2/+40
| | | | | | | | | | | | | | | | | | | This fixes Trac #7883. This adds proper support for, * `MO_AtomicRMW` * `MO_AtomicWrite` * `MO_CmpXChg` Test Plan: Validate Reviewers: rrnewton, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1282 GHC Trac Issues: #7883
* Support MO_{Add,Sub}IntC and MO_Add2 in the LLVM backendMichal Terepeta2015-07-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This includes: - Adding new LlvmType called LMStructP that represents an unpacked struct (this is necessary since LLVM's instructions the llvm.sadd.with.overflow.* return an unpacked struct). - Modifications to LlvmCodeGen.CodeGen to generate the LLVM instructions for the primops. - Modifications to StgCmmPrim to actually use those three instructions if we use the LLVM backend (so far they were only used for NCG). Test Plan: validate Reviewers: austin, rwbarton, bgamari Reviewed By: bgamari Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D991 GHC Trac Issues: #9430
* llvmGen: move to LLVM 3.6 exclusivelyBen Gamari2015-02-091-5/+8
| | | | | | | | | | | | | | | | | | | Summary: Rework llvmGen to use LLVM 3.6 exclusively. The plans for the 7.12 release are to ship LLVM alongside GHC in the interests of user (and developer) sanity. Along the way, refactor TNTC support to take advantage of the new `prefix` data support in LLVM 3.6. This allows us to drop the section-reordering component of the LLVM mangler. Test Plan: Validate, look at emitted code Reviewers: dterei, austin, scpmw Reviewed By: austin Subscribers: erikd, awson, spacekitteh, thomie, carter Differential Revision: https://phabricator.haskell.org/D530 GHC Trac Issues: #10074
* Re-add more primops for atomic ops on byte arraysJohan Tibell2014-06-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | This is the second attempt to add this functionality. The first attempt was reverted in 950fcae46a82569e7cd1fba1637a23b419e00ecd, due to register allocator failure on x86. Given how the register allocator currently works, we don't have enough registers on x86 to support cmpxchg using complicated addressing modes. Instead we fall back to a simpler addressing mode on x86. Adds the following primops: * atomicReadIntArray# * atomicWriteIntArray# * fetchSubIntArray# * fetchOrIntArray# * fetchXorIntArray# * fetchAndIntArray# Makes these pre-existing out-of-line primops inline: * fetchAddIntArray# * casIntArray#
* Revert "Add more primops for atomic ops on byte arrays"Johan Tibell2014-06-261-7/+0
| | | | | | | | This commit caused the register allocator to fail on i386. This reverts commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and 04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 (the second being a fix to the first).
* Add more primops for atomic ops on byte arraysJohan Tibell2014-06-241-0/+7
| | | | | | | | | | | | | | | | | | | Summary: Add more primops for atomic ops on byte arrays Adds the following primops: * atomicReadIntArray# * atomicWriteIntArray# * fetchSubIntArray# * fetchOrIntArray# * fetchXorIntArray# * fetchAndIntArray# Makes these pre-existing out-of-line primops inline: * fetchAddIntArray# * casIntArray#
* Iteration on dterei's metadata designPeter Wortmann2013-06-271-15/+5
| | | | | | | | | | | | | | | | | | | | | - MetaArgs is not needed, as variables are already meta data - Same goes for MetaVal - its only reason for existing seems to be to support LLVM's strange pretty-printing for meta-data annotations, and I feel that is better to keep the data structure clean and handle it in the pretty-printing instead. - Rename "MetaData" to "MetaAnnot". Meta-data is still meta-data when it is not associated with an expression or statement - for example compile unit data for debugging. I feel the old name was a bit misleading. - Make the renamed MetaAnnot a proper data type instead of a type alias for a pair. - Rename "MetaExpr" constructor to "MetaStruct". As the data is much more like a LLVM structure (not array, as it can contain values). - Fix a warning
* Add ability to call functions with metadata as arguments to LLVMDavid Terei2013-06-271-0/+21
| | | | backend.
* Rework LLVM metadata representation to be more accurate.David Terei2013-06-271-4/+3
|
* Fixed moer tyopsGabor Greif2013-04-251-8/+8
|
* Add support for LLVM vectors.Geoffrey Mainland2013-02-011-0/+15
| | | | | This patch adds support for LLVM vectors and vector operations to our internal LLVM abstract syntax data types.
* Improve support for LLVM >= 3.0 write barrier. (#5814)David Terei2012-01-301-7/+18
|
* llvmGen: Use new fence instructionBen Gamari2012-01-301-0/+10
| | | | Signed-off-by: David Terei <davidterei@gmail.com>
* Add Metadata support to LLVM bindings.David Terei2012-01-121-0/+15
|
* Add new mem{cpy,set,move} cmm prim ops.David Terei2011-05-311-0/+6
|
* LLVM: Add inline assembly to binding.David Terei2010-07-141-0/+13
|
* LLVM: Allow getelementptr to use LlvmVar for indexes.David Terei2010-07-121-4/+2
|
* LLVM: Fix various typos in commentsDavid Terei2010-07-071-4/+4
|
* LLVM: Add alias type defenitions to LlvmModule.David Terei2010-07-071-0/+3
|
* LLVM: Use the inbounds keyword for getelementptr instructions.David Terei2010-07-021-1/+2
|
* Add support for parameter attributes to the llvm BE bindingDavid Terei2010-06-241-0/+3
| | | | | | 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-3/+0
| | | | | | | 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.
* Add support of TNTC to llvm backendDavid Terei2010-06-181-3/+6
| | | | | | | 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/+209
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.