[WebAssembly] Check in an initial CFG Stackifier pass
authorDan Gohman <dan433584@gmail.com>
Wed, 16 Sep 2015 16:51:30 +0000 (16:51 +0000)
committerDan Gohman <dan433584@gmail.com>
Wed, 16 Sep 2015 16:51:30 +0000 (16:51 +0000)
commit7146e900e89b057595bbce8296cef1b55cf310a4
tree5414d2c8a432d214b6b0de6c95f3a97ce3141493
parent39490133e41640fc04160ee5ed9b65d4301d89f8
[WebAssembly] Check in an initial CFG Stackifier pass

This pass implements a simple algorithm for conversion from CFG to
wasm's structured control flow. It doesn't yet handle multiple-entry
loops; that will be added in a future patch.

It also adds initial support for switch statements.

Differential Revision: http://reviews.llvm.org/D12735

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247818 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/Target/WebAssembly/CMakeLists.txt
lib/Target/WebAssembly/WebAssembly.h
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp [new file with mode: 0644]
lib/Target/WebAssembly/WebAssemblyISD.def
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.h
lib/Target/WebAssembly/WebAssemblyInstrControl.td
lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
lib/Target/WebAssembly/WebAssemblyInstrInfo.h
lib/Target/WebAssembly/WebAssemblyInstrInfo.td
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
test/CodeGen/WebAssembly/cfg-stackify.ll [new file with mode: 0644]
test/CodeGen/WebAssembly/phi.ll
test/CodeGen/WebAssembly/switch.ll [new file with mode: 0644]