[WebAssembly] CFG sort support for exception handling
authorHeejin Ahn <aheejin@gmail.com>
Tue, 7 Aug 2018 20:19:23 +0000 (20:19 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 7 Aug 2018 20:19:23 +0000 (20:19 +0000)
commit7fb68d267904f8de84d6b0a46de9ba15ffbd2bc1
treeba605b1720bbb0ed98028233d2dbdeea926be78c
parentf7a8fb2dee2ddbe16f6a9fe1c4d7fbb03358ed1d
[WebAssembly] CFG sort support for exception handling

Summary:
This patch extends CFGSort pass to support exception handling. Once it
places a loop header, it does not place blocks that are not dominated by
the loop header until all the loop blocks are sorted. This patch extends
the same algorithm to exception 'catch' part, using the information
calculated by WebAssemblyExceptionInfo class.

Reviewers: dschuff, sunfish

Subscribers: sbc100, jgravelle-google, llvm-commits

Differential Revision: https://reviews.llvm.org/D46500

llvm-svn: 339172
llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll [new file with mode: 0644]