Hi, just came across Issue #5908 (https://github.com/bytecodealliance/wasmtime/issues/5908) regarding blockers for optimisations on trapping arithmetic, but couldn’t find any linked stream here: what’s the current status of the plan to include them for opts?
we will GVN instructions that have idempotent side effects, like trapping, but we don't support rewriting them in ISLE yet
What would be needed to allow isle to rewrite them: is it a semantics thing (as in what way should isle be allowed to do the rewrites?) or an implementation thing?
some combo of https://github.com/bytecodealliance/wasmtime/issues/6106 and https://github.com/bytecodealliance/wasmtime/issues/5908
I realize this is a bit circular, but I guess the most precise answer to "what's the current status?" is that not too much has changed since those issues were filed
What would the conditions need to be to simplify the operations? Looking at the list of idempotent ops, there’s div/rem (where I think it’s sufficient that the denominator is known at comp time), addition that traps on overflow where both operands would need to be known (or at least have some bounds on them) and FcvtToSint / Uint (I presume floating point conversions to integers?) (this is from side_effects_idempotent impl)
I presume floating point conversions to integers?
Last updated: Dec 23 2024 at 13:07 UTC