-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm][aarch64] Apple A16 & A17 had adrp-add fusion, but A14 did not #81325
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
Conversation
@llvm/pr-subscribers-backend-aarch64 Author: Jon Roelofs (jroelofs) ChangesFull diff: https://github.com/llvm/llvm-project/pull/81325.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td
index 02fb01caf7e80..bc5cb852e13f1 100644
--- a/llvm/lib/Target/AArch64/AArch64.td
+++ b/llvm/lib/Target/AArch64/AArch64.td
@@ -1120,7 +1120,6 @@ def TuneAppleA14 : SubtargetFeature<"apple-a14", "ARMProcFamily", "AppleA14",
FeatureFuseArithmeticLogic,
FeatureFuseCCSelect,
FeatureFuseCryptoEOR,
- FeatureFuseAdrpAdd,
FeatureFuseLiterals,
FeatureStorePairSuppress,
FeatureZCRegMove,
@@ -1149,6 +1148,7 @@ def TuneAppleA16 : SubtargetFeature<"apple-a16", "ARMProcFamily", "AppleA16",
FeatureArithmeticCbzFusion,
FeatureDisableLatencySchedHeuristic,
FeatureFuseAddress,
+ FeatureFuseAdrpAdd,
FeatureFuseAES,
FeatureFuseArithmeticLogic,
FeatureFuseCCSelect,
@@ -1165,6 +1165,7 @@ def TuneAppleA17 : SubtargetFeature<"apple-a17", "ARMProcFamily", "AppleA17",
FeatureArithmeticCbzFusion,
FeatureDisableLatencySchedHeuristic,
FeatureFuseAddress,
+ FeatureFuseAdrpAdd,
FeatureFuseAES,
FeatureFuseArithmeticLogic,
FeatureFuseCCSelect,
|
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.
LG |
FuseAdrpAdd is also used to enable linker relaxation in lld and the gnu linkers. I guess you are assuming this will make use of linker optimization hints instead and use the Apple linker? (That sounds OK if so). Changes like this should ideally be accompanied by a test. Hopefully that is fairly simple, like the test in llvm/test/CodeGen/AArch64/misched-fusion-addadrp.ll. |
I was assuming Apple Can you tell me more about how that linker relaxation works? Is it an optimization that keys off of Do you think A14 deserves:
instead of:
I'll add one. |
There are a couple of open questions on what we should do for A14, so I'll leave that off for now. #81325 (comment)
|
As far as I understand inside the linker it is done via adjacent instructions. It doesn't have much other information, other than the relocations. I think so long as the linker used will most likely be apple ld using LoH's, then it's fine to be more accurate with the fusion and not "mis-use" the feature to get adjacent instructions.
Thanks! |
No description provided.