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.
fitzgen requested alexcrichton for a review on PR #2192.
bjorn3 submitted PR Review.
bjorn3 submitted PR Review.
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.
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.
alexcrichton submitted PR Review.
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.
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.
fitzgen merged PR #2192.
Last updated: Nov 22 2024 at 17:03 UTC