You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pil optimizer can evaluated operations on literals like 1 + 3 -> 4, but it cannot make use of associativity and commutativity. So it does not optimize x + 1 + 3 to x + 4, because it is parsed as (x + 1) + 3.
We should implement the following rules (Li is a literal, X is any expression) - in post-visit-order:
(X + L1) + L2 -> X + (L1 + L2)
(L1 + X) + L2 -> X + (L1 + L2)
(L1 + X) + Y -> (X + Y) + L1 (this is needed to simplify e.g. ((X + 3) + Y) + 9)
(X + L1) + Y -> (X + Y) + L1
...
The text was updated successfully, but these errors were encountered:
The pil optimizer can evaluated operations on literals like
1 + 3
->4
, but it cannot make use of associativity and commutativity. So it does not optimizex + 1 + 3
tox + 4
, because it is parsed as(x + 1) + 3
.We should implement the following rules (
Li
is a literal,X
is any expression) - in post-visit-order:(X + L1) + L2
->X + (L1 + L2)
(L1 + X) + L2
->X + (L1 + L2)
(L1 + X) + Y
->(X + Y) + L1
(this is needed to simplify e.g.((X + 3) + Y) + 9)
(X + L1) + Y
->(X + Y) + L1
The text was updated successfully, but these errors were encountered: