]> granicus.if.org Git - clang/commitdiff
Partial revert of r353952: [HIP] Handle compile -m options and propagate into LLC
authorYaxun Liu <Yaxun.Liu@amd.com>
Thu, 28 Feb 2019 17:08:26 +0000 (17:08 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Thu, 28 Feb 2019 17:08:26 +0000 (17:08 +0000)
Remove comments and tests about passing -mcode-object-v3 to driver since it does
not work. Other -m options are OK.

Also put back -mattr=-code-object-v3 since HIP is still not ready for code object
v3.

Differential Revision: https://reviews.llvm.org/D57977

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355106 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/HIP.cpp
test/Driver/hip-toolchain-features.hip

index e0810de9cdca2af5c8ac834d79ca4a74d043e2fa..10be27c354ebcd7fe24b9ae9a84affeef95d5b60 100644 (file)
@@ -159,7 +159,7 @@ const char *AMDGCN::Linker::constructLlcCommand(
     llvm::StringRef OutputFilePrefix, const char *InputFileName) const {
   // Construct llc command.
   ArgStringList LlcArgs{InputFileName, "-mtriple=amdgcn-amd-amdhsa",
-                        "-filetype=obj",
+                        "-filetype=obj", "-mattr=-code-object-v3",
                         Args.MakeArgString("-mcpu=" + SubArchName)};
 
   // Extract all the -m options
@@ -167,7 +167,7 @@ const char *AMDGCN::Linker::constructLlcCommand(
   handleTargetFeaturesGroup(
     Args, Features, options::OPT_m_amdgpu_Features_Group);
 
-  // Add features to mattr such as code-object-v3 and xnack
+  // Add features to mattr such as xnack
   std::string MAttrString = "-mattr=";
   for(auto OneFeature : Features) {
     MAttrString.append(Args.MakeArgString(OneFeature));
index 27dc1fe4a970159a982a0d00c63e73014f208689..0fe94015ef1ec8bfde883b6412bf4c55e6998981 100644 (file)
@@ -2,17 +2,6 @@
 // REQUIRES: x86-registered-target
 // REQUIRES: amdgpu-registered-target
 
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN:   -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN:   -mcode-object-v3 2>&1 | FileCheck %s -check-prefix=COV3
-// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
-// RUN:   -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN:   -mno-code-object-v3 2>&1 | FileCheck %s -check-prefix=NOCOV3
-
-// COV3: {{.*}}clang{{.*}}"-target-feature" "+code-object-v3"
-// NOCOV3: {{.*}}clang{{.*}}"-target-feature" "-code-object-v3"
-
-
 // RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
 // RUN:   -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
 // RUN:   -mxnack 2>&1 | FileCheck %s -check-prefix=XNACK
 
 // RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
 // RUN:   -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN:   -mcode-object-v3 -mxnack -msram-ecc \
+// RUN:   -mxnack -msram-ecc \
 // RUN:   2>&1 | FileCheck %s -check-prefix=ALL3
 // RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \
 // RUN:   -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
-// RUN:   -mno-code-object-v3 -mno-xnack -mno-sram-ecc \
+// RUN:   -mno-xnack -mno-sram-ecc \
 // RUN:   2>&1 | FileCheck %s -check-prefix=NOALL3
 
-// ALL3: {{.*}}clang{{.*}}"-target-feature" "+code-object-v3" "-target-feature" "+xnack" "-target-feature" "+sram-ecc"
-// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-code-object-v3" "-target-feature" "-xnack" "-target-feature" "-sram-ecc"
+// ALL3: {{.*}}clang{{.*}}"-target-feature" "+xnack" "-target-feature" "+sram-ecc"
+// NOALL3: {{.*}}clang{{.*}}"-target-feature" "-xnack" "-target-feature" "-sram-ecc"