[PATCH] D87207: [WebAssembly] Fix fixEndsAtEndOfFunction for try-catch
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 6 12:04:22 PDT 2020
aheejin added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp:1105-1109
- // Find 'catch' and 'local.set' or 'drop' instruction that follows the
- // 'catch'. If -wasm-disable-explicit-locals is not set, 'catch' should be
- // always followed by either 'local.set' or a 'drop', because 'br_on_exn' is
- // generated after 'catch' in LateEHPrepare and we don't support blocks
- // taking values yet.
----------------
This comment block is out-of-date; we don't search for 'local.set' or 'drop' anymore. Deleted it while touching this code.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp:1110-1121
- MachineInstr *Catch = nullptr;
- unsigned ExnReg = 0;
- for (auto &MI : *EHPad) {
- switch (MI.getOpcode()) {
- case WebAssembly::CATCH:
- Catch = &MI;
- ExnReg = Catch->getOperand(0).getReg();
----------------
This is extracted as `findCatch` method above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87207/new/
https://reviews.llvm.org/D87207
More information about the llvm-commits
mailing list