summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorFrancesco Petrogalli <francesco.petrogalli@arm.com>2019-12-13 19:15:29 +0000
committerFrancesco Petrogalli <francesco.petrogalli@arm.com>2019-12-13 19:42:04 +0000
commit19f73f0d1b8d4f4a7b7451fea33a35015fe0942d (patch)
tree426b50dc3a7f66a447e1cd38f710eaef25a2cf12 /llvm/lib/Analysis
parent193da743db63bc7299717f583a63e68d55408731 (diff)
downloadbcm5719-llvm-19f73f0d1b8d4f4a7b7451fea33a35015fe0942d.tar.gz
bcm5719-llvm-19f73f0d1b8d4f4a7b7451fea33a35015fe0942d.zip
Revert "[VectorUtils] Introduce the Vector Function Database (VFDatabase)."
This reverts commit 0be81968a283fd4161cb9ac9748d5ed200926292. The VFDatabase needs some rework to be able to handle vectorization and subsequent scalarization of intrinsics in out-of-tree versions of the compiler. For more details, see the discussion in https://reviews.llvm.org/D67572.
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LazyCallGraph.cpp8
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp2
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp1
3 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp
index a9dd5e01280..ef31c1e0ba8 100644
--- a/llvm/lib/Analysis/LazyCallGraph.cpp
+++ b/llvm/lib/Analysis/LazyCallGraph.cpp
@@ -15,7 +15,6 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
-#include "llvm/Analysis/VectorUtils.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Function.h"
@@ -147,11 +146,8 @@ LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
static bool isKnownLibFunction(Function &F, TargetLibraryInfo &TLI) {
LibFunc LF;
- // Either this is a normal library function or a "vectorizable"
- // function. Not using the VFDatabase here because this query
- // is related only to libraries handled via the TLI.
- return TLI.getLibFunc(F, LF) ||
- TLI.isKnownVectorFunctionInLibrary(F.getName());
+ // Either this is a normal library function or a "vectorizable" function.
+ return TLI.getLibFunc(F, LF) || TLI.isFunctionVectorizable(F.getName());
}
LazyCallGraph::LazyCallGraph(
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 05f6010c1bd..26fa5112c29 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1845,7 +1845,7 @@ void LoopAccessInfo::analyzeLoop(AliasAnalysis *AA, LoopInfo *LI,
// If the function has an explicit vectorized counterpart, we can safely
// assume that it can be vectorized.
if (Call && !Call->isNoBuiltin() && Call->getCalledFunction() &&
- !VFDatabase::getMappings(*Call).empty())
+ TLI->isFunctionVectorizable(Call->getCalledFunction()->getName()))
continue;
auto *Ld = dyn_cast<LoadInst>(&I);
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index a83dda1fc19..c45ab941a14 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -1174,7 +1174,6 @@ void VFABI::getVectorVariantNames(
for (auto &S : SetVector<StringRef>(ListAttr.begin(), ListAttr.end())) {
#ifndef NDEBUG
- LLVM_DEBUG(dbgs() << "VFABI: adding mapping '" << S << "'\n");
Optional<VFInfo> Info = VFABI::tryDemangleForVFABI(S);
assert(Info.hasValue() && "Invalid name for a VFABI variant.");
assert(CI.getModule()->getFunction(Info.getValue().VectorName) &&
OpenPOWER on IntegriCloud