[all-commits] [llvm/llvm-project] a7e079: [RISCV] Use binary search to look up supported pro...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed May 1 14:56:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a7e07988549c79d9bfecec3e630141fff61f52f0
      https://github.com/llvm/llvm-project/commit/a7e07988549c79d9bfecec3e630141fff61f52f0
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
    M llvm/lib/TargetParser/RISCVISAInfo.cpp
    M llvm/utils/TableGen/RISCVTargetDefEmitter.cpp

  Log Message:
  -----------
  [RISCV] Use binary search to look up supported profiles. (#90767)

As the list of profiles grow, this will be a more efficient lookup.

Because the profile name is a prefix of the Arch string, we use
upper_bound to find the first profile that definitely comes after the
Arch string. If that isn't the first supported profile, we move back 1
profile and see if that profile is a prefix of our Arch string.



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