Skip to content

[TableGen] Remove duplicate code in applyMnemonicAliases when target uses DefaultAsmParserVariant. #108494

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

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Sep 13, 2024

The DefaultAsmParserVariant has an empty name. MnemonicAlias uses an empty string to mean the aliases applies to all variants.

Targets that uses DefaultAsmParserVariant were emitting the same code inside the variant loop and after the variant loop because an empty string got passed to emitMnemonicAliasVariant in both places.

This patch detects the empty variant name in the loop and skips the emission.

…uses DefaultAsmParserVariant.

The DefaultAsmParserVariant has an empty name. MnemonicAliases
use an empty string to mean the aliases applies to all variants.

Targets that uses DefaultAsmParserVariant were emitting the same
code inside the variant loop and after the variant loop because
an empty string got passed to emitMnemonicAliasVariant in both places.

This patch detects the empty variant name in the loop and skips
the emission.
@topperc topperc merged commit 520ddf2 into llvm:main Sep 13, 2024
9 checks passed
@topperc topperc deleted the pr/mnemonic-aliases branch September 13, 2024 06:38
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.

2 participants