Vectorizibility checking
As promised, I've begun breaking up !220 into smaller parts for easier review.
This is the first of probably 3-4 MR's incorporating improved explicit-SIMD capabilities.
This MR implements:
- Improvements to the VectorizabilityChecker to allow functions known to be vectorizable in OpenCL and relational operators.
- Implementation of 'compile-time constants', which are allowed to exist in a vector-index, an example would be:
<> c = 1
a[i + c] = 1
where a
is a vector.
Currently the supported behavior here is to allow these during vectorizability-checking, but raise a LoopyError
during code-generation, as the logic necessary to convert the above to the correct vstoren
is forthcoming in the shuffles & loads MR
3. Tests for both the above additions
One obvious improvement we could implement (if we wanted) is a per-target VectorizabilityChecker
, which would let us specify different lists of vectorizable functions for OpenCL and ISPC, but I didn't deem that a huge priority.
Edited by Nick Curtis