LLVM: lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp File Reference (original) (raw)
This file implements a CFG stacking pass.
This pass inserts BLOCK, LOOP, TRY, and TRY_TABLE markers to mark the start of scopes, since scope boundaries serve as the labels for WebAssembly's control transfers.
This is sufficient to convert arbitrary CFGs into a form that works on WebAssembly, provided that all loops are single-entry.
In case we use exceptions, this pass also fixes mismatches in unwind destinations created during transforming CFG into wasm structured format.
Definition in file WebAssemblyCFGStackify.cpp.