llvm.org GIT mirror llvm / 8dd4b77
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356437 91177308-0d34-0410-b5e6-96231b3b80d8 Heejin Ahn 1 year, 13 days ago
2 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
3939
4040 // throw / rethrow
4141 def int_wasm_throw : Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty],
42 [Throws, IntrNoReturn]>;
42 [Throws, IntrNoReturn, ImmArg<0>]>;
4343 def int_wasm_rethrow_in_catch : Intrinsic<[], [], [Throws, IntrNoReturn]>;
4444
4545 // Since wasm does not use landingpad instructions, these instructions return
5757 // by WasmEHPrepare pass to generate landingpad table in EHStreamer. This is
5858 // used in order to give them the indices in WasmEHPrepare.
5959 def int_wasm_landingpad_index: Intrinsic<[], [llvm_token_ty, llvm_i32_ty],
60 [IntrNoMem]>;
60 [IntrNoMem, ImmArg<1>]>;
6161
6262 // Returns LSDA address of the current function.
6363 def int_wasm_lsda : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>;
117117 Intrinsic<[],
118118 [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty],
119119 [IntrWriteMem, IntrInaccessibleMemOrArgMemOnly, WriteOnly<2>,
120 IntrHasSideEffects]>;
120 IntrHasSideEffects, ImmArg<0>, ImmArg<1>]>;
121121 def int_wasm_data_drop :
122122 Intrinsic<[],
123123 [llvm_i32_ty],
124 [IntrNoDuplicate, IntrHasSideEffects]>;
124 [IntrNoDuplicate, IntrHasSideEffects, ImmArg<0>]>;
125125
126126 } // TargetPrefix = "wasm"
404404 declare void @__cxa_end_catch()
405405 declare void @__clang_call_terminate(i8*)
406406
407 ; CHECK-DAG: declare void @llvm.wasm.landingpad.index(token, i32)
407 ; CHECK-DAG: declare void @llvm.wasm.landingpad.index(token, i32 immarg)
408408 ; CHECK-DAG: declare i8* @llvm.wasm.lsda()
409409 ; CHECK-DAG: declare i32 @_Unwind_CallPersonality(i8*)