[PATCH] D94039: [WebAssembly] Update WasmEHPrepare for the new spec
Thomas Lively via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 7 10:15:56 PST 2021
tlively added inline comments.
================
Comment at: llvm/lib/CodeGen/WasmEHPrepare.cpp:374-375
+ // be lowered to wasm 'catch' instruction. We do this mainly because
+ // instruction selection cannot handle wasm.get.exception intrinsic's token
+ // argument.
+ Instruction *CatchCI =
----------------
dschuff wrote:
> tlively wrote:
> > What is the token argument used for? Could clang generate `llvm.wasm.catch` directly?
> Token arguments (https://llvm.org/docs/ExceptionHandling.html#wineh) are used to preserve the original scoping structure in mid-level optimization passes. I haven't looked at this intrinsic recently but I'd guess that maybe the token keeps it from getting moved out of its containing scope?
Ah, that makes sense, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94039/new/
https://reviews.llvm.org/D94039
More information about the cfe-commits
mailing list