[PATCH] D103887: [StackMaps] Force section serialization for functions with no records

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 8 04:15:27 PDT 2021


yrouban created this revision.
yrouban added reviewers: reames, dantrushin, skatkov.
Herald added subscribers: pengfei, kbarton, hiraditya, nemanjai.
yrouban requested review of this revision.
Herald added a project: LLVM.

This patch allows to get function frame size from the //.llvm_stackmaps// section.
This section was generated for those functions that have at least one stack map record. For the other functions we could not get frame size. (The .eh_frame section does not help. Any other way?).

The StackMap class collected functions when stack map records were added. This patch introduces method //StackMap::registerFunction()// that is called before adding stack map records. All registered functions will have records with their frame sizes in the stack map section if the new option //-stackmap-force-serialization// is set to true even if there is no stack map records. With //-stackmap-force-serialization// set to //false// (the default) the old behavior is used: only those functions that have at least one record get into the stack map section and the section is generated only if there is at least one such function.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103887

Files:
  llvm/include/llvm/CodeGen/StackMaps.h
  llvm/lib/CodeGen/StackMaps.cpp
  llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
  llvm/lib/Target/X86/X86AsmPrinter.cpp
  llvm/test/CodeGen/AArch64/stackmap.ll
  llvm/test/CodeGen/SystemZ/stackmap.ll
  llvm/test/CodeGen/X86/stackmap.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103887.350565.patch
Type: text/x-patch
Size: 11191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210608/483b6b30/attachment.bin>


More information about the llvm-commits mailing list