[WebAssembly] Make stack pointer args inhibit tail calls
authorThomas Lively <tlively@google.com>
Tue, 4 Feb 2020 05:26:43 +0000 (21:26 -0800)
committerThomas Lively <tlively@google.com>
Fri, 14 Feb 2020 00:43:53 +0000 (16:43 -0800)
commit918e90559b08adebff26c342080c65e79cc223ec
tree845ce1ba3f386749329febff9f107ea4e25b809e
parent0a1123eb43f945593b26dd037490e0c909fa3c4f
[WebAssembly] Make stack pointer args inhibit tail calls

Summary:
Also make return calls terminator instructions so epilogues are
inserted before them rather than after them. Together, these changes
make WebAssembly's tail call optimization more stack-safe.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73943
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td
llvm/test/CodeGen/WebAssembly/tailcall.ll