[all-commits] [llvm/llvm-project] 0b8379: [RISCV][GISel] Sink getOperandsMapping call out of...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Nov 15 14:29:11 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b8379bff752c02d6cf0c0458085025c24d70118
      https://github.com/llvm/llvm-project/commit/0b8379bff752c02d6cf0c0458085025c24d70118
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/GISel/RISCVRegisterBankInfo.cpp

  Log Message:
  -----------
  [RISCV][GISel] Sink getOperandsMapping call out of the switch in getInstrMapping. (#72326)

Use a SmallVector of `ValueMapping *` that we populate in the switch for
each register operand. The entry in the SmallVector defaults to nullptr
for each operand so we don't need to write explicit `nullptr` in the
cases.

After this we can generically fill in GPR for registers as a default
case and remove some opcodes from the switch.




More information about the All-commits mailing list