[all-commits] [llvm/llvm-project] b14d34: [GISel] Make the PartialMapping and ValueMapping c...

Craig Topper via All-commits all-commits at lists.llvm.org
Sun Nov 5 12:17:22 PST 2023


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

  Changed paths:
    M llvm/include/llvm/CodeGen/RegisterBankInfo.h

  Log Message:
  -----------
  [GISel] Make the PartialMapping and ValueMapping constructors constexpr.

Backends contain static tables of PartialMapping and ValueMapping.
Without the constexpr, the initial code from the frontend contains
a global constructor to construct each entry of the table. The clang
optimizer is able to optimize the constructors away, but gcc 8 is not
able to.

Using constexpr allows the tables to be created directly in the
frontend without requiring optimizations to be performed.




More information about the All-commits mailing list