[llvm] [Transforms] Base default constructor of LoopVectorizeOptions off command line parameters (PR #83645)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 18:29:28 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: AtariDreams (AtariDreams)
<details>
<summary>Changes</summary>
Default is true, but if it is disabled then default is false.
---
Full diff: https://github.com/llvm/llvm-project/pull/83645.diff
1 Files Affected:
- (modified) llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h (+2-6)
``````````diff
diff --git a/llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h b/llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h
index d09fc328c452ff..59683462dd15ff 100644
--- a/llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h
+++ b/llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h
@@ -124,13 +124,9 @@ struct LoopVectorizeOptions {
/// EnableLoopInterleaving = true and EnableLoopVectorization = true. This
/// means that interleaving default is consistent with the cl::opt flag, while
/// vectorization is not.
- /// FIXME: The default for EnableLoopVectorization in the cl::opt should be
- /// set to true, and the corresponding change to account for this be made in
- /// opt.cpp. The initializations below will become:
- /// InterleaveOnlyWhenForced(!EnableLoopInterleaving)
- /// VectorizeOnlyWhenForced(!EnableLoopVectorization).
LoopVectorizeOptions()
- : InterleaveOnlyWhenForced(false), VectorizeOnlyWhenForced(false) {}
+ : InterleaveOnlyWhenForced(!EnableLoopInterleaving),
+ VectorizeOnlyWhenForced(!EnableLoopVectorization) {}
LoopVectorizeOptions(bool InterleaveOnlyWhenForced,
bool VectorizeOnlyWhenForced)
: InterleaveOnlyWhenForced(InterleaveOnlyWhenForced),
``````````
</details>
https://github.com/llvm/llvm-project/pull/83645
More information about the llvm-commits
mailing list