[all-commits] [llvm/llvm-project] 867de1: [SVE] Mark VectorType::getNumElements() deprecated
Christopher Tetreault via All-commits
all-commits at lists.llvm.org
Mon Aug 31 15:13:29 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 867de151a52b6d0750485ac1cf9b3bc012ee51fd
https://github.com/llvm/llvm-project/commit/867de151a52b6d0750485ac1cf9b3bc012ee51fd
Author: Christopher Tetreault <ctetreau at quicinc.com>
Date: 2020-08-31 (Mon, 31 Aug 2020)
Changed paths:
M llvm/include/llvm/IR/DerivedTypes.h
Log Message:
-----------
[SVE] Mark VectorType::getNumElements() deprecated
getNumElements() is being removed from base VectorType in
order to eliminate the class of bugs in which a scalable vector
is accidentally treated like a fixed length vector. Clients of
this function should either call getElementCount(), and handle
the case where getElementCount().isScalable() is true, or they can
cast to FixedVectorType and call getNumElements() if they are
sure that the vector has fixed width.
Deprecated VectorType functions will be removed after the LLVM
12 branch.
See: http://lists.llvm.org/pipermail/llvm-dev/2020-March/139811.html
Reviewed By: fpetrogalli
Differential Revision: https://reviews.llvm.org/D78127
More information about the All-commits
mailing list