Commit Graph

5 Commits

Author SHA1 Message Date
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