[llvm] [LV] Nest cl::opts under namespace llvm (NFC) (PR #221891)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 23:48:36 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Ramkumar Ramachandra (artagnon)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/221891.diff


2 Files Affected:

- (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Vectorize/VPlan.h (+3) 


``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index e027dfa834759..6975484e06618 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -306,7 +306,7 @@ static cl::opt<bool> EnableLoadStoreRuntimeInterleave(
         "Enable runtime interleaving until load/store ports are saturated"));
 
 /// The number of stores in a loop that are allowed to need predication.
-cl::opt<unsigned> NumberOfStoresToPredicate(
+cl::opt<unsigned> llvm::NumberOfStoresToPredicate(
     "vectorize-num-stores-pred", cl::init(1), cl::Hidden,
     cl::desc("Max number of stores to be predicated behind an if."));
 
@@ -382,7 +382,7 @@ cl::opt<bool> llvm::VPlanPrintVectorRegionScope(
 // VPlan-native vectorization path. It must be used in conjuction with
 // -enable-vplan-native-path. -vplan-verify-hcfg can also be used to enable the
 // verification of the H-CFGs built.
-cl::opt<bool> VPlanBuildOuterloopStressTest(
+cl::opt<bool> llvm::VPlanBuildOuterloopStressTest(
     "vplan-build-outerloop-stress-test", cl::init(false), cl::Hidden,
     cl::desc(
         "Build VPlan for every supported loop nest in the function and bail "
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index e9f18506af7c2..58c58b5ac5ca6 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -51,6 +51,9 @@
 
 namespace llvm {
 
+LLVM_ABI extern cl::opt<unsigned> NumberOfStoresToPredicate;
+LLVM_ABI extern cl::opt<bool> VPlanBuildOuterloopStressTest;
+
 class BasicBlock;
 class DominatorTree;
 class InnerLoopVectorizer;

``````````

</details>


https://github.com/llvm/llvm-project/pull/221891


More information about the llvm-commits mailing list