[all-commits] [llvm/llvm-project] 4509fb: [MLIR] Simplify key construction/hashing in Storag...

Joe Loser via All-commits all-commits at lists.llvm.org
Sat Dec 3 16:21:05 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4509fb9c007e13b65153e9e797df4fca00ecb241
      https://github.com/llvm/llvm-project/commit/4509fb9c007e13b65153e9e797df4fca00ecb241
  Author: Joe Loser <joeloser at fastmail.com>
  Date:   2022-12-03 (Sat, 03 Dec 2022)

  Changed paths:
    M mlir/include/mlir/Support/StorageUniquer.h

  Log Message:
  -----------
  [MLIR] Simplify key construction/hashing in StorageUniquer

`getKey` and `getHash` use mutually exclusive overloads based on existence of
methods to determine how to compute get the key or hash, respectively.  This is
a bit verbose with `std::enable_if_t`.  Simplify it a bit by using
`if constexpr` directly.  As an added bonus, this is slightly quicker to
compile.

Differential Revision: https://reviews.llvm.org/D139245




More information about the All-commits mailing list