Skip to content

Commit b12b396

Browse files
authored
Merge pull request #32 from vjayathirtha-nv/release_60
Move PGMATH vectorization changes under FLANG_LLVM_EXTENIONS ifdef
2 parents 32f15e1 + 4fda548 commit b12b396

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

include/clang/Frontend/CodeGenOptions.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ class CodeGenOptions : public CodeGenOptionsBase {
5252
enum VectorLibrary {
5353
NoLibrary, // Don't use any vector library.
5454
Accelerate, // Use the Accelerate framework.
55-
SVML, // Intel short vector math library.
56-
PGMATH // PGI math library.
55+
#ifdef FLANG_LLVM_EXTENSIONS
56+
PGMATH, // PGI math library.
57+
#endif
58+
SVML // Intel short vector math library.
5759
};
5860

5961

lib/CodeGen/BackendUtil.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,11 @@ static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple,
314314
case CodeGenOptions::SVML:
315315
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::SVML);
316316
break;
317+
#ifdef FLANG_LLVM_EXTENSIONS
317318
case CodeGenOptions::PGMATH:
318319
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::PGMATH);
319320
break;
321+
#endif
320322
default:
321323
break;
322324
}

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
486486
Opts.setVecLib(CodeGenOptions::Accelerate);
487487
else if (Name == "SVML")
488488
Opts.setVecLib(CodeGenOptions::SVML);
489+
#ifdef FLANG_LLVM_EXTENSIONS
489490
else if (Name == "PGMATH")
490491
Opts.setVecLib(CodeGenOptions::PGMATH);
492+
#endif
491493
else if (Name == "none")
492494
Opts.setVecLib(CodeGenOptions::NoLibrary);
493495
else

0 commit comments

Comments
 (0)