- 13 Oct, 2015 1 commit
-
-
Erik de Castro Lopo authored
Before this commit, GHC only supported LLVM 3.6. Now it only supports LLVM 3.7 which was released in August 2015. LLVM version 3.6 and earlier do not work on AArch64/Arm64, but 3.7 does. Also: * Add CC_Ghc constructor to LlvmCallConvention. * Replace `maxSupportLlvmVersion`/`minSupportLlvmVersion` with a single `supportedLlvmVersion` variable. * Get `supportedLlvmVersion` from version specified in configure.ac. * Drop llvmVersion field from DynFlags (no longer needed because only one version is supported). Test Plan: Validate on x86_64 and arm Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1320 GHC Trac Issues: #10953
-
- 09 Oct, 2015 2 commits
-
-
Erik de Castro Lopo authored
Pushed by mistacke before it was ready. This reverts commit 5dc3db74.
-
Erik de Castro Lopo authored
-
- 02 Oct, 2015 1 commit
-
-
Ben Gamari authored
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
-
- 04 Jul, 2015 1 commit
-
-
Michal Terepeta authored
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
-
- 21 Nov, 2014 1 commit
-
-
Ben Gamari authored
Due to changes in LLVM 3.5 aliases now may only refer to definitions. Previously to handle symbols defined outside of the current commpilation unit GHC would emit both an `external` declaration, as well as an alias pointing to it, e.g., @stg_BCO_info = external global i8 @stg_BCO_info$alias = alias private i8* @stg_BCO_info Where references to `stg_BCO_info` will use the alias `stg_BCO_info$alias`. This is not permitted under the new alias behavior, resulting in errors resembling, Alias must point to a definition i8* @"stg_BCO_info$alias" To fix this, we invert the naming relationship between aliases and definitions. That is, now the symbol definition takes the name `@stg_BCO_info$def` and references use the actual name, `@stg_BCO_info`. This means the external symbols can be handled by simply emitting an `external` declaration, @stg_BCO_info = external global i8 Whereas in the case of a forward declaration we emit, @stg_BCO_info = alias private i8* @stg_BCO_info$def Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D155
-
- 15 May, 2014 1 commit
-
-
Herbert Valerio Riedel authored
In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been reorganized, while following the convention, to - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before any `{-# OPTIONS_GHC #-}`-lines. - Moreover, if the list of language extensions fit into a single `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each individual language extension. In both cases, try to keep the enumeration alphabetically ordered. (The latter layout is preferable as it's more diff-friendly) While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
-
- 27 Jun, 2013 7 commits
-
-
Peter Wortmann authored
This combined patch reworks the LLVM backend in a number of ways: 1. Most prominently, we introduce a LlvmM monad carrying the contents of the old LlvmEnv around. This patch completely removes LlvmEnv and refactors towards standard library monad combinators wherever possible. 2. Support for streaming - we can now generate chunks of Llvm for Cmm as it comes in. This might improve our speed. 3. To allow streaming, we need a more flexible way to handle forward references. The solution (getGlobalPtr) unifies LlvmCodeGen.Data and getHsFunc as well. 4. Skip alloca-allocation for registers that are actually never written. LLVM will automatically eliminate these, but output is smaller and friendlier to human eyes this way. 5. We use LlvmM to collect references for llvm.used. This allows places other than cmmProcLlvmGens to generate entries.
-
Peter Wortmann authored
I am not quite sure at what point it makes sense to look at arrays as pointers, but I ran into at least one use case that strongly suggested doing it this way (calculating the actual size of structures, to be exact).
-
Peter Wortmann authored
Also give them a proper constructor - getGlobalVar and getGlobalValue map directly to the accessors.
-
Peter Wortmann authored
This patch reworks some parts of the LLVM pretty-printing code that were still using Show and String. Now we should be using SDoc and Outputable throughout. Note that many get*Name functions become pp*Name here as a side-effect.
-
Peter Wortmann authored
- 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
-
dterei authored
backend.
-
dterei authored
-
- 01 Feb, 2013 1 commit
-
-
gmainlan@microsoft.com authored
This patch adds support for LLVM vectors and vector operations to our internal LLVM abstract syntax data types.
-
- 17 Jan, 2013 1 commit
-
-
dterei authored
-
- 16 Sep, 2012 2 commits
-
-
ian@well-typed.com authored
-
ian@well-typed.com authored
-
- 18 Jan, 2012 1 commit
-
-
Ubuntu authored
-
- 12 Jan, 2012 1 commit
-
-
dterei authored
-
- 06 Jul, 2011 1 commit
-
-
dterei authored
-
- 20 Jul, 2010 1 commit
-
-
dterei authored
-
- 13 Jul, 2010 1 commit
-
-
Ian Lynagh authored
-
- 07 Jul, 2010 3 commits
-
-
dterei authored
-
dterei authored
-
dterei authored
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.
-
- 05 Jul, 2010 2 commits
- 28 Jun, 2010 1 commit
-
-
dterei authored
-
- 25 Jun, 2010 1 commit
-
-
dterei authored
-
- 24 Jun, 2010 1 commit
-
-
dterei authored
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.
-
- 22 Jun, 2010 1 commit
-
-
dterei authored
-
- 21 Jun, 2010 2 commits
- 18 Jun, 2010 1 commit
-
-
dterei authored
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.
-
- 15 Jun, 2010 1 commit
-
-
dterei authored
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.
-