[PATCH] D51114: [WebAssembly] Don't write SP back when prolog is generated only for EH

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 22 14:02:34 PDT 2018


aheejin added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp:75
+    // function uses the red zone, but that only happens with leaf functions,
+    // and leaf functions can't catch exceptions anyway.
     auto InsertPos = MBB.begin();
----------------
dschuff wrote:
> can't leaf functions have try/catch blocks, even if there are no calls? I think the real issue is that leaf functions do not to restore the stack pointer on catch, because it won't have been updated by any callees.
Right, good point.


Repository:
  rL LLVM

https://reviews.llvm.org/D51114





More information about the llvm-commits mailing list