r277167 - Initial vectorization support for svml calls (short vector math library).
Matt Masten via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 29 09:44:25 PDT 2016
Author: mmasten
Date: Fri Jul 29 11:44:24 2016
New Revision: 277167
URL: http://llvm.org/viewvc/llvm-project?rev=277167&view=rev
Log:
Initial vectorization support for svml calls (short vector math library).
Differential Revision: https://reviews.llvm.org/D19544
Modified:
cfe/trunk/include/clang/Frontend/CodeGenOptions.def
cfe/trunk/include/clang/Frontend/CodeGenOptions.h
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=277167&r1=277166&r2=277167&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.def (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def Fri Jul 29 11:44:24 2016
@@ -228,7 +228,7 @@ CODEGENOPT(EmitCodeView, 1, 0)
ENUM_CODEGENOPT(Inlining, InliningMethod, 2, NoInlining)
// Vector functions library to use.
-ENUM_CODEGENOPT(VecLib, VectorLibrary, 1, NoLibrary)
+ENUM_CODEGENOPT(VecLib, VectorLibrary, 2, NoLibrary)
/// The default TLS model to use.
ENUM_CODEGENOPT(DefaultTLSModel, TLSModel, 2, GeneralDynamicTLSModel)
Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=277167&r1=277166&r2=277167&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h Fri Jul 29 11:44:24 2016
@@ -51,8 +51,9 @@ public:
};
enum VectorLibrary {
- NoLibrary, // Don't use any vector library.
- Accelerate // Use the Accelerate framework.
+ NoLibrary, // Don't use any vector library.
+ Accelerate, // Use the Accelerate framework.
+ SVML // Intel short vector math library.
};
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=277167&r1=277166&r2=277167&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Fri Jul 29 11:44:24 2016
@@ -263,6 +263,9 @@ static TargetLibraryInfoImpl *createTLII
case CodeGenOptions::Accelerate:
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::Accelerate);
break;
+ case CodeGenOptions::SVML:
+ TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::SVML);
+ break;
default:
break;
}
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=277167&r1=277166&r2=277167&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Jul 29 11:44:24 2016
@@ -459,6 +459,8 @@ static bool ParseCodeGenArgs(CodeGenOpti
StringRef Name = A->getValue();
if (Name == "Accelerate")
Opts.setVecLib(CodeGenOptions::Accelerate);
+ else if (Name == "SVML")
+ Opts.setVecLib(CodeGenOptions::SVML);
else if (Name == "none")
Opts.setVecLib(CodeGenOptions::NoLibrary);
else
More information about the cfe-commits
mailing list