[all-commits] [llvm/llvm-project] df9500: [mlir] Simplify a few cast implementations
rk via All-commits
all-commits at lists.llvm.org
Wed Feb 1 18:53:50 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: df9500c295313f5830fa2f68735cf125a7be4ca3
https://github.com/llvm/llvm-project/commit/df9500c295313f5830fa2f68735cf125a7be4ca3
Author: Rahul Kayaith <rkayaith at gmail.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M mlir/include/mlir/IR/Attributes.h
M mlir/include/mlir/IR/Types.h
M mlir/include/mlir/IR/Value.h
Log Message:
-----------
[mlir] Simplify a few cast implementations
`{Attribute,Type}::classof` are never actually called at runtime due to
the early exit in their `CastInfo` implementations. By using `if
constexpr` we can avoid needing to define them.
We also don't need to check `is_same_v` here, since this is already
covered by `is_base_of_v`.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D142863
More information about the All-commits
mailing list