Skip to content

[LV] Remove unused configuration option #82955

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

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

nilanjana87
Copy link
Contributor

@nilanjana87 nilanjana87 commented Feb 26, 2024

Recent set of changes (Ref: #67725) in loop interleaving algorithm removed the loop trip count threshold for allowing interleaving. Therefore configuration option interleave-small-loop-scalar-reduction option is no longer needed.

@llvmbot
Copy link
Member

llvmbot commented Feb 26, 2024

@llvm/pr-subscribers-backend-powerpc

@llvm/pr-subscribers-llvm-transforms

Author: Nilanjana Basu (nilanjana87)

Changes

Recent set of changes (Ref: #67725) in loop interleaving algorithm removed the loop trip count threshold for allowing interleaving. Therefore interleave-small-loop-scalar-reduction option is no longer useful.


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

1 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (+1-8)
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 373ea751d568ae..b7ae932677bbe3 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -315,12 +315,6 @@ static cl::opt<bool> EnableLoadStoreRuntimeInterleave(
     cl::desc(
         "Enable runtime interleaving until load/store ports are saturated"));
 
-/// Interleave small loops with scalar reductions.
-static cl::opt<bool> InterleaveSmallLoopScalarReduction(
-    "interleave-small-loop-scalar-reduction", cl::init(false), cl::Hidden,
-    cl::desc("Enable interleaving for loops with small iteration counts that "
-             "contain scalar reductions to expose ILP."));
-
 /// The number of stores in a loop that are allowed to need predication.
 static cl::opt<unsigned> NumberOfStoresToPredicate(
     "vectorize-num-stores-pred", cl::init(1), cl::Hidden,
@@ -5477,8 +5471,7 @@ LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
 
     // If there are scalar reductions and TTI has enabled aggressive
     // interleaving for reductions, we will interleave to expose ILP.
-    if (InterleaveSmallLoopScalarReduction && VF.isScalar() &&
-        AggressivelyInterleaveReductions) {
+    if (VF.isScalar() && AggressivelyInterleaveReductions) {
       LLVM_DEBUG(dbgs() << "LV: Interleaving to expose ILP.\n");
       // Interleave no less than SmallIC but not as aggressive as the normal IC
       // to satisfy the rare situation when resources are too limited.

Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

Please try to shorten the commit title to be more concise, as per https://llvm.org/docs/DeveloperPolicy.html#commit-messages

The title should be concise. Because all commits are emailed to the list with the first line as the subject, long titles are frowned upon. Short titles also look better in git log.

@nilanjana87 nilanjana87 changed the title [LV] Removing option that is no longer needed after recent updates to loop interleaving algorithm [LV] Remove unused option Feb 27, 2024
@nilanjana87 nilanjana87 changed the title [LV] Remove unused option [LV] Remove unused option interleave-small-loop-scalar-reduction Feb 27, 2024
@nilanjana87 nilanjana87 changed the title [LV] Remove unused option interleave-small-loop-scalar-reduction [LV] Remove unused option Feb 27, 2024
@nilanjana87 nilanjana87 changed the title [LV] Remove unused option [LV] Remove unused configuration option Feb 27, 2024
Recent set of changes (PR llvm#67725) in loop interleaving algorithm removed the loop trip count threshold for allowing interleaving. Therefore configuration option interleave-small-loop-scalar-reduction option is no longer needed.
@nilanjana87
Copy link
Contributor Author

Updated a test that used this option to fix a build bot error. Squashed commits, rebased & force-pushed.

@nilanjana87 nilanjana87 merged commit 1c211bc into llvm:main Feb 28, 2024
nilanjana87 added a commit to swiftlang/llvm-project that referenced this pull request Mar 5, 2024
Recent set of changes (PR llvm#67725) in loop interleaving algorithm caused removal of the loop trip count threshold for allowing interleaving. Therefore configuration option interleave-small-loop-scalar-reduction is no longer needed.
mylai-mtk pushed a commit to mylai-mtk/llvm-project that referenced this pull request Jul 12, 2024
Recent set of changes (PR llvm#67725) in loop interleaving algorithm caused removal of the loop trip count threshold for allowing interleaving. Therefore configuration option interleave-small-loop-scalar-reduction is no longer needed.
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.

3 participants