[all-commits] [llvm/llvm-project] 451e85: [RISCV] Flatten the ImpliedExts table in RISCVISAI...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Apr 26 10:32:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 451e853e512ba6fca51f0743ffa24d252f7fc633
      https://github.com/llvm/llvm-project/commit/451e853e512ba6fca51f0743ffa24d252f7fc633
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
    M llvm/lib/TargetParser/RISCVISAInfo.cpp
    M llvm/test/TableGen/riscv-target-def.td
    M llvm/utils/TableGen/RISCVTargetDefEmitter.cpp

  Log Message:
  -----------
  [RISCV] Flatten the ImpliedExts table in RISCVISAInfo.cpp (#89975)

Previously we had an individiaul global array of implied extensions for
each extension that needed it. This allowed each array to have a
different length. Then we had a sorted table that stored pointers and
size for the indivual arrays keyed by the extension name.

This patch changes the sorted table to use multiple rows if multiple
extensions are implied. We use equal_range instead of lower_bound to
find all the rows that apply to a given extension.

The CombineIntoExts array was also modified to store only the extension
name that need to be combined. This extension name is looked up in the
implied table to find all the extensions it depends on.



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