[all-commits] [llvm/llvm-project] 6c903f: [TableGen] Add support for emitting new function d...

Garvit Gupta via All-commits all-commits at lists.llvm.org
Thu Jul 11 10:54:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c903f05f30147828662eb23f3d91939dbb06a43
      https://github.com/llvm/llvm-project/commit/6c903f05f30147828662eb23f3d91939dbb06a43
  Author: Garvit Gupta <quic_garvgupt at quicinc.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/docs/TableGen/BackEnds.rst
    M llvm/include/llvm/TableGen/SearchableTable.td
    A llvm/test/TableGen/generic-tables-return-range.td
    M llvm/utils/TableGen/SearchableTableEmitter.cpp

  Log Message:
  -----------
  [TableGen] Add support for emitting new function definition to return a range of results for Primary Key (#96174)

In the RISC-V architecture, multiple vendor-specific Control and Status
Registers (CSRs) share the same encoding. However, the existing lookup
function, which currently returns only a single result, falls short.
During disassembly, it consistently returns the first CSR encountered,
which may not be the correct CSR for the subtarget.

To address this issue, we modify the function definition to return a
range of results. These results can then be iterated upon to identify
the CSR that best fits the subtarget’s feature requirements. The
behavior of this new definition is controlled by a variable named
`ReturnRange`, which defaults to `false`.

Specifically, this patch introduces support for emitting a new lookup
function for the primary key. This function returns a pair of iterators
pointing to the first and last values, providing a comprehensive range
of values that satisfy the query



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