aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2023-05-25 09:22:19 +0200
committerMatthias Springer <me@m-sp.org>2023-05-25 09:27:33 +0200
commitc0261eb02bb092d8842d3c57297e23f31d75cb96 (patch)
treebcb3b3f8185c27226f30150bb5f37362783053b0 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp
parent92723d5a32acefc98a618ebfa47da22002b8e911 (diff)
downloadllvm-c0261eb02bb092d8842d3c57297e23f31d75cb96.zip
llvm-c0261eb02bb092d8842d3c57297e23f31d75cb96.tar.gz
llvm-c0261eb02bb092d8842d3c57297e23f31d75cb96.tar.bz2
[mlir][IR] Improve `clone` function return type of shaped types
There are `clone` overloads that take a shape as a parameter. These overloads are guaranteed to return a ranked shaped type. `TensorType::clone`/`BaseMemRefType::clone` used to always return a `TensorType`/`BaseMemRefType`. The variants that take a shape parameter now return a `RankedTensorType`/`MemRefType`. Better static type information can make extra casts at the call site obsolete. E.g.: ``` {TensorType/RankedTensorType} t; t.clone({1, 2}) // now returns RankedTensorType instead of TensorType ``` Also improve documentation for `clone`. Differential Revision: https://reviews.llvm.org/D150865
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
0 files changed, 0 insertions, 0 deletions