[PATCH] D26873: [LV] Do not vectorize loops with a low dynamic tripcount, as determined by profile information

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 09:50:36 PST 2017


davidxl added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:7182
   // do not vectorize loops with a tiny trip count.
-  const unsigned TC = SE->getSmallConstantTripCount(L);
-  if (TC > 0u && TC < TinyTripCountVectorThreshold) {
-    DEBUG(dbgs() << "LV: Found a loop with a very small trip count. "
-                 << "This loop is not worth vectorizing.");
+  bool KnownTC = false;
+  unsigned TC = SE->getSmallConstantTripCount(L);
----------------
This looks like a reusable/common utility function (combine static count and profile count). Probably extract it out?


https://reviews.llvm.org/D26873





More information about the llvm-commits mailing list