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

Error if duplicated mnemonics are found. #88

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

tsymalla
Copy link
Contributor

@tsymalla tsymalla commented Feb 5, 2024

We currently don't emit an error when a dialect defines two dialect operations with the same mnemonic. This change emits basic information about duplicate mnemonics.

Since this requires a O(n) loop worst-case, store the mnemonic counts per dialect in a StringMap and iterate over it during finalization of the dialect, which then also bails out.

Can possibly be extended to all kinds of duplicated symbols.

We currently don't emit an error when a dialect defines two dialect operations
with the same mnemonic. This change emits basic information about duplicate
mnemonics.

Since this requires a `O(n)` loop worst-case, store the mnemonic counts per
dialect in a `StringMap` and iterate over it during finalization of the dialect,
which then also bails out.

Can possibly be extended to all kinds of duplicated symbols.
@tsymalla-AMD tsymalla-AMD merged commit e6cbcfd into GPUOpen-Drivers:dev Feb 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants