by wyldfire · 8y ago · 0 comments
This makes sense when you think about it. The compiler would either need to be extremely capable of generalizing about some kinds of arithmetic, or it would need millions of special cases to recognize. By writing your own vectorization, you are basically covering your singular special case on your own.
JITs could solve that problem, but few JITs currently do very much auto vectorization, because they don't have time.
Does LLVM not support GCC-style function multiversioning?
Edit adding citation: http://lists.llvm.org/pipermail/llvm-announce/2018-September...
ART started supporting SIMD on Oreo, and it was further expanded on Pie. Naturally very few devices have gotten those improvements thanks the state of Android's updates.
So on Android's case Renderscript is still the best way for a JIT like approach for SIMD.
ART is a good point, compile on install lets you do this.
http://cr.openjdk.java.net/~vlivanov/talks/2017_Vectorizatio...
https://software.intel.com/sites/default/files/managed/19/ae...
Also the Vector API development is ongoing and there is a talk at this week's Oracle ONE about the current state.
ART no longer compiles on install since Android 7, that behaviour is specific to Android 5 and 6 versions.
Since 7 it is a multistage runtime with hand written in Assembly interpreter, JIT + PGO, AOT + PGO on idle device. And as of 9, PGO data gets uploaded into the store and shared across devices on installation.