[all-commits] [llvm/llvm-project] 8ae048: [TableGen] Extend direct lookup to instruction val...

Jason Eckhardt via All-commits all-commits at lists.llvm.org
Tue Feb 6 20:49:51 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ae048507086cc3a2ceb6974506d3048c516a726
      https://github.com/llvm/llvm-project/commit/8ae048507086cc3a2ceb6974506d3048c516a726
  Author: Jason Eckhardt <jeckhardt at nvidia.com>
  Date:   2024-02-07 (Wed, 07 Feb 2024)

  Changed paths:
    M llvm/docs/TableGen/BackEnds.rst
    M llvm/test/TableGen/generic-tables-instruction.td
    M llvm/utils/TableGen/CodeGenTarget.cpp
    M llvm/utils/TableGen/CodeGenTarget.h
    M llvm/utils/TableGen/SearchableTableEmitter.cpp

  Log Message:
  -----------
  [TableGen] Extend direct lookup to instruction values in generic tables. (#80486)

Currently, for some tables involving a single primary key field which is
integral and densely numbered, a direct lookup is generated rather than
a binary search. This patch extends the direct lookup function
generation to instructions, where the integral value corresponds to the
instruction's enum value.

While this isn't as common as for other tables, it does occur in at
least one downstream backend and one in-tree backend.

Added a unit test and minimally updated the documentation.




More information about the All-commits mailing list