Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Lively
37a984b8bc [WebAssembly] Massive instruction renaming
Summary:
An automated renaming of all the instructions listed at
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329
as well as some similarly-named identifiers.

Reviewers: aheejin, dschuff, aardappel

Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350609 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 06:25:55 +00:00
Heejin Ahn
204bd90e5d [WebAssembly] Split BBs after throw instructions
Summary:
`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

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347003 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-16 00:47:18 +00:00
Benjamin Kramer
3898e47d1e Move some helpers from the global namespace into anonymous ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344468 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-13 22:18:22 +00:00
Heejin Ahn
65c237b70d [WebAssembly] Don't modify preds/succs iterators while erasing from them
Summary:
This caused out-of-bound bugs. Found by
`-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343814 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-04 21:03:35 +00:00
Heejin Ahn
3c76da17f7 [WebAssembly] Modify LateEHPrepare one-line description (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339972 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-17 00:12:04 +00:00
Benjamin Kramer
6c395a1b58 [Wasm] Don't iterate over MachineBasicBlock::successors while erasing from it
This will read out of bounds. Found by asan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@339230 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 10:13:19 +00:00
Heejin Ahn
6aa7ab2443 [WebAssembly] Add WebAssemblyLateEHPrepare pass
Summary:
Add WebAssemblyLateEHPrepare pass that does several small jobs for
exception handling. This runs before CFGSort, and is different from
WasmEHPrepare pass that runs before ISel, even though the names are
similar.

Reviewers: dschuff, majnemer

Subscribers: sbc100, jgravelle-google, sunfish, mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335438 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-25 01:07:11 +00:00