-
Notifications
You must be signed in to change notification settings - Fork 11
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
Dialect Extensions #115
Comments
I'd prefer a design where we put as much stuff as possible within Thorin itself. For example, we should simply expose all different passes/phases as Thorin meta programs. This way the user can simply define their own compilation pipeline or maybe invoke very specific transformations at specific parts in the program. This fixes the E.g. we could so sth like this and let the user explicitly decide where to fire the expensive exponential optimizer:
Another useful thing is "failing is an option". With Thorin we have a super powerful language. But realistically we won't be able to compile each and every edge case that you can build with such language. Now, if you expose the compilation itself as a function the programmer has to invoke, the function may return
Another example would be the LLVM backend failing (see #108 and #9) with sth like
But I think we should take this discussion to a virtual meeting before we rush anything here. |
Just tagging @michel-steuwer |
I think we can close this due to the |
Often, one wants to keep a dialect extensible such that other dialects can attach at a well-defined interface.
An example would be a backend dialect that allows for dialects to handle code emission of new axioms.
This would also augment the rule construct on the cpp site for extensions that go beyond rewrites.
In general, such extension points could take the form of a map/list of functions that the dialect invokes.
The main difficulty in this approach is that the map with its type signature as well as interfacing declarations
have to be visible from other dialects.
A first step towards inter-dialect extensions, visibility, and backend extensions is in
https://github.com/NeuralCoder3/thorin2/tree/dialect_backends
The text was updated successfully, but these errors were encountered: