alexcrichton requested fitzgen for a review on PR #10080.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #10080.
alexcrichton opened PR #10080 from alexcrichton:pulley-more-bounds-checks
to bytecodealliance:main
:
In profiling a module I was noticing that the previous
xbc32_bound_trap
instruction wasn't being used when I expected. Investigation revealed that the load of the bound itself was GVN'd and deduplicated (yay!) but it meant that the load was used in two locations meaning it didn't pass checks forsinkable_load
. This commit fixes this by repurposingxbc32_bound_trap
for "the bound is in a register" and renaming the previous instruction toxbc32_boundne_trap
. This helps cut down on the number of opcodes in this benchmark and improves performance slightly.At the same time this tightens up "sinkable loads" to require native endianness since that's what the bound of memory is stored as. Additionally in addition to testing for
a < b
and optimizing that this also now optimizesb > a
, the same condition just having the arguments swapped.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-core-reviewers for a review on PR #10080.
alexcrichton requested wasmtime-default-reviewers for a review on PR #10080.
alexcrichton updated PR #10080.
alexcrichton updated PR #10080.
fitzgen submitted PR review.
fitzgen has enabled auto merge for PR #10080.
fitzgen merged PR #10080.
Last updated: Feb 28 2025 at 02:27 UTC