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
While looking at #476, I noticed that Optimizer only folds certain nodes. For example, Concat nodes are not optimized, but should be. Since all it's doing is trying to call node.as_const, and all Expr nodes define as_const and raise Impossible appropriately, can we safely make fold apply to all nodes that define as_const? Something like:
It looks sane but I'm not quite sure if there are some unintended consequences to this. As far as I know it should not break anything or it was not sound before either.
While looking at #476, I noticed that
Optimizer
only folds certain nodes. For example,Concat
nodes are not optimized, but should be. Since all it's doing is trying to callnode.as_const
, and allExpr
nodes defineas_const
and raiseImpossible
appropriately, can we safely makefold
apply to all nodes that defineas_const
? Something like:@mitsuhiko
The text was updated successfully, but these errors were encountered: