This adds a new 'Wasm' exception handling mode to CodeGen backend, and a
WasmEHPrepare pass that adapts code to be used in WebAssembly exception
handling.
Ref: (Tentative) WebAssembly EH scheme for toolchain
Paths
| Differential D37606
[WebAssembly] Add Wasm exception handling prepare pass AbandonedPublic Authored by aheejin on Sep 7 2017, 5:24 PM.
Details
Summary This adds a new 'Wasm' exception handling mode to CodeGen backend, and a Ref: (Tentative) WebAssembly EH scheme for toolchain
Diff Detail
Event TimelineHerald added subscribers: JDevlieghere, jgravelle-google, sbc100 and 2 others. · View Herald TranscriptSep 7 2017, 5:24 PM Comment Actions Add an optimization: We don't store personality function address and LSDA Comment Actions For the curious, here is in-progress work of WebAssembly EH scheme documentation, which will be merged to the official WebAssembly tool-convention repo later.
aheejin marked an inline comment as done. Comment ActionsJS engine -> VM
Comment Actions @dschuff Do you think we can land this? This is not specifically related to the proposed spec change. Comment Actions + Disabled storing personality function address at every landing pad
Revision Contents
Diff 124010 include/llvm/CodeGen/Passes.h
include/llvm/IR/IntrinsicsWebAssembly.td
include/llvm/InitializePasses.h
include/llvm/MC/MCTargetOptions.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/DwarfEHPrepare.cpp
lib/CodeGen/TargetPassConfig.cpp
lib/CodeGen/WasmEHPrepare.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
test/CodeGen/WebAssembly/wasmehprepare.ll
tools/opt/opt.cpp
|
If we implement resuming as as wasm rethrow, can we make the personality function or its wrapper resume by rethrowing, in cases where it would otherwise have returned _URC_CONTINUE_UNWIND? Then we actually could prune the unreachable resumes.