r327447 - Revert revision 327438.
Gheorghe-Teodor Bercea via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 13 13:50:12 PDT 2018
Author: gbercea
Date: Tue Mar 13 13:50:12 2018
New Revision: 327447
URL: http://llvm.org/viewvc/llvm-project?rev=327447&view=rev
Log:
Revert revision 327438.
Removed:
cfe/trunk/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_20.bc
Modified:
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
cfe/trunk/lib/Driver/ToolChains/Cuda.cpp
cfe/trunk/test/Driver/openmp-offload-gpu.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=327447&r1=327446&r2=327447&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Tue Mar 13 13:50:12 2018
@@ -203,9 +203,6 @@ def err_drv_expecting_fopenmp_with_fopen
def warn_drv_omp_offload_target_duplicate : Warning<
"The OpenMP offloading target '%0' is similar to target '%1' already specified - will be ignored.">,
InGroup<OpenMPTarget>;
-def warn_drv_omp_offload_target_missingbcruntime : Warning<
- "No library '%0' found in the default clang lib directory or in LIBRARY_PATH. Expect degraded performance due to no inlining of runtime functions on target devices.">,
- InGroup<OpenMPTarget>;
def err_drv_bitcode_unsupported_on_toolchain : Error<
"-fembed-bitcode is not supported on versions of iOS prior to 6.0">;
Modified: cfe/trunk/lib/Driver/ToolChains/Cuda.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Cuda.cpp?rev=327447&r1=327446&r2=327447&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Cuda.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Cuda.cpp Tue Mar 13 13:50:12 2018
@@ -581,44 +581,6 @@ void CudaToolChain::addClangTargetOption
CC1Args.push_back("-target-feature");
CC1Args.push_back("+ptx42");
}
-
- if (DeviceOffloadingKind == Action::OFK_OpenMP) {
- SmallVector<StringRef, 8> LibraryPaths;
- // Add path to lib and/or lib64 folders.
- SmallString<256> DefaultLibPath =
- llvm::sys::path::parent_path(getDriver().Dir);
- llvm::sys::path::append(DefaultLibPath,
- Twine("lib") + CLANG_LIBDIR_SUFFIX);
- LibraryPaths.emplace_back(DefaultLibPath.c_str());
-
- // Add user defined library paths from LIBRARY_PATH.
- llvm::Optional<std::string> LibPath =
- llvm::sys::Process::GetEnv("LIBRARY_PATH");
- if (LibPath) {
- SmallVector<StringRef, 8> Frags;
- const char EnvPathSeparatorStr[] = {llvm::sys::EnvPathSeparator, '\0'};
- llvm::SplitString(*LibPath, Frags, EnvPathSeparatorStr);
- for (StringRef Path : Frags)
- LibraryPaths.emplace_back(Path.trim());
- }
-
- std::string LibOmpTargetName =
- "libomptarget-nvptx-" + GpuArch.str() + ".bc";
- bool FoundBCLibrary = false;
- for (StringRef LibraryPath : LibraryPaths) {
- SmallString<128> LibOmpTargetFile(LibraryPath);
- llvm::sys::path::append(LibOmpTargetFile, LibOmpTargetName);
- if (llvm::sys::fs::exists(LibOmpTargetFile)) {
- CC1Args.push_back("-mlink-cuda-bitcode");
- CC1Args.push_back(DriverArgs.MakeArgString(LibOmpTargetFile));
- FoundBCLibrary = true;
- break;
- }
- }
- if (!FoundBCLibrary)
- getDriver().Diag(diag::warn_drv_omp_offload_target_missingbcruntime)
- << LibOmpTargetName;
- }
}
void CudaToolChain::AddCudaIncludeArgs(const ArgList &DriverArgs,
Removed: cfe/trunk/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_20.bc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_20.bc?rev=327446&view=auto
==============================================================================
(empty)
Modified: cfe/trunk/test/Driver/openmp-offload-gpu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/openmp-offload-gpu.c?rev=327447&r1=327446&r2=327447&view=diff
==============================================================================
--- cfe/trunk/test/Driver/openmp-offload-gpu.c (original)
+++ cfe/trunk/test/Driver/openmp-offload-gpu.c Tue Mar 13 13:50:12 2018
@@ -142,23 +142,3 @@
// RUN: | FileCheck -check-prefix=CHK-NOLIBDEVICE %s
// CHK-NOLIBDEVICE-NOT: error:{{.*}}sm_60
-
-/// ###########################################################################
-
-/// Check that the runtime bitcode library is part of the compile line. Create a bogus
-/// bitcode library and add it to the LIBRARY_PATH.
-// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
-// RUN: -Xopenmp-target -march=sm_20 -fopenmp-relocatable-target -save-temps \
-// RUN: -no-canonical-prefixes %s 2>&1 | FileCheck -check-prefix=CHK-BCLIB %s
-
-// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-cuda-bitcode{{.*}}libomptarget-nvptx-sm_20.bc
-
-/// ###########################################################################
-
-/// Check that the warning is thrown when the libomptarget bitcode library is not found.
-/// Libomptarget requires sm_35 or newer so an sm_20 bitcode library should never exist.
-// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
-// RUN: -Xopenmp-target -march=sm_20 -fopenmp-relocatable-target -save-temps \
-// RUN: -no-canonical-prefixes %s 2>&1 | FileCheck -check-prefix=CHK-BCLIB-WARN %s
-
-// CHK-BCLIB-WARN: No library 'libomptarget-nvptx-sm_20.bc' found in the default clang lib directory or in LIBRARY_PATH. Expect degraded performance due to no inlining of runtime functions on target devices.
More information about the cfe-commits
mailing list