-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Yul AST contains dialect #15560
Yul AST contains dialect #15560
Conversation
930ee2a
to
db5b7e4
Compare
db5b7e4
to
8aa7afd
Compare
8aa7afd
to
96e63ab
Compare
One additional place that could benefit from it (and is much less work than the whole optimizer) would be the |
That requires rethinking the compilability checker / the AST itself a bit, as there the dialect is overridden with the
Then at least where no decorated dialect is required, we can take the |
@clonker Interesting. I wasn't aware of this pattern, but looking it it now, this is a really weird design. Having So yeah, a proper solution is more work than just a small refactor. But there is a simple workaround - just pass the original dialect from the object to There's already an implicit assumption in |
Follow up of #15534.
I streamlined some interfaces which would take an object as well as the dialect to just take the object and instead pull the dialect out of it. I think a lot more could be done potentially by reworking most optimizer steps to optionally run on an instance of
yul::AST
instead of the root block - that way dialect <-> ast consistency would be harder to break.