[PATCH] D115261: [LV] Disable runtime unrolling for vectorized loops.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 05:03:43 PDT 2022


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: pcwang-thead.

LGTM. I think we should start with this patch, as the more conservative variant to D131972 <https://reviews.llvm.org/D131972>. We can then explore applying that one on top.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7539
 
-static void AddRuntimeUnrollDisableMetaData(Loop *L) {
+static void AddRuntimeUnrollDisableMetaData(Loop *L, StringRef UnrollMD) {
   SmallVector<Metadata *, 4> MDs;
----------------
Should probably drop Runtime from the name?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:10450
     if (DisableRuntimeUnroll)
-      AddRuntimeUnrollDisableMetaData(L);
+    AddRuntimeUnrollDisableMetaData(L, "llvm.loop.unroll.runtime.disable");
 
----------------
Broken indent?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115261



More information about the llvm-commits mailing list