summaryrefslogtreecommitdiff
path: root/src/ir/struct-utils.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-04-10 15:36:11 -0700
committerGitHub <noreply@github.com>2023-04-10 15:36:11 -0700
commitde8c2b5bbfb3410a7d526a5b0c3eb40f9db75a71 (patch)
tree64d03eb10cf1f921f04e04683bd234c2fc53e072 /src/ir/struct-utils.h
parent35a237db1b96b37cfa7638d2f8d22aa46a626683 (diff)
downloadbinaryen-de8c2b5bbfb3410a7d526a5b0c3eb40f9db75a71.tar.gz
binaryen-de8c2b5bbfb3410a7d526a5b0c3eb40f9db75a71.tar.bz2
binaryen-de8c2b5bbfb3410a7d526a5b0c3eb40f9db75a71.zip
[GUFA] Fix packed field filtering (#5652)
Technically we need to filter both before and after combining, that is, if a location's contents will be filtered by F() then if the new contents are x and old contents y then we need to end up with F(F(x) U F(y)). That is, filtering before is necessary to ensure the union of content does not end up unnecessarily large, and the filtering after is necessary to ensure the final result is properly filtered to fit. (If our representation were perfect then this would not be needed, but it is not, as the union of two exact types can end up as a very large cone, for example.) For efficiency we have been filtering afterwards. But that is not enough for packed fields, it turns out, where we must filter before. If we don't, then if inputs 0 and 0x100 arrive to an i8 field then combining them we get "unknown integer" (which is then filtered by 0xff, but it's too late). By filtering before, the actual values are both 0 and we end up with that as the only possible value. It turns out that filtering before is enough for such fields, so do only that.
Diffstat (limited to 'src/ir/struct-utils.h')
0 files changed, 0 insertions, 0 deletions