[PATCH] D64322: [WebAssembly] Add support for llvm.clear_cache intrinsic
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 18:08:42 PDT 2019
aheejin added a comment.
Yes it is what x86 does too. And it looks like they do it on purpose. From the `llvm.clear_cache` <http://llvm.org/docs/LangRef.html#llvm-clear-cache-intrinsic> intrinsic semantics description:
//"On platforms with coherent instruction and data caches (e.g. x86), this intrinsic is a nop. On platforms with non-coherent instruction and data cache (e.g. ARM, MIPS), the intrinsic is lowered either to appropriate instructions or a system call, if cache flushing requires special privileges. The default behavior is to emit a call to `__clear_cache` from the run time library."//
So it sounds like only platforms with non-coherent instruction and data caches should do something. Wasm does not have concepts of instruction or data cache, but because it is designed to be more of a virtual machine that does not expose incoherences of hardwares, I thought it might make sense to do nothing like x86 as we have coherent caches. But I don't have strong opinions in either side.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64322/new/
https://reviews.llvm.org/D64322
More information about the llvm-commits
mailing list