[all-commits] [llvm/llvm-project] 520ddf: [TableGen] Remove duplicate code in applyMnemonicA...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Sep 12 23:38:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 520ddf22b2270dc092dbdbd391b1c02c403b475a
      https://github.com/llvm/llvm-project/commit/520ddf22b2270dc092dbdbd391b1c02c403b475a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-09-12 (Thu, 12 Sep 2024)

  Changed paths:
    M llvm/utils/TableGen/AsmMatcherEmitter.cpp

  Log Message:
  -----------
  [TableGen] Remove duplicate code in applyMnemonicAliases when target uses DefaultAsmParserVariant. (#108494)

The DefaultAsmParserVariant has an empty name. MnemonicAlias uses an
empty string to mean the alias 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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list