aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-02-21 10:10:47 -0800
committerHeejin Ahn <aheejin@gmail.com>2021-02-22 12:16:11 -0800
commita08e609d2eac7737bfc14cd4ee35b2cabe1238b6 (patch)
tree6e0340ca5d92ab7bd4689535264dface4d1ab717 /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
parente64fcdf8d53c1d2ab709394c39743fa11d270181 (diff)
downloadllvm-a08e609d2eac7737bfc14cd4ee35b2cabe1238b6.zip
llvm-a08e609d2eac7737bfc14cd4ee35b2cabe1238b6.tar.gz
llvm-a08e609d2eac7737bfc14cd4ee35b2cabe1238b6.tar.bz2
[WebAssembly] Rename methods in WasmEHFuncInfo (NFC)
This renames variable and method names in `WasmEHFuncInfo` class to be simpler and clearer. For example, unwind destinations are EH pads by definition so it doesn't necessarily need to be included in every method name. Also I am planning to add the reverse mapping in a later CL, something like `UnwindDestToSrc`, so this renaming will make meanings clearer. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D97173
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index 7035f74..1870979 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -1330,7 +1330,7 @@ bool WebAssemblyCFGStackify::fixCatchUnwindMismatches(MachineFunction &MF) {
// This can happen when the unwind dest was removed during the
// optimization, e.g. because it was unreachable.
- else if (EHPadStack.empty() && EHInfo->hasEHPadUnwindDest(EHPad)) {
+ else if (EHPadStack.empty() && EHInfo->hasUnwindDest(EHPad)) {
LLVM_DEBUG(dbgs() << "EHPad (" << EHPad->getName()
<< "'s unwind destination does not exist anymore"
<< "\n\n");
@@ -1338,7 +1338,7 @@ bool WebAssemblyCFGStackify::fixCatchUnwindMismatches(MachineFunction &MF) {
// The EHPad's next unwind destination is the caller, but we incorrectly
// unwind to another EH pad.
- else if (!EHPadStack.empty() && !EHInfo->hasEHPadUnwindDest(EHPad)) {
+ else if (!EHPadStack.empty() && !EHInfo->hasUnwindDest(EHPad)) {
EHPadToUnwindDest[EHPad] = getFakeCallerBlock(MF);
LLVM_DEBUG(dbgs()
<< "- Catch unwind mismatch:\nEHPad = " << EHPad->getName()
@@ -1348,8 +1348,8 @@ bool WebAssemblyCFGStackify::fixCatchUnwindMismatches(MachineFunction &MF) {
// The EHPad's next unwind destination is an EH pad, whereas we
// incorrectly unwind to another EH pad.
- else if (!EHPadStack.empty() && EHInfo->hasEHPadUnwindDest(EHPad)) {
- auto *UnwindDest = EHInfo->getEHPadUnwindDest(EHPad);
+ else if (!EHPadStack.empty() && EHInfo->hasUnwindDest(EHPad)) {
+ auto *UnwindDest = EHInfo->getUnwindDest(EHPad);
if (EHPadStack.back() != UnwindDest) {
EHPadToUnwindDest[EHPad] = UnwindDest;
LLVM_DEBUG(dbgs() << "- Catch unwind mismatch:\nEHPad = "