[PATCH] D125369: [AArch64] Stop creating unnecessary label MCSymbols for each Windows unwind opcode. NFC.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 03:28:43 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: efriedma, rnk.
Herald added subscribers: pengfei, hiraditya, kristof.beyls.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLVM.
These labels aren't needed in the ARM version of WinEH tables, as each
unwind opcode maps to a specific instruction (each opcode is assumed
to represent one instruction), and the written tables don't contain
offsets like on x86_64.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125369
Files:
llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp
Index: llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp
===================================================================
--- llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp
+++ llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp
@@ -72,8 +72,7 @@
WinEH::FrameInfo *CurFrame = S.EnsureValidWinFrameInfo(SMLoc());
if (!CurFrame)
return;
- MCSymbol *Label = S.emitCFILabel();
- auto Inst = WinEH::Instruction(UnwindCode, Label, Reg, Offset);
+ auto Inst = WinEH::Instruction(UnwindCode, /*Label=*/nullptr, Reg, Offset);
if (InEpilogCFI)
CurFrame->EpilogMap[CurrentEpilog].push_back(Inst);
else
@@ -177,7 +176,8 @@
MCSymbol *Label = S.emitCFILabel();
CurFrame->PrologEnd = Label;
- WinEH::Instruction Inst = WinEH::Instruction(Win64EH::UOP_End, Label, -1, 0);
+ WinEH::Instruction Inst =
+ WinEH::Instruction(Win64EH::UOP_End, /*Label=*/nullptr, -1, 0);
auto it = CurFrame->Instructions.begin();
CurFrame->Instructions.insert(it, Inst);
}
@@ -199,8 +199,8 @@
return;
InEpilogCFI = false;
- MCSymbol *Label = S.emitCFILabel();
- WinEH::Instruction Inst = WinEH::Instruction(Win64EH::UOP_End, Label, -1, 0);
+ WinEH::Instruction Inst =
+ WinEH::Instruction(Win64EH::UOP_End, /*Label=*/nullptr, -1, 0);
CurFrame->EpilogMap[CurrentEpilog].push_back(Inst);
CurrentEpilog = nullptr;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125369.428612.patch
Type: text/x-patch
Size: 1393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220511/8b94bc4d/attachment.bin>
More information about the llvm-commits
mailing list