diff options
| -rw-r--r-- | clang/include/clang/Frontend/CodeGenOptions.def | 2 | ||||
| -rw-r--r-- | clang/include/clang/Frontend/CodeGenOptions.h | 5 | ||||
| -rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 | 
4 files changed, 9 insertions, 3 deletions
diff --git a/clang/include/clang/Frontend/CodeGenOptions.def b/clang/include/clang/Frontend/CodeGenOptions.def index bc2bde836df..5895bebc9c5 100644 --- a/clang/include/clang/Frontend/CodeGenOptions.def +++ b/clang/include/clang/Frontend/CodeGenOptions.def @@ -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) diff --git a/clang/include/clang/Frontend/CodeGenOptions.h b/clang/include/clang/Frontend/CodeGenOptions.h index f2849376d15..0bdc1ef9bd1 100644 --- a/clang/include/clang/Frontend/CodeGenOptions.h +++ b/clang/include/clang/Frontend/CodeGenOptions.h @@ -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.    }; diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index e5d49303fbd..ca7aec0ba81 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -263,6 +263,9 @@ static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple,    case CodeGenOptions::Accelerate:      TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::Accelerate);      break; +  case CodeGenOptions::SVML: +    TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::SVML); +    break;    default:      break;    } diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 386e5773f90..54ec1a5a38b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -459,6 +459,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,      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  | 

