I am working on an internal data structure overhaul in the vectorizer to support future changes. The first task is to remove the non-SLP representation which will simplify code and improve maintainability. This first task is actually the most difficult and time-consuming one.
I have pushed the current state of my work as a series of commits onto the rguenth/forceslp git branch. The first commits in the series are improvements/fixes for trunk I plan to commit once stage1 opens again. The real changes done sofar are - allow group_size == 1 SLP instances - force vectorization fail when non-SLP stmts are left as debugging tool to see what remains to be done - make the SLP graph cyclic to handle cycles in inner loops with outer loop vectorization - start to rewrite reduction handling - I've split out nested cycles handling sofar which now is much simpler and handles almost arbitrary inner loops vectorizer testsuite summary on x86_64 is === gcc Summary === # of expected passes 3103 # of unexpected failures 85 # of unexpected successes 10 # of expected failures 52 # of unsupported tests 30 === g++ Summary === # of expected passes 255 # of expected failures 6 # of unsupported tests 3 === gfortran Summary === # of expected passes 131 # of unexpected failures 8 # of unsupported tests 1 where a PASS of course doesn't mean the generated code has the same quality than before. The main remaining issues are reduction handling (esp. condition reduction and other cases that were never implemented for SLP) plus interleaving cases that cannot be handled within the current SLP permutation framework (require more than two source vectors). For the interleaving issue I have to tackle part two of the data structure overhaul and rework permutation handling to be represented more explicit in the SLP graph and make sure we do not ever need to throw away / dissolve DR groups. There are various vectorizations that lack SLP support on current trunk and you are free to contribute missing pieces there. I hope to not get too many extra road-blocks from changes done on trunk, so please do not add new features w/o considering SLP support ;) Thanks, Richard.