Skip to content
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

Automatic Dialect Loading #171

Closed
NeuralCoder3 opened this issue Jan 12, 2023 · 4 comments
Closed

Automatic Dialect Loading #171

NeuralCoder3 opened this issue Jan 12, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@NeuralCoder3
Copy link
Collaborator

NeuralCoder3 commented Jan 12, 2023

We probably should load dialects automatically.
Currently, the user has to specify the loaded dialects using -d [dialect].

A fine control might be helpful during development (for instance ignoring closure conversion phases).
But we can handle these settings (disabling some phases) also using the opt primitives.
Additionally, it is quite easy to forget to load a dialect and wonder why some passes are not executed (see #169).

One option would be to always load all available phases.

Another would be to load all dialects imported in the file.
This however misses dialects that are recursively needed (e.g. maths in matrix).
If we recursively look up imported dialects, we end up again loading all of them as opt imports nearly every other dialect.

@NeuralCoder3 NeuralCoder3 added the enhancement New feature or request label Jan 12, 2023
@leissa
Copy link
Member

leissa commented Jan 12, 2023

Maybe a --bootstrap option is enough to not load the plugins and only parse the *.thorin files. If --bootstrap is not present all plugins should be auto-loaded.

@NeuralCoder3
Copy link
Collaborator Author

We have something similar already:
If not calling with --output-h, we automatically load core, mem, compile, opt.
So the only difference would probably be to remove the -d option and to search for all available dialects instead of this hardcoded list.

@leissa
Copy link
Member

leissa commented Jan 12, 2023

Right. --output-h implies "bootstrap" mode.

@leissa
Copy link
Member

leissa commented Mar 27, 2023

Fixed by #185.

@leissa leissa closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants