[PATCH] D81416: [LV][SLP] Interleave to expose ILP for small loops with scalar reductions.

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 11:31:42 PDT 2020


bmahjour added a comment.

The rationale for allowing more aggressive interleaving on small loops with reductions makes sense to me, and this is going to be off by default, so I think it should be fine. But I'll let others comment first.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5368
+  LLVM_DEBUG(dbgs() << "LV: Loop cost is " << LoopCost << '\n'
+                    << "LV: IC is " << IC << '\n'
+                    << "LV: VF is " << VF << '\n');
----------------
IC reported here may be different from the interleave count that is finally returned from this function. It's probably better not to emit it here since it's not finalized. The VF is also available elsewhere in the debug trace, so not sure if it's worth changing this debug output.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5409
+      LLVM_DEBUG(dbgs() << "LV: Interleaving to expose ILP.\n");
+      return std::max(IC / 2, SmallIC);
+    } else {
----------------
What's the significance of the value `2` here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81416





More information about the llvm-commits mailing list