diff options
author | Thomas Lively <tlively@google.com> | 2024-08-15 15:32:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 12:32:32 -0700 |
commit | 033a16ec0d063cbcfb6c67adcf228f70653a1bf5 (patch) | |
tree | baa6c82aa41b55c05a7c0c4f64110295fdfdc039 /scripts/test/shared.py | |
parent | d5675780f45f4e2994787fd7dbc5283a6c0162f0 (diff) | |
download | binaryen-033a16ec0d063cbcfb6c67adcf228f70653a1bf5.tar.gz binaryen-033a16ec0d063cbcfb6c67adcf228f70653a1bf5.tar.bz2 binaryen-033a16ec0d063cbcfb6c67adcf228f70653a1bf5.zip |
Simplify validation of stale types (#6842)
The previous rules for stale types were complicated and hard to
remember: in general it was ok for result types to be further refinable
as long as they were not refinable all the way to `unreachable`, but
control flow structures had a carve-out and it was ok for them to be
refinable all the way to unreachable.
Simplify the rules so that further refinable result types are always ok,
no matter what they can be refined to and no matter what kind of
instruction is being validated. This will be much easier to remember and
reason about.
This relaxation of the rules strictly increases the set of valid IR, so
no passes or tests need to be updated. It does make it possible for us
to miss type refinement opportunities that previously would have been
validation errors, but only in cases where non-control-flow instructions
could have been refined all the way to unreachable, so the risk seems
small.
Diffstat (limited to 'scripts/test/shared.py')
0 files changed, 0 insertions, 0 deletions