Optimize ref tests/casts dominated by other tests/casts
Categories
(Core :: JavaScript: WebAssembly, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox149 | --- | fixed |
People
(Reporter: bvisness, Assigned: bvisness)
References
(Blocks 1 open bug)
Details
Attachments
(4 external files, 1 obsolete file)
There are optimizations we could perform to tighten up ref.test and ref.cast. For example, a ref.cast dominated by a ref.test of the same type could be omitted.
| Assignee | ||
Comment 1•1 year ago
|
||
This allows ref.is_null to participate in other optimizations around
tests and casts.
Updated•11 months ago
|
| Assignee | ||
Comment 2•11 months ago
|
||
I don't think we'll actually do anything with this patch because it
doesn't seem worthwhile to remove redundant casts this way. It should be
covered by other work on this bug.
Updated•11 months ago
|
| Assignee | ||
Comment 3•11 months ago
|
||
The LUB seemed like the conservative choice when commoning up nodes
during GVN, but actually this is somewhat wrong. Combining the types
from two equivalent nodes is not like combining the types in a phi; in
the latter case the values are not equivalent and therefore you must
find an upper bound, while in the former the values are equivalent and
therefore you can safely take a lower bound.
This restores the property that ref types only lower over the course of
optimization, which makes everything more sane and predictable.
| Assignee | ||
Comment 4•11 months ago
|
||
There is a suite of optimizations we can make when ref.test and ref.cast
instructions dominate each other. This is not yet captured by any other
optimizations but should particularly help the pattern of:
local.get $obj
ref.test (ref $t)
if
local.get $obj
ref.cast $obj
...
end
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
| Assignee | ||
Comment 5•11 months ago
|
||
Adds some utilities for testing the output of wasmDumpIon.
Comment 7•10 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c4763d2128b2
https://hg.mozilla.org/mozilla-central/rev/5c6a5ced3d08
https://hg.mozilla.org/mozilla-central/rev/05a6a78965eb
https://hg.mozilla.org/mozilla-central/rev/dea2601c7d86
Updated•8 months ago
|
Updated•5 days ago
|
Description
•