throw instruction is a terminator in wasm, but BBs were not splitted
after throw instructions, causing machine instruction verifier to
fail.
This patch
- Splits BBs after throw instructions in WasmEHPrepare and adding an unreachable instruction after throw, which will be deleted in LateEHPrepare pass
- Refactors WasmEHPrepare into two member functions
- Changes the semantics of eraseBBsAndChildren in LateEHPrepare pass to match that of WasmEHPrepare pass, which is newly added. Now eraseBBsAndChildren does not delete BBs with remaining predecessors.
- Fixes style nits, making static function names conform to clang-tidy
- Re-enables the test temporarily disabled by rL346840 && rL346845
This part is just factored out and has not changed.