[PATCH] D98701: StackProtector: insert check before `musttail` call.

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 06:00:33 PDT 2021


t.p.northover created this revision.
t.p.northover added a reviewer: compnerd.
Herald added subscribers: hiraditya, mcrosier.
t.p.northover requested review of this revision.
Herald added a project: LLVM.

`musttail` calls have to directly precede the return instruction (of their value), so any stack checks must be inserted before the call instead of in between it and the return. Fortunately this same restriction means we don't have to look too hard to find out if we're about to break a `musttail` call.


https://reviews.llvm.org/D98701

Files:
  llvm/lib/CodeGen/StackProtector.cpp
  llvm/test/CodeGen/AArch64/stack-protector-musttail.ll
  llvm/test/CodeGen/ARM/Windows/stack-protector-musttail.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98701.330958.patch
Type: text/x-patch
Size: 6030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210316/fc11a4da/attachment.bin>


More information about the llvm-commits mailing list