[PATCH] D50919: [WebAssembly] Add hasSideEffects flag to catch instructions

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 13:27:08 PDT 2018


aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, sbc100.

`catch` instruction certainly has rather huge side effects and the flag
was missing. At the moment this does not change any unit tests we
currently have.


Repository:
  rL LLVM

https://reviews.llvm.org/D50919

Files:
  lib/Target/WebAssembly/WebAssemblyInstrControl.td


Index: lib/Target/WebAssembly/WebAssemblyInstrControl.td
===================================================================
--- lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -172,7 +172,7 @@
 } // Uses = [VALUE_STACK], Defs = [VALUE_STACK]
 
 // Catching an exception: catch / catch_all
-let hasCtrlDep = 1 in {
+let hasCtrlDep = 1, hasSideEffects  =1 in {
 defm CATCH_I32 : I<(outs I32:$dst), (ins i32imm:$tag),
                    (outs), (ins i32imm:$tag),
                    [(set I32:$dst, (int_wasm_catch imm:$tag))],


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50919.161311.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180817/f8ca7a37/attachment.bin>


More information about the llvm-commits mailing list