Stream: git-wasmtime

Topic: wasmtime / Issue #1706 Investigate ways to take advantage...


view this post on Zulip Wasmtime GitHub notifications bot (May 14 2020 at 17:29):

fitzgen opened Issue #1706:

Right now, peepmatic has no knowledge of (for example) iadd's commutativity, and so both of the following optimizations must be written:

(=> (iadd $C $x) (iadd_imm $C $x))
(=> (iadd $x $C) (iadd_imm $C $x))

We could give peepmatic knowledge of commutativity to make it so that we only had to write one or the other in the DSL.

If we did this at the automaton level, this would create extra states (but I guess we have those states anyways if we repeat the optimization definitions).

If we did this at the interpreter level, this would not create extra states, but would involve extra runtime checking. It would also be incompatible with #1704

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2020 at 17:29):

fitzgen labeled Issue #1706:

Right now, peepmatic has no knowledge of (for example) iadd's commutativity, and so both of the following optimizations must be written:

(=> (iadd $C $x) (iadd_imm $C $x))
(=> (iadd $x $C) (iadd_imm $C $x))

We could give peepmatic knowledge of commutativity to make it so that we only had to write one or the other in the DSL.

If we did this at the automaton level, this would create extra states (but I guess we have those states anyways if we repeat the optimization definitions).

If we did this at the interpreter level, this would not create extra states, but would involve extra runtime checking. It would also be incompatible with #1704

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2020 at 17:36):

github-actions[bot] commented on Issue #1706:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "cranelift:area:peepmatic"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (May 14 2020 at 19:40):

fitzgen commented on Issue #1706:

Another option is to first have a canonicalization pass that makes sure that all constants are the first operand (for example) and then later optimization passes only need to include one version of the optimization.


Last updated: Nov 22 2024 at 16:03 UTC