[llvm] 4320722 - Revert "[SystemZ][z/OS] Fix the entry point marker for leaf functions"
Neumann Hon via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 20 19:05:08 PDT 2023
Author: Neumann Hon
Date: 2023-08-20T22:04:02-04:00
New Revision: 43207225b69ddbcff2fdcb6f641721fc0bb84181
URL: https://github.com/llvm/llvm-project/commit/43207225b69ddbcff2fdcb6f641721fc0bb84181
DIFF: https://github.com/llvm/llvm-project/commit/43207225b69ddbcff2fdcb6f641721fc0bb84181.diff
LOG: Revert "[SystemZ][z/OS] Fix the entry point marker for leaf functions"
This reverts commit 8af297bbb8e97de8908b857eae1a44f46a0d5afe.
Testcase LLVM :: MC/GOFF/ppa1.ll needs to be updated to account for this.
Added:
Modified:
llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
index b3075c150ebb36..b89d80453280ca 100644
--- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
@@ -1315,16 +1315,14 @@ void SystemZAsmPrinter::emitFunctionEntryLabel() {
// EntryPoint Marker
const MachineFrameInfo &MFFrame = MF->getFrameInfo();
bool IsUsingAlloca = MFFrame.hasVarSizedObjects();
- uint32_t DSASize = MFFrame.getStackSize();
- bool IsLeaf = DSASize == 0 && MFFrame.getCalleeSavedInfo().empty();
// Set Flags
uint8_t Flags = 0;
- if (IsLeaf)
- Flags |= 0x08;
if (IsUsingAlloca)
Flags |= 0x04;
+ uint32_t DSASize = MFFrame.getStackSize();
+
// Combine into top 27 bits of DSASize and bottom 5 bits of Flags.
uint32_t DSAAndFlags = DSASize & 0xFFFFFFE0; // (x/32) << 5
DSAAndFlags |= Flags;
@@ -1342,10 +1340,6 @@ void SystemZAsmPrinter::emitFunctionEntryLabel() {
if (OutStreamer->isVerboseAsm()) {
OutStreamer->AddComment("DSA Size 0x" + Twine::utohexstr(DSASize));
OutStreamer->AddComment("Entry Flags");
- if (Flags & 0x08)
- OutStreamer->AddComment(" Bit 1: 1 = Leaf function");
- else
- OutStreamer->AddComment(" Bit 1: 0 = Non-leaf function");
if (Flags & 0x04)
OutStreamer->AddComment(" Bit 2: 1 = Uses alloca");
else
diff --git a/llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll b/llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll
index 8c0411629da7d2..202162ed4dd8c8 100644
--- a/llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll
+++ b/llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll
@@ -380,10 +380,6 @@ define void @large_stack2(i64 %n1, i64 %n2, i64 %n3) {
}
; CHECK-LABEL: leaf_func
-; CHECK: .long 8 * DSA Size 0x0
-; CHECK-NEXT: * Entry Flags
-; CHECK-NEXT: * Bit 1: 1 = Leaf function
-; CHECK-NEXT: * Bit 2: 0 = Does not use alloca
; CHECK-NOT: aghi 4,
; CHECK-NOT: stmg
; CHECK: agr 1, 2
More information about the llvm-commits
mailing list