Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/IR/IntrinsicsWebAssembly.td
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | Intrinsic<[], | ||||
[llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], | [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], | ||||
[IntrWriteMem, IntrInaccessibleMemOrArgMemOnly, WriteOnly<2>, | [IntrWriteMem, IntrInaccessibleMemOrArgMemOnly, WriteOnly<2>, | ||||
IntrHasSideEffects, ImmArg<0>, ImmArg<1>]>; | IntrHasSideEffects, ImmArg<0>, ImmArg<1>]>; | ||||
def int_wasm_data_drop : | def int_wasm_data_drop : | ||||
Intrinsic<[], | Intrinsic<[], | ||||
[llvm_i32_ty], | [llvm_i32_ty], | ||||
[IntrNoDuplicate, IntrHasSideEffects, ImmArg<0>]>; | [IntrNoDuplicate, IntrHasSideEffects, ImmArg<0>]>; | ||||
//===----------------------------------------------------------------------===// | |||||
// Thread-local storage intrinsics | |||||
//===----------------------------------------------------------------------===// | |||||
def int_wasm_tls_size : | |||||
Intrinsic<[llvm_anyint_ty], | |||||
[], | |||||
[IntrNoMem, IntrSpeculatable]>; | |||||
aheejinUnsubmitted Done ReplyInline Actions
aheejin: - Why is it speculatable?
- I'm not sure if it's `InstNoMem`, because wasm globals can be… | |||||
@tlively suggested that I do this. It should be speculatable because it has no side effects (since it returns a constant). As for InstrNoMem, I am not sure if globals are memory, and whether reading a constant counts as memory access. quantum: @tlively suggested that I do this. It should be speculatable because it has no side effects… | |||||
I think I am going to remove these attributes for now. We can add them back if we end up deciding that immutable globals are not memory accesses. quantum: I think I am going to remove these attributes for now. We can add them back if we end up… | |||||
We decided that this is a constant after all, since the global is immutable. This also simplifies the implementation of the lowering code. quantum: We decided that this is a constant after all, since the global is immutable. This also… | |||||
} // TargetPrefix = "wasm" | } // TargetPrefix = "wasm" |