[PATCH] D24748: Win64: Don't emit unwind info for "leaf" functions (PR30337)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 16:59:02 PDT 2016


hans created this revision.
hans added reviewers: rnk, majnemer.
hans added a subscriber: llvm-commits.

According to MSDN (see the PR), functions which don't touch any callee-saved registers (including %rsp) don't need any unwind info.

This patch takes a stab at not emitting unwind info for such functions, to save binary space. This is an area I don't now much about, so all input is welcome.

I originally wanted to put 'HasWinCFI' on X86MachineFunctionInfo, but then we wouldn't be able to check it from WinException, so it ended up on MachineFunction. I'm not sure what a better place would be. MachineFrameInfo maybe?

https://reviews.llvm.org/D24748

Files:
  include/llvm/CodeGen/MachineFunction.h
  lib/CodeGen/AsmPrinter/WinException.cpp
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86MCInstLower.cpp
  test/CodeGen/X86/coalescer-win64.ll
  test/CodeGen/X86/pr24374.ll
  test/CodeGen/X86/seh-catchpad.ll
  test/CodeGen/X86/win64_eh.ll
  test/CodeGen/X86/win64_eh_leaf.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24748.71891.patch
Type: text/x-patch
Size: 8421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160919/dd01141c/attachment.bin>


More information about the llvm-commits mailing list