-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[AArch64] Do not mark homogeneous prolog/epilog functions optnone #117959
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] Do not mark homogeneous prolog/epilog functions optnone #117959
Conversation
The verifier complains that synthesized IR functions have minsize and optnone attributes which are incompatible. This patch removes optnone attribute and updates affected tests as needed.
|
@llvm/pr-subscribers-backend-aarch64 Author: Zhaoxuan Jiang (nocchijiang) ChangesThe verifier complains that synthesized IR functions have minsize and optnone attributes which are incompatible. This patch removes optnone attribute and updates affected tests as needed. Full diff: https://github.com/llvm/llvm-project/pull/117959.diff 3 Files Affected:
diff --git a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
index 1aa55864dbff49..ed531038395c43 100644
--- a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
@@ -169,9 +169,7 @@ static MachineFunction &createFrameHelperMachineFunction(Module *M,
F->setLinkage(GlobalValue::LinkOnceODRLinkage);
F->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
- // Set no-opt/minsize, so we don't insert padding between outlined
- // functions.
- F->addFnAttr(Attribute::OptimizeNone);
+ // Set minsize, so we don't insert padding between outlined functions.
F->addFnAttr(Attribute::NoInline);
F->addFnAttr(Attribute::MinSize);
F->addFnAttr(Attribute::Naked);
diff --git a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-frame-tail.ll b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-frame-tail.ll
index 32cc850dfa7348..cd751840fee483 100644
--- a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-frame-tail.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-frame-tail.ll
@@ -51,8 +51,8 @@ declare i32 @_Z3hoov() nounwind ssp optsize
; CHECK-LABEL: _OUTLINED_FUNCTION_PROLOG_FRAME48_x30x29x19x20d8d9d10d11:
; CHECK: stp d11, d10, [sp, #-48]!
; CHECK-NEXT: stp d9, d8, [sp, #16]
-; CHECK-NEXT: stp x20, x19, [sp, #32]
; CHECK-NEXT: add x29, sp, #48
+; CHECK-NEXT: stp x20, x19, [sp, #32]
; CHECK-NEXT: ret
; CHECK-LABEL: _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29x19x20d8d9d10d11:
@@ -69,8 +69,8 @@ declare i32 @_Z3hoov() nounwind ssp optsize
; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_PROLOG_FRAME32_x19x20x30x29d8d9d10d11:
; CHECK-LINUX: stp d11, d10, [sp, #-32]!
; CHECK-LINUX-NEXT: stp d9, d8, [sp, #16]
-; CHECK-LINUX-NEXT: stp x20, x19, [sp, #48]
; CHECK-LINUX-NEXT: add x29, sp, #32
+; CHECK-LINUX-NEXT: stp x20, x19, [sp, #48]
; CHECK-LINUX-NEXT: ret
; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_EPILOG_TAIL_x19x20x30x29d8d9d10d11:
diff --git a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog.ll b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog.ll
index fed564afd18939..c2541a6d819b88 100644
--- a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog.ll
@@ -67,8 +67,8 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture)
; CHECK-LINUX-NEXT: ret
; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_EPILOG_x19x20x21x22x30x29:
-; CHECK-LINUX: mov x16, x30
-; CHECK-LINUX-NEXT: ldp x20, x19, [sp, #32]
+; CHECK-LINUX: ldp x20, x19, [sp, #32]
+; CHECK-LINUX-NEXT: mov x16, x30
; CHECK-LINUX-NEXT: ldp x22, x21, [sp, #16]
; CHECK-LINUX-NEXT: ldp x29, x30, [sp], #48
; CHECK-LINUX-NEXT: ret x16
|
|
cc. @kyulee-com |
kyulee-com
left a comment
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
|
@kyulee-com Could you please merge the PR on behalf of me? |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/71/builds/11504 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/11343 Here is the relevant piece of the build log for the reference |
The verifier complains that synthesized IR functions have minsize and optnone attributes which are incompatible. This patch removes optnone attribute and updates affected tests as needed.