aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorDavid Sherwood <david.sherwood@arm.com>2020-08-14 12:15:59 +0100
committerDavid Sherwood <david.sherwood@arm.com>2020-08-28 14:43:53 +0100
commitf4257c5832aa51e960e7351929ca3d37031985b7 (patch)
treea4631cb9d0e5ff0b70b28cd82c3810d0d7cc56a6 /llvm/lib/IR/Function.cpp
parentf20e6c7253859454c2f39adae19d80a31a0456a9 (diff)
downloadllvm-f4257c5832aa51e960e7351929ca3d37031985b7.zip
llvm-f4257c5832aa51e960e7351929ca3d37031985b7.tar.gz
llvm-f4257c5832aa51e960e7351929ca3d37031985b7.tar.bz2
[SVE] Make ElementCount members private
This patch changes ElementCount so that the Min and Scalable members are now private and can only be accessed via the get functions getKnownMinValue() and isScalable(). In addition I've added some other member functions for more commonly used operations. Hopefully this makes the class more useful and will reduce the need for calling getKnownMinValue(). Differential Revision: https://reviews.llvm.org/D86065
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index b29a00c..e701fea 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -714,9 +714,10 @@ static std::string getMangledTypeStr(Type* Ty) {
Result += "f";
} else if (VectorType* VTy = dyn_cast<VectorType>(Ty)) {
ElementCount EC = VTy->getElementCount();
- if (EC.Scalable)
+ if (EC.isScalable())
Result += "nx";
- Result += "v" + utostr(EC.Min) + getMangledTypeStr(VTy->getElementType());
+ Result += "v" + utostr(EC.getKnownMinValue()) +
+ getMangledTypeStr(VTy->getElementType());
} else if (Ty) {
switch (Ty->getTypeID()) {
default: llvm_unreachable("Unhandled type");