From 19f73f0d1b8d4f4a7b7451fea33a35015fe0942d Mon Sep 17 00:00:00 2001 From: Francesco Petrogalli Date: Fri, 13 Dec 2019 19:15:29 +0000 Subject: 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. --- llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp') diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp index 0072a7db94e..3f943f4c068 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp @@ -670,7 +670,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() { if (CI && !getVectorIntrinsicIDForCall(CI, TLI) && !isa(CI) && !(CI->getCalledFunction() && TLI && - !VFDatabase::getMappings(*CI).empty())) { + TLI->isFunctionVectorizable(CI->getCalledFunction()->getName()))) { // If the call is a recognized math libary call, it is likely that // we can vectorize it given loosened floating-point constraints. LibFunc Func; @@ -685,8 +685,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() { // but it's hard to provide meaningful yet generic advice. // Also, should this be guarded by allowExtraAnalysis() and/or be part // of the returned info from isFunctionVectorizable()? - reportVectorizationFailure( - "Found a non-intrinsic callsite", + reportVectorizationFailure("Found a non-intrinsic callsite", "library call cannot be vectorized. " "Try compiling with -fno-math-errno, -ffast-math, " "or similar flags", -- cgit v1.2.3