diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-03-19 05:02:30 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2019-03-19 05:02:30 +0000 |
commit | 9203d2183885c08036f8accad8f66a9645e1c457 (patch) | |
tree | 39f98d80a027217eb0e81d1bdde714153dfa165c | |
parent | 802fe81df39f59279e93ea46d547186b40528a64 (diff) | |
download | bcm5719-llvm-9203d2183885c08036f8accad8f66a9645e1c457.tar.gz bcm5719-llvm-9203d2183885c08036f8accad8f66a9645e1c457.zip |
[WebAssembly] Add immarg attribute to intrinsics
Summary:
After r355981, intrinsic arguments that are immediate values should be
marked as `ImmArg`.
Reviewers: dschuff, tlively
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59447
llvm-svn: 356437
-rw-r--r-- | llvm/include/llvm/IR/IntrinsicsWebAssembly.td | 8 | ||||
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/wasmehprepare.ll | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/IR/IntrinsicsWebAssembly.td b/llvm/include/llvm/IR/IntrinsicsWebAssembly.td index 598349f7f04..1731995b287 100644 --- a/llvm/include/llvm/IR/IntrinsicsWebAssembly.td +++ b/llvm/include/llvm/IR/IntrinsicsWebAssembly.td @@ -40,7 +40,7 @@ def int_wasm_trunc_saturate_unsigned : Intrinsic<[llvm_anyint_ty], // throw / rethrow def int_wasm_throw : Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty], - [Throws, IntrNoReturn]>; + [Throws, IntrNoReturn, ImmArg<0>]>; def int_wasm_rethrow_in_catch : Intrinsic<[], [], [Throws, IntrNoReturn]>; // Since wasm does not use landingpad instructions, these instructions return @@ -58,7 +58,7 @@ def int_wasm_extract_exception : Intrinsic<[llvm_ptr_ty], [], // by WasmEHPrepare pass to generate landingpad table in EHStreamer. This is // used in order to give them the indices in WasmEHPrepare. def int_wasm_landingpad_index: Intrinsic<[], [llvm_token_ty, llvm_i32_ty], - [IntrNoMem]>; + [IntrNoMem, ImmArg<1>]>; // Returns LSDA address of the current function. def int_wasm_lsda : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>; @@ -118,10 +118,10 @@ def int_wasm_memory_init : Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], [IntrWriteMem, IntrInaccessibleMemOrArgMemOnly, WriteOnly<2>, - IntrHasSideEffects]>; + IntrHasSideEffects, ImmArg<0>, ImmArg<1>]>; def int_wasm_data_drop : Intrinsic<[], [llvm_i32_ty], - [IntrNoDuplicate, IntrHasSideEffects]>; + [IntrNoDuplicate, IntrHasSideEffects, ImmArg<0>]>; } // TargetPrefix = "wasm" diff --git a/llvm/test/CodeGen/WebAssembly/wasmehprepare.ll b/llvm/test/CodeGen/WebAssembly/wasmehprepare.ll index d06f95fd39c..742989f1038 100644 --- a/llvm/test/CodeGen/WebAssembly/wasmehprepare.ll +++ b/llvm/test/CodeGen/WebAssembly/wasmehprepare.ll @@ -405,6 +405,6 @@ declare i8* @__cxa_begin_catch(i8*) declare void @__cxa_end_catch() declare void @__clang_call_terminate(i8*) -; CHECK-DAG: declare void @llvm.wasm.landingpad.index(token, i32) +; CHECK-DAG: declare void @llvm.wasm.landingpad.index(token, i32 immarg) ; CHECK-DAG: declare i8* @llvm.wasm.lsda() ; CHECK-DAG: declare i32 @_Unwind_CallPersonality(i8*) |