[commit: ghc] master: llvmGen: Pass vector arguments in vector registers by default (15f788f)

Gabor Greif ggreif at gmail.com
Fri Nov 3 10:44:22 UTC 2017


IIRC there are no more static flags around. So adding ":type: dynamic"
each time seems redundant. Could this be automated somehow? Or should
we remove ":type:" altogether?

Cheers,

    Gabor

On 11/3/17, git at git.haskell.org <git at git.haskell.org> wrote:
> Repository : ssh://git@git.haskell.org/ghc
>
> On branch  : master
> Link       :
> http://ghc.haskell.org/trac/ghc/changeset/15f788f5e5096641245a4f060600a6db9cbc2c4e/ghc
>
>>---------------------------------------------------------------
>
> commit 15f788f5e5096641245a4f060600a6db9cbc2c4e
> Author: Ben Gamari <bgamari.foss at gmail.com>
> Date:   Thu Nov 2 17:28:40 2017 -0400
>
>     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
>
>
>>---------------------------------------------------------------
>
> 15f788f5e5096641245a4f060600a6db9cbc2c4e
>  compiler/main/DynFlags.hs               |  5 +++--
>  docs/users_guide/using-optimisation.rst | 12 ++++++++++++
>  2 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
> index a421284..825497e 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 4714de7..fc958e0 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).
>
> _______________________________________________
> ghc-commits mailing list
> ghc-commits at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-commits
>


More information about the ghc-devs mailing list