[WebAssembly] Don't write SP back when prolog is generated only for EH
authorHeejin Ahn <aheejin@gmail.com>
Wed, 22 Aug 2018 21:13:49 +0000 (21:13 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 22 Aug 2018 21:13:49 +0000 (21:13 +0000)
commit972fc3588bdb52724c8c8b3b2125a95e9cd2e299
treeb7cac11780407755328a47cd502155c2b4d82a3d
parent6b6d2e010593e499b24048188e91c993c6692407
[WebAssembly] Don't write SP back when prolog is generated only for EH

Summary:
When we don't actually have stack-allocated variables but need SP only
to support EH, we don't need to write SP back in the epilog, because we
don't bump down the stack pointer.

Reviewers: dschuff

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

Differential Revision: https://reviews.llvm.org/D51114

llvm-svn: 340454
llvm/lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp
llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h
llvm/test/CodeGen/WebAssembly/exception.ll