[PATCH] D123932: MachineModuleInfo: Move HasSplitStack handling to AsmPrinter

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 06:59:17 PDT 2022


arsenm created this revision.
arsenm added reviewers: cherry, thanm, luqmana, rnk, saugustine.
Herald added subscribers: pengfei, hiraditya, kristof.beyls.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This is used to emit one field in doFinalization for the module. We
can accumulate this when emitting all individual functions directly in
the AsmPrinter, rather than accumulating additional state in
MachineModuleInfo.

      

The part I'm unclear on is the special case behavior for StackSize ==
0 && !hasTailCall. ARM and X86 had the same special case behavior,
which is now split/repeated between the AsmPrinter handling and the
implementation of adjustForSegmentedStacks. This now promotes it to
generic behavior. I'm assuming this is fine because no other target
implements adjustForSegmentedStacks, or has tests using the
split-stack attribute.


https://reviews.llvm.org/D123932

Files:
  llvm/include/llvm/CodeGen/AsmPrinter.h
  llvm/include/llvm/CodeGen/MachineModuleInfo.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/MachineModuleInfo.cpp
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/lib/Target/ARM/ARMAsmPrinter.cpp
  llvm/lib/Target/ARM/ARMFrameLowering.cpp
  llvm/lib/Target/X86/X86FrameLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123932.423374.patch
Type: text/x-patch
Size: 8002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220418/8c3a4116/attachment.bin>


More information about the llvm-commits mailing list