[PATCH] D58526: AMDGPU: Don't emit debugger subtarget features

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 21 12:40:58 PST 2019


arsenm created this revision.
arsenm added reviewers: yaxunl, kzhuravl, t-tye.
Herald added subscribers: jdoerfert, tpr, dstuttard, nhaehnle, wdng, jvesely.

Keep the flag around for compatability.


https://reviews.llvm.org/D58526

Files:
  lib/Driver/ToolChains/AMDGPU.cpp
  test/Driver/amdgpu-features.c


Index: test/Driver/amdgpu-features.c
===================================================================
--- test/Driver/amdgpu-features.c
+++ test/Driver/amdgpu-features.c
@@ -1,10 +1,7 @@
 // RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=0.0 %s -o - 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-0-0 %s
 // CHECK-MAMDGPU-DEBUGGER-ABI-0-0: the clang compiler does not support '-mamdgpu-debugger-abi=0.0'
-
-// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=1.0 %s -o - 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-1-0 %s
-// CHECK-MAMDGPU-DEBUGGER-ABI-1-0: "-target-feature" "+amdgpu-debugger-insert-nops" "-target-feature" "+amdgpu-debugger-emit-prologue"
+// CHECK-MAMDGPU-DEBUGGER-ABI-1-0: the clang compiler does not support '-mamdgpu-debugger-abi=0.0'
 
 // RUN: %clang -### -target amdgcn -mcpu=gfx700 -mcode-object-v3 %s 2>&1 | FileCheck --check-prefix=CODE-OBJECT-V3 %s
 // CODE-OBJECT-V3: "-target-feature" "+code-object-v3"
Index: lib/Driver/ToolChains/AMDGPU.cpp
===================================================================
--- lib/Driver/ToolChains/AMDGPU.cpp
+++ lib/Driver/ToolChains/AMDGPU.cpp
@@ -38,15 +38,8 @@
 void amdgpu::getAMDGPUTargetFeatures(const Driver &D,
                                      const llvm::opt::ArgList &Args,
                                      std::vector<StringRef> &Features) {
-  if (const Arg *dAbi = Args.getLastArg(options::OPT_mamdgpu_debugger_abi)) {
-    StringRef value = dAbi->getValue();
-    if (value == "1.0") {
-      Features.push_back("+amdgpu-debugger-insert-nops");
-      Features.push_back("+amdgpu-debugger-emit-prologue");
-    } else {
-      D.Diag(diag::err_drv_clang_unsupported) << dAbi->getAsString(Args);
-    }
-  }
+  if (const Arg *dAbi = Args.getLastArg(options::OPT_mamdgpu_debugger_abi))
+    D.Diag(diag::err_drv_clang_unsupported) << dAbi->getAsString(Args);
 
   handleTargetFeaturesGroup(
     Args, Features, options::OPT_m_amdgpu_Features_Group);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58526.187845.patch
Type: text/x-patch
Size: 2079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190221/3e44b7e0/attachment.bin>


More information about the cfe-commits mailing list