[MLIR] Use `if constexpr` in `StorageUniquer` and `IR/AffineExpr`
authorJoe Loser <joeloser@fastmail.com>
Sun, 4 Dec 2022 01:01:53 +0000 (18:01 -0700)
committerJoe Loser <joeloser@fastmail.com>
Sun, 4 Dec 2022 02:07:11 +0000 (19:07 -0700)
commit5d3c972a3565df01bb4ac15262b6fe4c3157b807
tree5b5ddf26ba4ed351c81249b98d924405c8db24ca
parentdc0d56febba37ba672c1800be70a3ff5a42f4769
[MLIR] Use `if constexpr` in `StorageUniquer` and `IR/AffineExpr`

Querying the type trait is something that can be done at compile time. So,
replace the runtime `if` with `if constexpr`.

Differential Revision: https://reviews.llvm.org/D139264
mlir/include/mlir/IR/AffineExpr.h
mlir/include/mlir/Support/StorageUniquer.h