diff options
author | Heejin Ahn <aheejin@gmail.com> | 2024-09-04 16:14:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 16:14:13 -0700 |
commit | aecbc924102ee57ea639cd76ed32b37eb2d257fc (patch) | |
tree | 9a69ca9a6ca9c29bd9f56b74d5be210a128d64a9 /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | |
parent | 9efe377307694be0c92f7cb3b02fd1d090fdbeb8 (diff) | |
download | llvm-aecbc924102ee57ea639cd76ed32b37eb2d257fc.zip llvm-aecbc924102ee57ea639cd76ed32b37eb2d257fc.tar.gz llvm-aecbc924102ee57ea639cd76ed32b37eb2d257fc.tar.bz2 |
[WebAssembly] Rename CATCH/CATCH_ALL to *_LEGACY (#107187)
This renames MIR instruction `CATCH` and `CATCH_ALL` to `CATCH_LEGACY`
and `CATCH_ALL_LEGACY` respectively.
Follow-up PRs for the new EH (exnref) implementation will use `CATCH`,
`CATCH_REF`, `CATCH_ALL`, and `CATCH_ALL_REF` as pseudo-instructions
that return extracted values or `exnref` or both, because we don't
currently support block return values in LLVM. So to give the old (real)
`CATCH`es and the new (pseudo) `CATCH`es different names, this attaches
`_LEGACY` prefix to the old names.
This also rearranges `WebAssemblyInstrControl.td` so that the old legacy
instructions are listed all together at the end.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index 6fd882f..3362ea5 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -1305,7 +1305,7 @@ bool WebAssemblyCFGStackify::fixCatchUnwindMismatches(MachineFunction &MF) { // catch_all always catches an exception, so we don't need to do // anything - if (MI.getOpcode() == WebAssembly::CATCH_ALL) { + if (MI.getOpcode() == WebAssembly::CATCH_ALL_LEGACY) { } // This can happen when the unwind dest was removed during the @@ -1448,8 +1448,8 @@ void WebAssemblyCFGStackify::recalculateScopeTops(MachineFunction &MF) { case WebAssembly::DELEGATE: updateScopeTops(EndToBegin[&MI]->getParent(), &MBB); break; - case WebAssembly::CATCH: - case WebAssembly::CATCH_ALL: + case WebAssembly::CATCH_LEGACY: + case WebAssembly::CATCH_ALL_LEGACY: updateScopeTops(EHPadToTry[&MBB]->getParent(), &MBB); break; } @@ -1698,8 +1698,8 @@ void WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) { Stack.push_back(std::make_pair(EndToBegin[&MI]->getParent(), &MI)); break; - case WebAssembly::CATCH: - case WebAssembly::CATCH_ALL: + case WebAssembly::CATCH_LEGACY: + case WebAssembly::CATCH_ALL_LEGACY: EHPadStack.pop_back(); break; |