This patch adds a pass to decompose vectors into scalar operations
at the IR level. I wanted this for System z because the architecture
does not have vector instructions and because scalarising at the IR
level exposes more optimisation opportunities.
It sounded like others are interested too, e.g.:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066790.html
and:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066798.html
where the pass could be used to scalarise OpenCL kernels and then
revectorise them to match the target.
In this initial version the patch does nothing unless -enable-decompose-vectors
is passed or unless the target says that it is beneficial. At the moment,
no targets say that, but I have a follow-on patch to make it the default
for SystemZ. You can force the pass off using -enable-decompose-vectors=false.
(This was all based on the -combiner-alias-analysis option.)
This is my first IR pass, so please let me know if I'm doing it wrong.