- Force vectorization even if scalar cost is lower than any of vector cost, but Hints.Force is true;
- 2 statistics numbers for LV introduced: # of analyzed loops & # of vectorized loops.
- minor cosmetic fixes.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
2 statistics numbers for LV introduced: # of analyzed loops & # of vectorized loops.
I extracted this feature into the separate patch.
Comment Actions
Hi Zinovy,
Sorry for the delay.
LGTM. Just a few small things.
+ Check the loop for a trip count threshold:
+ do not vectorize loops with a tiny trip count.
+ {
+ BasicBlock *Latch = L->getLoopLatch();
Could you remove the extra braces?
+ if (ForceVectorization && VF > 1) {
+ Width = 2;
+ Cost = expectedCost(Width) / (float)Width;
+ }
Could you add a comment to explain that scalar width is not considered because the user wants vectorization.
Thanks for working on this,
Tyler