summaryrefslogtreecommitdiff
path: root/src/ir/possible-contents.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-10-18 16:17:31 -0700
committerGitHub <noreply@github.com>2022-10-18 16:17:31 -0700
commitb484813b1ec598ee5a895b1b2c784bed856cbd9c (patch)
treeab9196ba4fb59bafdf60c1eabf659367262049a0 /src/ir/possible-contents.cpp
parent6a60b9e1d9fbaeeda20ac31b289fda4daa48d209 (diff)
downloadbinaryen-b484813b1ec598ee5a895b1b2c784bed856cbd9c.tar.gz
binaryen-b484813b1ec598ee5a895b1b2c784bed856cbd9c.tar.bz2
binaryen-b484813b1ec598ee5a895b1b2c784bed856cbd9c.zip
[Wasm GC] [NFC] Remove .type checks from GUFA that are not needed with modern nulls (#5154)
Modern nulls never compare equal unless they have the same type too.
Diffstat (limited to 'src/ir/possible-contents.cpp')
-rw-r--r--src/ir/possible-contents.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/ir/possible-contents.cpp b/src/ir/possible-contents.cpp
index 209028f25..5a2482413 100644
--- a/src/ir/possible-contents.cpp
+++ b/src/ir/possible-contents.cpp
@@ -1665,13 +1665,8 @@ bool Flower::updateContents(LocationIndex locationIndex,
}
}
- // Check if anything changed. Note that we check not just the content but
- // also its type. That handles the case of nulls, that compare equal even if
- // their type differs. We want to keep flowing if the type can change, so that
- // we always end up with a deterministic result no matter in what order the
- // flow happens (the final result will be the LUB of all the types of nulls
- // that can arrive).
- if (contents == oldContents && contents.getType() == oldContents.getType()) {
+ // Check if anything changed.
+ if (contents == oldContents) {
// Nothing actually changed, so just return.
return worthSendingMore;
}
@@ -1692,9 +1687,8 @@ bool Flower::updateContents(LocationIndex locationIndex,
filtered = true;
}
- if (filtered && contents == oldContents &&
- contents.getType() == oldContents.getType()) {
- // Nothing actually changed after filtering, so just return.
+ // Check if anything changed after filtering, if we did so.
+ if (filtered && contents == oldContents) {
return worthSendingMore;
}