[PATCH] D17679: [X86] Elide references to _chkstk for dynamic allocas

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 27 00:52:06 PST 2016


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

The _chkstk function is called by the compiler to probe the stack in an
order consistent with Windows' expectations.  However, it is possible to
elide the call to _chkstk and manually adjust the stack pointer if we
can prove that the allocation is fixed size and smaller than the probe
size.

This shrinks chrome.dll, chrome_child.dll and chrome.exe by a
cummulative ~133 KB.

http://reviews.llvm.org/D17679

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/cleanuppad-inalloca.ll
  test/CodeGen/X86/dynamic-alloca-in-entry.ll
  test/CodeGen/X86/inalloca-ctor.ll
  test/CodeGen/X86/inalloca-invoke.ll
  test/CodeGen/X86/inalloca-stdcall.ll
  test/CodeGen/X86/inalloca.ll
  test/CodeGen/X86/shrink-wrap-chkstk.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17679.49292.patch
Type: text/x-patch
Size: 9859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160227/e6834abf/attachment.bin>


More information about the llvm-commits mailing list