Auto-vectorization optimization passes cost

Hi,

I see that the BBVectorize optimization pass is awfully slow in the kind of LLVM IR code that we generate and JIT (tested with LLVM 3.8). I also activate LoopVectorize and SLPVectorize which are much faster. Since AFAIR BBVectorize was developed first in the history of auto-vectorization passes, what is the status of these different passes? Can we safely only use LoopVectorize and SLPVectorize ? Do they cover the same use cases that BBVectorize was solving?

Thanks.

Stéphane Letz

Hi Stéphane,

Yes, you should be using only LoopVectorize and SLPVectorize in production. If you find something that BBVectorize usefully vectorizes, and SLPVectorize does not, please file a bug. SLPVectorize should cover all of the use cases that BBVectorize covers, but it uses a stricter set of heuristics to find candidates, and sometimes misses things that BBVectorize gets.

-Hal