pawosm-arm wrote:

> Meanwhile, I'll try to prepare a rudimentary PoC for this.

I've prepared a PoC (presented here in a new commit), it's not perfect (an 
assertion is failing on one of the clang tests, and there are some formatting 
complaints), but at least it demonstrates the idea and the challenges it 
produces. The amount of code that had to be changed is stunning, and I've got a 
feeling, the usability of it (in the C++ code) is not as pleasant as it used to 
be with encoding scalable sizes as negative values (it is still OK-ish in C 
though). Some notorious example is the `concat<>()` function, some may wish to 
mix scalable and fixed vectors in one concatenation, and it won't be easy to 
express with current approach. It would be best to encode scalability as a 
trait of the size-handling data type (e.g. some custom-made `vector_size_t`), 
which could carry both the size and scalability information, but this couldn't 
be passed as a template parameter to the `cpp:simd<>` type, not in C++17 at 
least (and, as I checked, some of the C++ codes in libc that include this 
`simd.h` file are explicitly compiled with `-std=c++17`). I still think my 
previous idea was neater.


https://github.com/llvm/llvm-project/pull/183307
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to