[PATCH] D76376: [ValueTypes] Add EVT::isFixedLengthVector
Cullen Rhodes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 11:57:39 PDT 2020
c-rhodes created this revision.
c-rhodes added reviewers: sdesmalen, efriedma, ctetreau, huntergr.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, mgorny.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
Related to D75672 <https://reviews.llvm.org/D75672>, this patch adds EVT::isFixedLengthVector to determine
if the underlying vector type is of fixed length.
An assert is introduced in EVT::getVectorNumElements that triggers for
types that aren't fixed length. This is currently guarded by a flag
added D75297 <https://reviews.llvm.org/D75297> that is off by default and has been renamed to the more
generic ENABLE_STRICT_FIXED_SIZE_VECTORS.
Ideally we want to get rid of getVectorNumElements but a quick grep
shows there are >350 uses in lib/CodeGen and 75 in lib/Target/AArch64
alone. All of these probably aren't EVT::getVectorNumElements (some may
be the MVT equivalent), but there are many places to fixup and having
the assert on by default would make the SVE upstreaming effort
difficult.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76376
Files:
llvm/CMakeLists.txt
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/include/llvm/CodeGen/ValueTypes.h
llvm/include/llvm/Support/TypeSize.h
llvm/lib/CodeGen/ValueTypes.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76376.251140.patch
Type: text/x-patch
Size: 4194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200318/732fda21/attachment.bin>
More information about the llvm-commits
mailing list