3 ms·
The problem is that often the compiler can't automatically vectorize because some preconditions are not met. The knowledge about those preconditions is mostly l
by legulere 11y ago
The problem is that often the compiler can't automatically vectorize because some preconditions are not met. The knowledge about those preconditions is mostly limited to compiler people and so far, by what I know, there's no static analysis tool that tells you why the compiler couldn't vectorize a loop.
- claudius 11y agoThe Intel compiler has various options to report autovectorisation success. You still have to go through them and follow the advice, of course, but by and large they are not entirely useless.
- leecb 11y agoClang can tell you why a loop wasn't vectorized with a couple of compiler flags: -Rpass-analysis=loop-vectorize -Rpass-missed=loop-vectorized http://llvm.org/docs/Vectorizers.html#diagnostics http://llvm.org/docs/Vectorizers.html#diagnostics
- RogerL 11y agoMSVC also will report whether vectorization succeeded, and why it didn't if it failed.
- flamedoge 11y agodo a profile run and I'll bet you it will insert as many runtime checks necessary to get around those precondition checks.