[PATCH] D67805: [LV] Allow vectorization of hot short trip count loops with epilog

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 00:33:10 PST 2019


ebrevnov marked an inline comment as done.
ebrevnov added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7411
+        if (LoopCount && FunctionCount &&
+            (*LoopCount > *FunctionCount * LocalHotnessThreshold)) {
+          LLVM_DEBUG(dbgs() << "Allow epilog for short trip count loop due to "
----------------
Some rational for the chosen heuristic. In general if nobody actually asked to optimize for size it seems reasonable to relay on cost model to decide if vectorization is profitable or not even for short trip count loops. If we still want to have some balance between code bloat and performance we should decide based on potential gain and loop size for all loops. Even though the described approach looks simple and reasonable in theory it most likely will have big implications on existing apps. That's why I decided take more conservative approach and give a chance for hot loops to be vectorized. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67805/new/

https://reviews.llvm.org/D67805





More information about the llvm-commits mailing list