[PATCH] Don't unroll loops in loop vectorization pass when VF is one.

Wei Mi wmi at google.com
Tue Apr 14 15:16:13 PDT 2015


>> For x86, since the extra overflow check block and memcheck block have
>> extra cost, I inclined to remove the unrolling in vectorization on
>> x86, and let regular unroller do all the jobs. For other
>> architectures, it may be better to adjust the unrolling cost model in
>> loop vectorization and let it finish the unroll job all at once, to
>> remove the extra prologue loop costs. Does it make sense?
>
> It makes sense; how does this compare, performance-wise, to other options. For example, what happens if you force the vectorizer to unroll by 4x? The main difference is the cost of the memory-overlap checking, right? I agree that avoiding the memory checks makes sense when the expected benefit from them is low.

I will try that and get back.

Thanks,
Wei.




More information about the llvm-commits mailing list