r317917 - AMDGPU: Add -mxnack/-mno-xnack options that set +/-xnack feature
Konstantin Zhuravlyov via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 10 11:28:25 PST 2017
Author: kzhuravl
Date: Fri Nov 10 11:28:25 2017
New Revision: 317917
URL: http://llvm.org/viewvc/llvm-project?rev=317917&view=rev
Log:
AMDGPU: Add -mxnack/-mno-xnack options that set +/-xnack feature
Differential Revision: https://reviews.llvm.org/D39878
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/amdgpu-features.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=317917&r1=317916&r2=317917&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Nov 10 11:28:25 2017
@@ -1822,7 +1822,6 @@ def mno_neg_immediates: Flag<["-"], "mno
def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>,
HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">;
-
def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">,
Group<m_aarch64_Features_Group>,
HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">;
@@ -1840,6 +1839,10 @@ def mamdgpu_debugger_abi : Joined<["-"],
Group<m_Group>,
HelpText<"Generate additional code for specified <version> of debugger ABI (AMDGPU only)">,
MetaVarName<"<version>">;
+def mxnack : Flag<["-"], "mxnack">, Group<m_amdgpu_Features_Group>,
+ HelpText<"Enable XNACK (AMDGPU only)">;
+def mno_xnack : Flag<["-"], "mno-xnack">, Group<m_amdgpu_Features_Group>,
+ HelpText<"Disable XNACK (AMDGPU only)">;
def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[DriverOption]>;
def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[DriverOption]>;
Modified: cfe/trunk/test/Driver/amdgpu-features.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/amdgpu-features.c?rev=317917&r1=317916&r2=317917&view=diff
==============================================================================
--- cfe/trunk/test/Driver/amdgpu-features.c (original)
+++ cfe/trunk/test/Driver/amdgpu-features.c Fri Nov 10 11:28:25 2017
@@ -5,3 +5,9 @@
// 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-reserve-regs" "-target-feature" "+amdgpu-debugger-emit-prologue"
+
+// RUN: %clang -### -target amdgcn -mcpu=gfx700 -mxnack %s 2>&1 | FileCheck --check-prefix=XNACK %s
+// XNACK: "-target-feature" "+xnack"
+
+// RUN: %clang -### -target amdgcn -mcpu=gfx700 -mno-xnack %s 2>&1 | FileCheck --check-prefix=NO-XNACK %s
+// NO-XNACK: "-target-feature" "-xnack"
More information about the cfe-commits
mailing list