[llvm-branch-commits] [clang] 572c7f6 - Revert "[OPENMP]Do not use RTTI by default for NVPTX devices."

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 17 01:33:37 PST 2020


Author: Alexey Bataev
Date: 2020-01-17T10:29:26+01:00
New Revision: 572c7f6fe7b55ce5f7591fb7a445dea27329074a

URL: https://github.com/llvm/llvm-project/commit/572c7f6fe7b55ce5f7591fb7a445dea27329074a
DIFF: https://github.com/llvm/llvm-project/commit/572c7f6fe7b55ce5f7591fb7a445dea27329074a.diff

LOG: Revert "[OPENMP]Do not use RTTI by default for NVPTX devices."

This reverts commit 23058f9dd4d7e18239fd63b6da52549514b45fda. It breaks
builds of cuda code somehow in some cases.

(cherry picked from commit 6b29aa21180cf14bfb619d38fc4826913cabfb66)

Added: 
    

Modified: 
    clang/lib/Driver/ToolChain.cpp

Removed: 
    clang/test/Driver/openmp-offload-gpu.cpp


################################################################################
diff  --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 3ebbd30195b3..cab97b1a601a 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -68,8 +68,7 @@ static ToolChain::RTTIMode CalculateRTTIMode(const ArgList &Args,
   }
 
   // -frtti is default, except for the PS4 CPU.
-  return (Triple.isPS4CPU() || Triple.isNVPTX()) ? ToolChain::RM_Disabled
-                                                 : ToolChain::RM_Enabled;
+  return (Triple.isPS4CPU()) ? ToolChain::RM_Disabled : ToolChain::RM_Enabled;
 }
 
 ToolChain::ToolChain(const Driver &D, const llvm::Triple &T,

diff  --git a/clang/test/Driver/openmp-offload-gpu.cpp b/clang/test/Driver/openmp-offload-gpu.cpp
deleted file mode 100644
index 9da7308506ae..000000000000
--- a/clang/test/Driver/openmp-offload-gpu.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-///
-/// Perform several driver tests for OpenMP offloading
-///
-
-// REQUIRES: clang-driver
-// REQUIRES: x86-registered-target
-// REQUIRES: powerpc-registered-target
-// REQUIRES: nvptx-registered-target
-
-/// ###########################################################################
-
-/// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP
-/// Check that the flag is passed when -fopenmp-relocatable-target is used.
-// RUN:   %clangxx -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
-// RUN:          -save-temps -no-canonical-prefixes %s -x c++ -c 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHK-RTTI %s
-
-// CHK-RTTI: clang{{.*}}" "-triple" "nvptx64-nvidia-cuda"
-// CHK-RTTI-SAME: "-fno-rtti"
-


        


More information about the llvm-branch-commits mailing list