[all-commits] [llvm/llvm-project] ef848f: [AsmParser] Match mandatory operands following opt...

Ivan Kosarev via All-commits all-commits at lists.llvm.org
Thu Nov 10 04:51:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef848f27d74dcff6455f05890566333bddbdb77e
      https://github.com/llvm/llvm-project/commit/ef848f27d74dcff6455f05890566333bddbdb77e
  Author: Ivan Kosarev <ivan.kosarev at amd.com>
  Date:   2022-11-10 (Thu, 10 Nov 2022)

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

  Log Message:
  -----------
  [AsmParser] Match mandatory operands following optional operands.

Currently, the asm parser stops matching instruction operands as soon as
the first optional operand is encountered. This leads to the need for
custom checks on missing mandatory operands that come after optional
operands.

The patch changes the parser to always match all optional and mandatory
instruction operands, thus making the custom checks unnecessary. This is
particularly useful for the AMDGPU backend where we have numerous
optional instruction modifiers.

Differential Revision: https://reviews.llvm.org/D137549


  Commit: 926acd2bb55d8deed96b134a12321ee6725671f4
      https://github.com/llvm/llvm-project/commit/926acd2bb55d8deed96b134a12321ee6725671f4
  Author: Ivan Kosarev <ivan.kosarev at amd.com>
  Date:   2022-11-10 (Thu, 10 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

  Log Message:
  -----------
  [AMDGPU][AsmParser] Remove extra checks on missing instruction modifiers.

https://reviews.llvm.org/D137549 makes them unnecessary.

Reviewed By: dp

Differential Revision: https://reviews.llvm.org/D137638


Compare: https://github.com/llvm/llvm-project/compare/af6b1f797f94...926acd2bb55d


More information about the All-commits mailing list