[PATCH] D42898: Do not spill CSR to stack on entry to noreturn functions

pmb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 4 17:39:56 PST 2018


myeisha created this revision.
Herald added subscribers: llvm-commits, kbarton, javed.absar, nemanjai.

A noreturn function can be expected to never return, and by never returning it will also never have to restore any callee-saved registers for its caller. This makes it possible to skip spills of those registers during function entry, saving some stack space and time in the process. This is rather useful for embedded targets with limited stack space.

Initially reported as PR#9970.


Repository:
  rL LLVM

https://reviews.llvm.org/D42898

Files:
  lib/CodeGen/TargetFrameLoweringImpl.cpp
  test/CodeGen/AArch64/arm64-shrink-wrapping.ll
  test/CodeGen/ARM/arm-shrink-wrapping.ll
  test/CodeGen/ARM/noreturn-csr-skip.ll
  test/CodeGen/PowerPC/ppc-shrink-wrapping.ll
  test/CodeGen/Thumb/thumb-shrink-wrapping.ll
  test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll
  test/CodeGen/X86/x86-shrink-wrapping.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42898.132782.patch
Type: text/x-patch
Size: 6039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180205/3d6ded1a/attachment.bin>


More information about the llvm-commits mailing list