]> granicus.if.org Git - llvm/commit
[WebAssembly] Irreducible control flow rewrite
authorHeejin Ahn <aheejin@gmail.com>
Sat, 16 Mar 2019 03:00:19 +0000 (03:00 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Sat, 16 Mar 2019 03:00:19 +0000 (03:00 +0000)
commitccae125ce42687506c2fefdfa31f31ccf686e4b8
tree01c3f663ab88aa8ca62f73cead8d1ff3493d7273
parentd6001a9722ffe7cc70c20dfed27c6515bead372f
[WebAssembly] Irreducible control flow rewrite

Summary:
Rewrite WebAssemblyFixIrreducibleControlFlow to a simpler and cleaner
design, which directly computes reachability and other properties
itself. This avoids previous complexity and bugs. (The new graph
analyses are very similar to how the Relooper algorithm would find loop
entries and so forth.)

This fixes a few bugs, including where we had a false positive and
thought fannkuch was irreducible when it was not, which made us much
larger and slower there, and a reverse bug where we missed
irreducibility. On fannkuch, we used to be 44% slower than asm2wasm and
are now 4% faster.

Reviewers: aheejin

Subscribers: jdoerfert, mgrang, dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

Patch by Alon Zakai (kripken)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356313 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
test/CodeGen/WebAssembly/irreducible-cfg-nested.ll [deleted file]
test/CodeGen/WebAssembly/irreducible-cfg-nested2.ll [deleted file]
test/CodeGen/WebAssembly/irreducible-cfg.ll