summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-11-02 17:28:40 -0400
committerBen Gamari <ben@smart-cactus.org>2017-11-02 20:15:47 -0400
commit15f788f5e5096641245a4f060600a6db9cbc2c4e (patch)
tree99fa80ab340ffc5860eb5abef778c54d68da3e22
parent43537568579a63cb6b8d70b4815d76c46bb9a692 (diff)
downloadhaskell-15f788f5e5096641245a4f060600a6db9cbc2c4e.tar.gz
llvmGen: Pass vector arguments in vector registers by default
Earlier this year Edward Kmett requested [1] that we enable passing of vector values in vector registers by default. The GHC calling convention changes have been in LLVM for a number of years now so let's just flip the switch. [1] https://mail.haskell.org/pipermail/ghc-devs/2017-March/013905.html Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4142
-rw-r--r--compiler/main/DynFlags.hs5
-rw-r--r--docs/users_guide/using-optimisation.rst12
2 files changed, 15 insertions, 2 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index a421284779..825497e8ba 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3757,7 +3757,7 @@ fFlagsDeps = [
flagSpec "kill-one-shot" Opt_KillOneShot,
flagSpec "late-dmd-anal" Opt_LateDmdAnal,
flagSpec "liberate-case" Opt_LiberateCase,
- flagHiddenSpec "llvm-pass-vectors-in-regs" Opt_LlvmPassVectorsInRegisters,
+ flagSpec "llvm-pass-vectors-in-regs" Opt_LlvmPassVectorsInRegisters,
flagHiddenSpec "llvm-tbaa" Opt_LlvmTBAA,
flagHiddenSpec "llvm-fill-undef-with-garbage" Opt_LlvmFillUndefWithGarbage,
flagSpec "loopification" Opt_Loopification,
@@ -4051,7 +4051,8 @@ defaultFlags settings
Opt_RPath,
Opt_SharedImplib,
Opt_SimplPreInlining,
- Opt_VersionMacros
+ Opt_VersionMacros,
+ Opt_LlvmPassVectorsInRegisters
]
++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns]
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 4714de7788..fc958e011c 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -493,6 +493,18 @@ by saying ``-fno-wombat``.
self-recursive saturated tail calls into local jumps rather than
function calls.
+.. ghc-flag:: -fllvm-pass-vectors-in-regs
+ :shortdesc: Pass vector value in vector registers for function calls
+ :type: dynamic
+ :reverse: -fno-llvm-pass-vectors-in-regs
+ :category:
+
+ :default: on
+
+ Instructs GHC to use the platform's native vector registers to pass vector
+ arguments during function calls. As with all vector support, this requires
+ :ghc-flag:`-fllvm`.
+
.. ghc-flag:: -fmax-inline-alloc-size=⟨n⟩
:shortdesc: *default: 128.* Set the maximum size of inline array allocations
to ⟨n⟩ bytes (default: 128).