public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility
       [not found] <bug-88602-4@http.gcc.gnu.org/bugzilla/>
@ 2021-09-10  6:41 ` pinskia at gcc dot gnu.org
  2021-12-28 12:24 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10  6:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88602

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-09-10

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
confirmed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility
       [not found] <bug-88602-4@http.gcc.gnu.org/bugzilla/>
  2021-09-10  6:41 ` [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility pinskia at gcc dot gnu.org
@ 2021-12-28 12:24 ` hubicka at gcc dot gnu.org
  2024-05-21  3:26 ` jeanmichael.celerier at gmail dot com
  2024-05-21  3:36 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-12-28 12:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88602

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
In addition to Skia, Firefox gfx library now contains more clang specific
vector code:
  gfx/wr/swgl/src/vector_type.h
control vector implementation of some shader rountines (seen in the
rasterflood-gradient benchmark). It is part of new rust-based rendering library
"WebRender is a GPU-based 2D rendering engine written in
[Rust](https://www.rust-lang.org/). [Firefox](https://www.mozilla.org/firefox),
the research web browser [Servo](https://github.com/servo/servo), and other GUI
frameworks draw with it. It currently uses the 
OpenGL API internally."
  however the rendering loops are C++

  gfx/ycbcr/yuv_convert.cpp
  gfx/ycbcr/yuv_row.h
  gfx/ycbcr/yuv_row_win.cpp
this is color space conversion library imported from Chromium:
  "This color conversion code is from the Chromium open source project
available here:

   http://code.google.com/chromium/

   The code comes from svn revision 63840 on 2010-10-26.

   It has been superseded upstream by libyuv (which is spawned off it). Bug
791941 is about trying to replace this code with libyuv."

So it seems that there is now more code that does rely on these extensions.

This does show as quite noticeable difference in some rendering benchmarks (up
to 500%).  Basically these are video rendering, pdf rendering, svg rendering
and the rasterfloods.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility
       [not found] <bug-88602-4@http.gcc.gnu.org/bugzilla/>
  2021-09-10  6:41 ` [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility pinskia at gcc dot gnu.org
  2021-12-28 12:24 ` hubicka at gcc dot gnu.org
@ 2024-05-21  3:26 ` jeanmichael.celerier at gmail dot com
  2024-05-21  3:36 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: jeanmichael.celerier at gmail dot com @ 2024-05-21  3:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88602

Jean-Michaël Celerier <jeanmichael.celerier at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeanmichael.celerier@gmail.
                   |                            |com

--- Comment #4 from Jean-Michaël Celerier <jeanmichael.celerier at gmail dot com> ---
Another vote for this. It's used in the KFR DSP library which for this reason
gets restricted to clang in some configurations...

Compare

https://github.com/kfrlib/kfr/blob/main/include/kfr/simd/impl/backend_clang.hpp

and

https://github.com/kfrlib/kfr/blob/main/include/kfr/simd/impl/backend_generic.hpp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility
       [not found] <bug-88602-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2024-05-21  3:26 ` jeanmichael.celerier at gmail dot com
@ 2024-05-21  3:36 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-21  3:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88602

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jean-Michaël Celerier from comment #4)
> Another vote for this. It's used in the KFR DSP library which for this
> reason gets restricted to clang in some configurations...
> 
> Compare
> 
> https://github.com/kfrlib/kfr/blob/main/include/kfr/simd/impl/backend_clang.
> hpp
> 
> and
> 
> https://github.com/kfrlib/kfr/blob/main/include/kfr/simd/impl/
> backend_generic.hpp

Hmm, backend_clang.hpp does not use the .xyzw syntax (or anything that is not
supported by GCC's normal vector, it only uses __builtin_shufflevector (since
GCC 12) and __builtin_convertvector (since GCC 9) both which have been
supported in GCC for a few releases already.
So it could just use vector_size there instead.

Something like:
```
template <typename TT, size_t NN>
using simd = unwrap_bit<TT>
__attribute__((vector_size(NN*sizeof(unwrap_bit<TT>))));
```

And use the header for GCC >= 12.1.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-21  3:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-88602-4@http.gcc.gnu.org/bugzilla/>
2021-09-10  6:41 ` [Bug c++/88602] Consider adding ext_vector_type for better clang compatibility pinskia at gcc dot gnu.org
2021-12-28 12:24 ` hubicka at gcc dot gnu.org
2024-05-21  3:26 ` jeanmichael.celerier at gmail dot com
2024-05-21  3:36 ` pinskia at gcc dot gnu.org

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).