[PATCH] D87447: [CodeGen] [WinException] Remove a redundant explicit section switch for aarch64
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 04:52:11 PDT 2020
mstorsjo created this revision.
mstorsjo added reviewers: efriedma, ssijaric, TomTan, rnk.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
mstorsjo requested review of this revision.
The following EmitWinEHHandlerData() implicitly switches to .xdata, just like on x86_64.
This became orphaned from the original code requiring it in 0b61d220c9b1f0 / https://reviews.llvm.org/D61095.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87447
Files:
llvm/lib/CodeGen/AsmPrinter/WinException.cpp
llvm/test/CodeGen/AArch64/win64-jumptable.ll
llvm/test/CodeGen/AArch64/wineh-mingw.ll
llvm/test/CodeGen/AArch64/wineh1.mir
Index: llvm/test/CodeGen/AArch64/wineh1.mir
===================================================================
--- llvm/test/CodeGen/AArch64/wineh1.mir
+++ llvm/test/CodeGen/AArch64/wineh1.mir
@@ -73,7 +73,6 @@
# ASM: .seh_endepilogue
# ASM: .seh_endfunclet
-# ASM: .section .xdata,"dr"
# ASM: .seh_handlerdata
# ASM: .text
# ASM: .seh_endproc
Index: llvm/test/CodeGen/AArch64/wineh-mingw.ll
===================================================================
--- llvm/test/CodeGen/AArch64/wineh-mingw.ll
+++ llvm/test/CodeGen/AArch64/wineh-mingw.ll
@@ -36,8 +36,7 @@
; WINEH: .seh_proc foo4
; WINEH: .seh_handler _d_eh_personality, @unwind, @except
; WINEH: ret
-; WINEH: .section .xdata,"dr"
-; WINEH-NEXT: .seh_handlerdata
+; WINEH: .seh_handlerdata
; WINEH-NEXT: .text
; WINEH-NEXT: .seh_endproc
; WINEH: .section .xdata,"dr"
Index: llvm/test/CodeGen/AArch64/win64-jumptable.ll
===================================================================
--- llvm/test/CodeGen/AArch64/win64-jumptable.ll
+++ llvm/test/CodeGen/AArch64/win64-jumptable.ll
@@ -44,7 +44,6 @@
; CHECK: .word .LBB0_3-.LJTI0_0
; CHECK: .word .LBB0_4-.LJTI0_0
; CHECK: .word .LBB0_5-.LJTI0_0
-; CHECK: .section .xdata,"dr"
; CHECK: .seh_handlerdata
; CHECK: .text
; CHECK: .seh_endproc
Index: llvm/lib/CodeGen/AsmPrinter/WinException.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/WinException.cpp
+++ llvm/lib/CodeGen/AsmPrinter/WinException.cpp
@@ -258,15 +258,6 @@
if (F.hasPersonalityFn())
Per = classifyEHPersonality(F.getPersonalityFn()->stripPointerCasts());
- // On funclet exit, we emit a fake "function" end marker, so that the call
- // to EmitWinEHHandlerData below can calculate the size of the funclet or
- // function.
- if (isAArch64) {
- MCSection *XData = Asm->OutStreamer->getAssociatedXDataSection(
- Asm->OutStreamer->getCurrentSectionOnly());
- Asm->OutStreamer->SwitchSection(XData);
- }
-
// Emit an UNWIND_INFO struct describing the prologue.
Asm->OutStreamer->EmitWinEHHandlerData();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87447.290940.patch
Type: text/x-patch
Size: 2144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200910/536e1cb6/attachment.bin>
More information about the llvm-commits
mailing list