-
Notifications
You must be signed in to change notification settings - Fork 7
Reduce the work to add a new expr: rewrite SubstituteInExpr with OptOutMutator #2202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
shift_expr->padWidth()); | ||
} | ||
protected: | ||
virtual void removeExpr(IrContainer*, Expr*) const override {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice trick!
mma_expr->container(), out, in_a, in_b, init, mma_expr->options()); | ||
private: | ||
explicit SubstituteInExpr(Val* reference, Val* substitute) { | ||
mutations[reference] = substitute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename this to mutations_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
stacked on #2199