[PATCH] D64115: [WebAssembly] Prevent inline assembly from being mangled by SjLj

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 17:50:26 PDT 2019


aheejin added a comment.

Thank you for fixing this. This pass does two things: exception handling and setjmp-longjmp handling. This CL only fixes setjmp-longjmp. Could you fix the exception case too if that's not too much of a burden? You can fix the `NeedInvoke` part as I told you before. This is basically my bug so I can do it too, in case it takes time though.



================
Comment at: llvm/trunk/test/CodeGen/WebAssembly/lower-em-sjlj.ll:192
+; Test inline asm handling
+define hidden void @inline_asm() #0 {
+; CHECK-LABEL: @inline_asm
----------------
Nit: please delete `hidden` and `#0`


================
Comment at: llvm/trunk/test/CodeGen/WebAssembly/lower-em-sjlj.ll:210
+  ret void
+}
+
----------------
We can simplify this test case further: We don't need `longjmp` in the same function to test this. You can refer to `setjmp_other` function in this file; you can make this as a single BB function, replacing the call to `foo` with your inline asm call, because with a few exceptions, most function calls in the same function as `setjmp` are turned into invokes.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64115/new/

https://reviews.llvm.org/D64115





More information about the llvm-commits mailing list