[LLVMdev] How to broaden the SLP vectorizer's search

Frank Winter fwinter at jlab.org
Thu Aug 7 08:58:47 PDT 2014


The BB vectorizer has an option 'bb-vectorizer-search-limit'. Is there a 
similar option for the SLP vectorizer? Maybe an analysis pass' scope 
that can be widen?

I have large basic blocks with instructions that should be merged into 
packed versions. However, the blocks are optimized independently from 
each other. Now, if the instructions to be merged aren't too far apart 
the SLP vectorizer successfully packs the instructions within a block. 
However, from a certain distance between the instructions on the SLP 
vectorizer won't detect anymore the groups of instructions that can be 
packed. There's no interleaved data dependency that would prevent 
vectorizing. I am almost certain that's the vectorizer must have a 
maximum distance set somewhere or indirectly through dependent analysis 
passes.

I tried the BB vectorizer, but for whatever reason it starts emitting 
extractvector/shufflevector instructions which I am sure aren't 
necessary. So, until further investigation I'd like to stick to SLP.

Ideally, I'd like the maximum distance to be infinite, thus removing 
this restriction. I am aware of the consequent search time growth.

Anyone any insights?

Frank




More information about the llvm-dev mailing list