[PATCH] D59881: Initial support for vectorization using MASSV (IBM MASS vector library)
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 18:55:04 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362571: Initial support for vectorization using MASSV (IBM MASS vector library) (authored by nemanjai, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59881?vs=199822&id=203054#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59881/new/
https://reviews.llvm.org/D59881
Files:
cfe/trunk/include/clang/Basic/CodeGenOptions.h
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/Driver/autocomplete.c
cfe/trunk/test/Driver/fveclib.c
Index: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp
@@ -682,6 +682,8 @@
StringRef Name = A->getValue();
if (Name == "Accelerate")
Opts.setVecLib(CodeGenOptions::Accelerate);
+ else if (Name == "MASSV")
+ Opts.setVecLib(CodeGenOptions::MASSV);
else if (Name == "SVML")
Opts.setVecLib(CodeGenOptions::SVML);
else if (Name == "none")
Index: cfe/trunk/lib/CodeGen/BackendUtil.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp
@@ -340,6 +340,9 @@
case CodeGenOptions::Accelerate:
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::Accelerate);
break;
+ case CodeGenOptions::MASSV:
+ TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::MASSV);
+ break;
case CodeGenOptions::SVML:
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::SVML);
break;
Index: cfe/trunk/include/clang/Driver/Options.td
===================================================================
--- cfe/trunk/include/clang/Driver/Options.td
+++ cfe/trunk/include/clang/Driver/Options.td
@@ -1418,7 +1418,7 @@
Group<f_clang_Group>, Flags<[CC1Option]>,
HelpText<"Disables an experimental new pass manager in LLVM.">;
def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
- HelpText<"Use the given vector functions library">, Values<"Accelerate,SVML,none">;
+ HelpText<"Use the given vector functions library">, Values<"Accelerate,MASSV,SVML,none">;
def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>;
def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>,
Index: cfe/trunk/include/clang/Basic/CodeGenOptions.h
===================================================================
--- cfe/trunk/include/clang/Basic/CodeGenOptions.h
+++ cfe/trunk/include/clang/Basic/CodeGenOptions.h
@@ -53,6 +53,7 @@
enum VectorLibrary {
NoLibrary, // Don't use any vector library.
Accelerate, // Use the Accelerate framework.
+ MASSV, // IBM MASS vector library.
SVML // Intel short vector math library.
};
Index: cfe/trunk/test/Driver/autocomplete.c
===================================================================
--- cfe/trunk/test/Driver/autocomplete.c
+++ cfe/trunk/test/Driver/autocomplete.c
@@ -68,6 +68,7 @@
// FLTOALL-NEXT: thin
// RUN: %clang --autocomplete=-fveclib= | FileCheck %s -check-prefix=FVECLIBALL
// FVECLIBALL: Accelerate
+// FVECLIBALL-NEXT: MASSV
// FVECLIBALL-NEXT: none
// FVECLIBALL-NEXT: SVML
// RUN: %clang --autocomplete=-fshow-overloads= | FileCheck %s -check-prefix=FSOVERALL
Index: cfe/trunk/test/Driver/fveclib.c
===================================================================
--- cfe/trunk/test/Driver/fveclib.c
+++ cfe/trunk/test/Driver/fveclib.c
@@ -1,9 +1,11 @@
// RUN: %clang -### -c -fveclib=none %s 2>&1 | FileCheck -check-prefix CHECK-NOLIB %s
// RUN: %clang -### -c -fveclib=Accelerate %s 2>&1 | FileCheck -check-prefix CHECK-ACCELERATE %s
+// RUN: %clang -### -c -fveclib=MASSV %s 2>&1 | FileCheck -check-prefix CHECK-MASSV %s
// RUN: not %clang -c -fveclib=something %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s
// CHECK-NOLIB: "-fveclib=none"
// CHECK-ACCELERATE: "-fveclib=Accelerate"
+// CHECK-MASSV: "-fveclib=MASSV"
// CHECK-INVALID: error: invalid value 'something' in '-fveclib=something'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59881.203054.patch
Type: text/x-patch
Size: 3798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190605/28c68c51/attachment.bin>
More information about the llvm-commits
mailing list