[PATCH] D20263: X86: Avoid using _chkstk when lowering WIN_ALLOCA instructions

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 16:40:32 PDT 2016


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

This patch moves the expansion of WIN_ALLOCA pseudo-instructions into a separate pass that walks the CFG and lowers the instructions based on a conservative estimate of the offset between the stack pointer and the lowest accessed stack address.

The goal is to reduce binary size and run-time costs by removing calls to _chkstk.

http://reviews.llvm.org/D20263

Files:
  include/llvm/CodeGen/MachineFrameInfo.h
  lib/Target/X86/CMakeLists.txt
  lib/Target/X86/X86.h
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  lib/Target/X86/X86InstrCompiler.td
  lib/Target/X86/X86InstrInfo.td
  lib/Target/X86/X86TargetMachine.cpp
  lib/Target/X86/X86WinAllocaExpander.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
  test/CodeGen/X86/win-alloca-expander.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20263.57268.patch
Type: text/x-patch
Size: 24023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/897dda17/attachment.bin>


More information about the llvm-commits mailing list