[PATCH] D123934: MachineModuleInfo: Remove UsesMorestackAddr

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 07:08:16 PDT 2022


arsenm created this revision.
arsenm added reviewers: pcc, reames, rnk, craig.topper, RKSimon.
Herald added subscribers: StephenFan, pengfei, hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This is x86 specific, and adds statefulness to
MachineModuleInfo. Instead of explicitly tracking this, infer if we
need to declare the symbol based on the reference previously inserted.

      

This produces a small change in the output due to the move from
AsmPrinter::doFinalization to X86's emitEndOfAsmFile. This will now be
moved relative to other end of file fields, which I'm assuming doesn't
matter (e.g. the __morestack_addr declaration is now after the
.note.GNU-split-stack part)

      

This also produces another small change in code if the module happened
to define/declare __morestack_addr, but I assume that's invalid and
doesn't really matter.


https://reviews.llvm.org/D123934

Files:
  llvm/include/llvm/CodeGen/MachineModuleInfo.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/MachineModuleInfo.cpp
  llvm/lib/Target/X86/X86AsmPrinter.cpp
  llvm/lib/Target/X86/X86FrameLowering.cpp
  llvm/test/CodeGen/X86/morestack-decl.ll
  llvm/test/CodeGen/X86/segmented-stacks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123934.423380.patch
Type: text/x-patch
Size: 6130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220418/ce20db9f/attachment.bin>


More information about the llvm-commits mailing list