* [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
@ 2020-02-13 18:42 GT
2020-02-13 19:26 ` Tulio Magno Quites Machado Filho
0 siblings, 1 reply; 6+ messages in thread
From: GT @ 2020-02-13 18:42 UTC (permalink / raw)
To: libc-alpha\@sourceware.org
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
This is the first of 2 patches required to enable GCC auto-vectorization
of calls to libmvec.
The changes here should have been part of earlier patches to libmvec
which added SIMD versions of the functions.
There are a few other small patches in tuliom/libmvec that should
similarly have been part of earlier patches. Can we re-organize the
patches in tuliom/libmvec using git rebase before submitting them for
inclusion in master?
Thanks.
Bert.
[-- Attachment #2: 0001-PPC64-Attach-SIMD-attribute-to-cosf-sin-sinf-functio.patch --]
[-- Type: application/octet-stream, Size: 1918 bytes --]
From 62925e278b70ff804e2c1c851047dcff7b0611ce Mon Sep 17 00:00:00 2001
From: Bert Tenjy <bert.tenjy@gmail.com>
Date: Thu, 13 Feb 2020 11:55:31 -0600
Subject: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function
declarations.
These changes were mistakenly left out of the patches that added SIMD
versions of these functions to libmvec.
---
sysdeps/powerpc/bits/math-vector.h | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/sysdeps/powerpc/bits/math-vector.h b/sysdeps/powerpc/bits/math-vector.h
index ce10dc4bb7..66651b02f3 100644
--- a/sysdeps/powerpc/bits/math-vector.h
+++ b/sysdeps/powerpc/bits/math-vector.h
@@ -36,22 +36,28 @@
# ifdef __DECL_SIMD_PPC64
# undef __DECL_SIMD_cos
# define __DECL_SIMD_cos __DECL_SIMD_PPC64
-# undef __DECL_SIMD_log
-# define __DECL_SIMD_log __DECL_SIMD_PPC64
-# undef __DECL_SIMD_logf
-# define __DECL_SIMD_logf __DECL_SIMD_PPC64
+# undef __DECL_SIMD_cosf
+# define __DECL_SIMD_cosf __DECL_SIMD_PPC64
+# undef __DECL_SIMD_sin
+# define __DECL_SIMD_sin __DECL_SIMD_PPC64
+# undef __DECL_SIMD_sinf
+# define __DECL_SIMD_sinf __DECL_SIMD_PPC64
# undef __DECL_SIMD_sincos
# define __DECL_SIMD_sincos __DECL_SIMD_PPC64
# undef __DECL_SIMD_sincosf
# define __DECL_SIMD_sincosf __DECL_SIMD_PPC64
-# undef __DECL_SIMD_expf
-# define __DECL_SIMD_expf __DECL_SIMD_PPC64
+# undef __DECL_SIMD_log
+# define __DECL_SIMD_log __DECL_SIMD_PPC64
+# undef __DECL_SIMD_logf
+# define __DECL_SIMD_logf __DECL_SIMD_PPC64
# undef __DECL_SIMD_exp
# define __DECL_SIMD_exp __DECL_SIMD_PPC64
-# undef __DECL_SIMD_powf
-# define __DECL_SIMD_powf __DECL_SIMD_PPC64
+# undef __DECL_SIMD_expf
+# define __DECL_SIMD_expf __DECL_SIMD_PPC64
# undef __DECL_SIMD_pow
# define __DECL_SIMD_pow __DECL_SIMD_PPC64
+# undef __DECL_SIMD_powf
+# define __DECL_SIMD_powf __DECL_SIMD_PPC64
# endif
#endif
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
2020-02-13 18:42 [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations GT
@ 2020-02-13 19:26 ` Tulio Magno Quites Machado Filho
2020-02-13 19:56 ` GT
0 siblings, 1 reply; 6+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2020-02-13 19:26 UTC (permalink / raw)
To: GT, libc-alpha
GT <tnggil@protonmail.com> writes:
> This is the first of 2 patches required to enable GCC auto-vectorization
> of calls to libmvec.
>
> The changes here should have been part of earlier patches to libmvec
> which added SIMD versions of the functions.
>
> There are a few other small patches in tuliom/libmvec that should
> similarly have been part of earlier patches. Can we re-organize the
> patches in tuliom/libmvec using git rebase before submitting them for
> inclusion in master?
Could you be more specific, please?
What kind of reorganization are you suggesting?
> Subject: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function
> declarations.
>
> These changes were mistakenly left out of the patches that added SIMD
> versions of these functions to libmvec.
This patch is not just adding missing data, it's also moving lines around.
Some of them seem to be re-sorted, but not all of them.
> diff --git a/sysdeps/powerpc/bits/math-vector.h b/sysdeps/powerpc/bits/math-vector.h
> index ce10dc4bb7..66651b02f3 100644
> --- a/sysdeps/powerpc/bits/math-vector.h
> +++ b/sysdeps/powerpc/bits/math-vector.h
> @@ -36,22 +36,28 @@
> # ifdef __DECL_SIMD_PPC64
> # undef __DECL_SIMD_cos
> # define __DECL_SIMD_cos __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_log
> -# define __DECL_SIMD_log __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_logf
> -# define __DECL_SIMD_logf __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_cosf
> +# define __DECL_SIMD_cosf __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_sin
> +# define __DECL_SIMD_sin __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_sinf
> +# define __DECL_SIMD_sinf __DECL_SIMD_PPC64
> # undef __DECL_SIMD_sincos
> # define __DECL_SIMD_sincos __DECL_SIMD_PPC64
> # undef __DECL_SIMD_sincosf
> # define __DECL_SIMD_sincosf __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_expf
> -# define __DECL_SIMD_expf __DECL_SIMD_PPC64
Why are these 2 lines moving to...
> +# undef __DECL_SIMD_log
> +# define __DECL_SIMD_log __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_logf
> +# define __DECL_SIMD_logf __DECL_SIMD_PPC64
> # undef __DECL_SIMD_exp
> # define __DECL_SIMD_exp __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_powf
> -# define __DECL_SIMD_powf __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_expf
> +# define __DECL_SIMD_expf __DECL_SIMD_PPC64
... here?
--
Tulio Magno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
2020-02-13 19:26 ` Tulio Magno Quites Machado Filho
@ 2020-02-13 19:56 ` GT
2020-02-13 20:19 ` Tulio Magno Quites Machado Filho
0 siblings, 1 reply; 6+ messages in thread
From: GT @ 2020-02-13 19:56 UTC (permalink / raw)
To: Tulio Magno Quites Machado Filho
Cc: libc-alpha@sourceware.org, tnggil@protonmail.com
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, February 13, 2020 2:26 PM, Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> wrote:
> GT tnggil@protonmail.com writes:
>
> > This is the first of 2 patches required to enable GCC auto-vectorization
> > of calls to libmvec.
> > The changes here should have been part of earlier patches to libmvec
> > which added SIMD versions of the functions.
> > There are a few other small patches in tuliom/libmvec that should
> > similarly have been part of earlier patches. Can we re-organize the
> > patches in tuliom/libmvec using git rebase before submitting them for
> > inclusion in master?
>
> Could you be more specific, please?
The commits whose abbreviated ids are c1782a410f, 1bd6ae3a5a, and 29d3adfe09.
Each of them introduces a test to ensure that feature(s) used in immediately preceding
patches are available on the system.
> What kind of reorganization are you suggesting?
My understanding is that by using git rebase, each of those 3 commits can be combined
with the earlier patch that should have had the feature tests initially. I am assuming that
it is ok to re-write history in branch tuliom/libmvec in this manner. If not so, then you
may dismiss the suggestion.
> > Subject: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function
> > declarations.
> > These changes were mistakenly left out of the patches that added SIMD
> > versions of these functions to libmvec.
>
> This patch is not just adding missing data, it's also moving lines around.
> Some of them seem to be re-sorted, but not all of them.
>
..
..
..
>
> Why are these 2 lines moving to...
>
> > +# undef __DECL_SIMD_log
> > +# define __DECL_SIMD_log __DECL_SIMD_PPC64
> > +# undef __DECL_SIMD_logf
> > +# define __DECL_SIMD_logf __DECL_SIMD_PPC64
> >
> > undef __DECL_SIMD_exp
> >
> > ======================
> >
> > define __DECL_SIMD_exp __DECL_SIMD_PPC64
> >
> > =========================================
> >
> > -# undef __DECL_SIMD_powf
> > -# define __DECL_SIMD_powf __DECL_SIMD_PPC64
> > +# undef __DECL_SIMD_expf
> > +# define __DECL_SIMD_expf __DECL_SIMD_PPC64
>
> ... here?
>
I wanted to use the same order of defines/undefines as the math-vector.h for x86-64 at:
sysdeps/x86/fpu/bits/
Thanks.
Bert.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
2020-02-13 19:56 ` GT
@ 2020-02-13 20:19 ` Tulio Magno Quites Machado Filho
2020-02-13 21:00 ` GT
0 siblings, 1 reply; 6+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2020-02-13 20:19 UTC (permalink / raw)
To: GT; +Cc: libc-alpha
GT <tnggil@protonmail.com> writes:
> On Thursday, February 13, 2020 2:26 PM, Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> wrote:
>
> The commits whose abbreviated ids are c1782a410f, 1bd6ae3a5a, and 29d3adfe09.
> Each of them introduces a test to ensure that feature(s) used in immediately preceding
> patches are available on the system.
OK.
> My understanding is that by using git rebase, each of those 3 commits can be combined
> with the earlier patch that should have had the feature tests initially. I am assuming that
> it is ok to re-write history in branch tuliom/libmvec in this manner. If not so, then you
> may dismiss the suggestion.
I don't think these changes are necessary.
> I wanted to use the same order of defines/undefines as the math-vector.h for x86-64 at:
> sysdeps/x86/fpu/bits/
I also don't think these files need to be identical.
The patch LGTM if it adds the missing declarations.
--
Tulio Magno
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
2020-02-13 20:19 ` Tulio Magno Quites Machado Filho
@ 2020-02-13 21:00 ` GT
2020-02-19 18:32 ` Tulio Magno Quites Machado Filho
0 siblings, 1 reply; 6+ messages in thread
From: GT @ 2020-02-13 21:00 UTC (permalink / raw)
To: Tulio Magno Quites Machado Filho
Cc: libc-alpha@sourceware.org, tnggil@protonmail.com
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, February 13, 2020 3:19 PM, Tulio Magno Quites Machado Filho <tuliom@ascii.art.br> wrote:
> GT tnggil@protonmail.com writes:
>
> > On Thursday, February 13, 2020 2:26 PM, Tulio Magno Quites Machado Filho tuliom@ascii.art.br wrote:
> > The commits whose abbreviated ids are c1782a410f, 1bd6ae3a5a, and 29d3adfe09.
> > Each of them introduces a test to ensure that feature(s) used in immediately preceding
> > patches are available on the system.
>
> OK.
>
> > My understanding is that by using git rebase, each of those 3 commits can be combined
> > with the earlier patch that should have had the feature tests initially. I am assuming that
> > it is ok to re-write history in branch tuliom/libmvec in this manner. If not so, then you
> > may dismiss the suggestion.
>
> I don't think these changes are necessary.
>
> > I wanted to use the same order of defines/undefines as the math-vector.h for x86-64 at:
> > sysdeps/x86/fpu/bits/
>
> I also don't think these files need to be identical.
>
> The patch LGTM if it adds the missing declarations.
>
Can I let the patch remain as is? Or should I send a new version with
only the missing declarations added? Meaning the new patch will not
reorder existing lines in the header?
Bert.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
2020-02-13 21:00 ` GT
@ 2020-02-19 18:32 ` Tulio Magno Quites Machado Filho
0 siblings, 0 replies; 6+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2020-02-19 18:32 UTC (permalink / raw)
To: GT, libc-alpha
GT <tnggil@protonmail.com> writes:
> Can I let the patch remain as is?
Sure. I can make the changes here.
--
Tulio Magno
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-02-19 18:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 18:42 [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations GT
2020-02-13 19:26 ` Tulio Magno Quites Machado Filho
2020-02-13 19:56 ` GT
2020-02-13 20:19 ` Tulio Magno Quites Machado Filho
2020-02-13 21:00 ` GT
2020-02-19 18:32 ` Tulio Magno Quites Machado Filho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).