forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 339
[LV] Cherry-picked changes for loop interleaving algorithm #8320
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
nilanjana87
merged 9 commits into
swiftlang:stable/20230725
from
nilanjana87:loop_interleaving_changes_cherry_picked
Mar 5, 2024
Merged
[LV] Cherry-picked changes for loop interleaving algorithm #8320
nilanjana87
merged 9 commits into
swiftlang:stable/20230725
from
nilanjana87:loop_interleaving_changes_cherry_picked
Mar 5, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ation (llvm#70272) Added tests for evaluating changes to loop interleaving count computation and for removing loop interleaving threshold in subsequent patches.
…utation (llvm#74689) Added more pre-commit tests for evaluating changes to loop interleaving count computation in (llvm#73766). The new set of tests address the change in IC computation to minimize the remainder TC of the vectorized loop while maximizing the IC when the remainder TC is the same.
[LV] Change loops' interleave count computation A set of microbenchmarks in llvm-test-suite (llvm/llvm-test-suite#56), when tested on a AArch64 platform, demonstrates that loop interleaving is beneficial when the vector loop runs at least twice or when the epilogue loop trip count (TC) is minimal. Therefore, we choose interleaving count (IC) between TC/VF & TC/2*VF (VF = vectorization factor), such that remainder TC for the epilogue loop is minimum while the IC is maximum in case the remainder TC is same for both. The initial tests for this change were submitted in PRs: llvm#70272 and llvm#74689.
…count computation for loops that need to run scalar iterations (llvm#79640) This patch contains a set of pre-commit tests for changing the loop interleaving count computation in a subsequent patch in order to address loops that need to execute at least a single scalar iteration in the epilogue.
…needs to run at least once (llvm#79651) Update loop interleaving count computation to address loops that require at least one scalar iteration in the epilogue loop. For this case, the available trip count for interleaving the loop is one less.
…ave a loop (llvm#67725) A set of microbenchmarks (llvm/llvm-test-suite#26) showed that loop interleaving can be beneficial for loops with low trip count as well. Loop interleaving count computation is updated accordingly in prior patches while this patch removes the loop trip count threshold for interleaving.
Removed target-triple in target-independent test case to fix failing test caused by llvm#67725.
This test triple was removed earlier to fix build errors. To preserve the original test intention the triple is re-added with an explicit target requirement.
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.
@swift-ci please test |
@swift-ci please test llvm |
@swift-ci please test |
LLVM test failures should be unrelated to the patch:
|
@swift-ci please test |
fhahn
approved these changes
Mar 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR cherry-picks commits related to changes in Loop Interleaving algorithm from upstream LLVM that started with llvm#67725.