Stream: git-wasmtime

Topic: wasmtime / PR #2192 Convert Souper optimizations to Peepm...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 10 2020 at 20:14):

fitzgen opened PR #2192 from souper-to-peepmatic to main:

Conversion from Souper into Peepmatic is implemented with a straightforward, top-down recursive traversal of the optimization's left- and right-hand side expression DAGs. Most Souper instructions have a corresponding Peepmatic instruction. If we run into an instruction where that isn't the case, we skip that Souper optimization and move on to the next one.

Note that Souper fully supports DAGs, for example:

%0 = var
%1 = add 1, %0
%2 = add %1, %1       ;; Two edges to `%1` makes this a DAG.

On the other hand, Peepmatic only currently supports trees, so shared subexpressions are duplicated:

(iadd (iadd 1 $x)
      (iadd 1 $x))    ;; The shared subexpression is duplicated.

This does not, however, affect correctness.

See also #2184, which is related.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 10 2020 at 20:14):

fitzgen requested alexcrichton for a review on PR #2192.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 10 2020 at 20:54):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 10 2020 at 20:54):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 10 2020 at 20:54):

bjorn3 created PR Review Comment:

You could use as_bytes()[1] as % is in the ascii range and you are checking if it is an ascii lowercase alphabetic character.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 10 2020 at 23:06):

fitzgen updated PR #2192 from souper-to-peepmatic to main:

Conversion from Souper into Peepmatic is implemented with a straightforward, top-down recursive traversal of the optimization's left- and right-hand side expression DAGs. Most Souper instructions have a corresponding Peepmatic instruction. If we run into an instruction where that isn't the case, we skip that Souper optimization and move on to the next one.

Note that Souper fully supports DAGs, for example:

%0 = var
%1 = add 1, %0
%2 = add %1, %1       ;; Two edges to `%1` makes this a DAG.

On the other hand, Peepmatic only currently supports trees, so shared subexpressions are duplicated:

(iadd (iadd 1 $x)
      (iadd 1 $x))    ;; The shared subexpression is duplicated.

This does not, however, affect correctness.

See also #2184, which is related.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2020 at 18:18):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2020 at 21:18):

fitzgen updated PR #2192 from souper-to-peepmatic to main:

Conversion from Souper into Peepmatic is implemented with a straightforward, top-down recursive traversal of the optimization's left- and right-hand side expression DAGs. Most Souper instructions have a corresponding Peepmatic instruction. If we run into an instruction where that isn't the case, we skip that Souper optimization and move on to the next one.

Note that Souper fully supports DAGs, for example:

%0 = var
%1 = add 1, %0
%2 = add %1, %1       ;; Two edges to `%1` makes this a DAG.

On the other hand, Peepmatic only currently supports trees, so shared subexpressions are duplicated:

(iadd (iadd 1 $x)
      (iadd 1 $x))    ;; The shared subexpression is duplicated.

This does not, however, affect correctness.

See also #2184, which is related.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2020 at 21:21):

fitzgen updated PR #2192 from souper-to-peepmatic to main:

Conversion from Souper into Peepmatic is implemented with a straightforward, top-down recursive traversal of the optimization's left- and right-hand side expression DAGs. Most Souper instructions have a corresponding Peepmatic instruction. If we run into an instruction where that isn't the case, we skip that Souper optimization and move on to the next one.

Note that Souper fully supports DAGs, for example:

%0 = var
%1 = add 1, %0
%2 = add %1, %1       ;; Two edges to `%1` makes this a DAG.

On the other hand, Peepmatic only currently supports trees, so shared subexpressions are duplicated:

(iadd (iadd 1 $x)
      (iadd 1 $x))    ;; The shared subexpression is duplicated.

This does not, however, affect correctness.

See also #2184, which is related.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 11 2020 at 21:54):

fitzgen merged PR #2192.


Last updated: Dec 23 2024 at 12:05 UTC