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

[AArch64] set MaxInterleaveFactor to 4 for NeoverseV2 #86631

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

Conversation

helloguo
Copy link
Contributor

Set MaxInterleaveFactor to 4 for NeoverseV2 which has 4 SIMD pipelines.

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 26, 2024

@llvm/pr-subscribers-backend-aarch64

Author: Xiangyang (Mark) Guo (helloguo)

Changes

Set MaxInterleaveFactor to 4 for NeoverseV2 which has 4 SIMD pipelines.


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

1 Files Affected:

  • (modified) llvm/lib/Target/AArch64/AArch64Subtarget.cpp (+1)
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
index bb268b2ba926cb..7ac97d4a6cb757 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
@@ -240,6 +240,7 @@ void AArch64Subtarget::initializeProperties(bool HasMinSize) {
     PrefLoopAlignment = Align(32);
     MaxBytesForLoopAlignment = 16;
     VScaleForTuning = 1;
+    MaxInterleaveFactor = 4;
     break;
   case NeoverseV1:
     PrefFunctionAlignment = Align(16);

Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Whenever I have tried this in the past the performance has not looked great. Do you have results that suggest it does better? The problem is that many loops do not have a high enough trip count to make the larger loop body worth-while. Things could have changed recently with SVE and V2 though.

This would change the N2 too, which it probably shouldn't, and could do with having some sort of test.

@sjoerdmeijer
Copy link
Collaborator

Yep, agree with Dave, sharing some performance numbers would be good.

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

4 participants