summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/VectorUtils.cpp
diff options
context:
space:
mode:
authorFrancesco Petrogalli <francesco.petrogalli@arm.com>2019-11-11 19:42:18 +0000
committerFrancesco Petrogalli <francesco.petrogalli@arm.com>2019-11-15 18:42:56 +0000
commitd6de5f12d485a85504bc99d384a85634574a27e2 (patch)
treeb0833f4c77a6c8a7d4dc6debcaae45582b6c3dd3 /llvm/lib/Analysis/VectorUtils.cpp
parent209e30b7e0c20796f8f2c941d13e7e4994479c6b (diff)
downloadbcm5719-llvm-d6de5f12d485a85504bc99d384a85634574a27e2.tar.gz
bcm5719-llvm-d6de5f12d485a85504bc99d384a85634574a27e2.zip
[SVFS] Inject TLI Mappings in VFABI attribute.
This patch introduces a function pass to inject the scalar-to-vector mappings stored in the TargetLIbraryInfo (TLI) into the Vector Function ABI (VFABI) variants attribute. The test is testing the injection for three vector libraries supported by the TLI (Accelerate, SVML, MASSV). The pass does not change any of the analysis associated to the function. Differential Revision: https://reviews.llvm.org/D70107
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index d11cb6a4d3c..44043bd582c 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -1166,6 +1166,9 @@ void VFABI::getVectorVariantNames(
const StringRef S =
CI.getAttribute(AttributeList::FunctionIndex, VFABI::MappingsAttrName)
.getValueAsString();
+ if (S.empty())
+ return;
+
SmallVector<StringRef, 8> ListAttr;
S.split(ListAttr, ",");
OpenPOWER on IntegriCloud