Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transforms] Base default constructor of LoopVectorizeOptions on command line parameters #83645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AtariDreams
Copy link
Contributor

Default is true, but if it is disabled then default is false.

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 2, 2024

@llvm/pr-subscribers-llvm-transforms

Author: AtariDreams (AtariDreams)

Changes

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 --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),

Copy link

github-actions bot commented Mar 2, 2024

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@AtariDreams AtariDreams changed the title [Transforms] Base default constructor of LoopVectorizeOptions off command line parameters [Transforms] Base default constructor of LoopVectorizeOptions from command line parameters Mar 3, 2024
@AtariDreams AtariDreams changed the title [Transforms] Base default constructor of LoopVectorizeOptions from command line parameters [Transforms] Base default constructor of LoopVectorizeOptions on command line parameters Mar 3, 2024
…and line parameters

Default is true, but if it is disabled then default is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants