[PATCH] D78841: [SVE] Add specialized overloads of VectorType::get
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 15:39:43 PDT 2020
ctetreau updated this revision to Diff 260469.
ctetreau added a comment.
rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78841/new/
https://reviews.llvm.org/D78841
Files:
llvm/include/llvm/IR/DerivedTypes.h
Index: llvm/include/llvm/IR/DerivedTypes.h
===================================================================
--- llvm/include/llvm/IR/DerivedTypes.h
+++ llvm/include/llvm/IR/DerivedTypes.h
@@ -539,6 +539,10 @@
public:
static FixedVectorType *get(Type *ElementType, unsigned NumElts);
+ static FixedVectorType *get(Type *ElementType, const FixedVectorType *FVTy) {
+ return get(ElementType, FVTy->getNumElements());
+ }
+
static bool classof(const Type *T) {
return T->getTypeID() == FixedVectorTyID;
}
@@ -553,6 +557,11 @@
public:
static ScalableVectorType *get(Type *ElementType, unsigned MinNumElts);
+ static ScalableVectorType *get(Type *ElementType,
+ const ScalableVectorType *SVTy) {
+ return get(ElementType, SVTy->getMinNumElements());
+ }
+
/// Get the minimum number of elements in this vector. The actual number of
/// elements in the vector is an integer multiple of this value.
uint64_t getMinNumElements() const { return ElementQuantity; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78841.260469.patch
Type: text/x-patch
Size: 1031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/6fdb2040/attachment.bin>
More information about the llvm-commits
mailing list