r332383 - [Hexagon] Add driver options for subtarget features
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Tue May 15 11:15:59 PDT 2018
Author: kparzysz
Date: Tue May 15 11:15:59 2018
New Revision: 332383
URL: http://llvm.org/viewvc/llvm-project?rev=332383&view=rev
Log:
[Hexagon] Add driver options for subtarget features
Added:
cfe/trunk/test/Driver/hexagon-memops.c
cfe/trunk/test/Driver/hexagon-nvj.c
cfe/trunk/test/Driver/hexagon-nvs.c
Modified:
cfe/trunk/include/clang/Driver/Options.td
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=332383&r1=332382&r2=332383&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue May 15 11:15:59 2018
@@ -2562,23 +2562,35 @@ def mv62 : Flag<["-"], "mv62">, Group<m_
Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>;
def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>,
Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>;
-def mhexagon_hvx : Flag<[ "-" ], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
+def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
HelpText<"Enable Hexagon Vector eXtensions">;
-def mhexagon_hvx_EQ : Joined<[ "-" ], "mhvx=">,
+def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
Group<m_hexagon_Features_HVX_Group>,
HelpText<"Enable Hexagon Vector eXtensions">;
-def mno_hexagon_hvx : Flag<[ "-" ], "mno-hvx">,
+def mno_hexagon_hvx : Flag<["-"], "mno-hvx">,
Group<m_hexagon_Features_HVX_Group>,
HelpText<"Disable Hexagon Vector eXtensions">;
-def mhexagon_hvx_length_EQ : Joined<[ "-" ], "mhvx-length=">,
+def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">,
Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">,
Values<"64B,128B">;
def ffixed_r19: Flag<["-"], "ffixed-r19">,
- HelpText<"Reserve the r19 register (Hexagon only)">;
+ HelpText<"Reserve register r19 (Hexagon only)">;
+def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>,
+ Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">;
+def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>,
+ Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">;
def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>,
Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">;
def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>,
Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">;
+def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>,
+ Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">;
+def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>,
+ Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">;
+def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>,
+ Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
+def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>,
+ Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
// X86 feature flags
Added: cfe/trunk/test/Driver/hexagon-memops.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-memops.c?rev=332383&view=auto
==============================================================================
--- cfe/trunk/test/Driver/hexagon-memops.c (added)
+++ cfe/trunk/test/Driver/hexagon-memops.c Tue May 15 11:15:59 2018
@@ -0,0 +1,10 @@
+// RUN: %clang -target hexagon -### -mmemops %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-MEMOPS
+
+// RUN: %clang -target hexagon -### -mno-memops %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NO-MEMOPS
+
+// CHECK-MEMOPS: "-target-feature" "+memops"
+
+// CHECK-NO-MEMOPS: "-target-feature" "-memops"
+
Added: cfe/trunk/test/Driver/hexagon-nvj.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-nvj.c?rev=332383&view=auto
==============================================================================
--- cfe/trunk/test/Driver/hexagon-nvj.c (added)
+++ cfe/trunk/test/Driver/hexagon-nvj.c Tue May 15 11:15:59 2018
@@ -0,0 +1,10 @@
+// RUN: %clang -target hexagon -### -mnvj %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NVJ
+
+// RUN: %clang -target hexagon -### -mno-nvj %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NO-NVJ
+
+// CHECK-NVJ: "-target-feature" "+nvj"
+
+// CHECK-NO-NVJ: "-target-feature" "-nvj"
+
Added: cfe/trunk/test/Driver/hexagon-nvs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-nvs.c?rev=332383&view=auto
==============================================================================
--- cfe/trunk/test/Driver/hexagon-nvs.c (added)
+++ cfe/trunk/test/Driver/hexagon-nvs.c Tue May 15 11:15:59 2018
@@ -0,0 +1,10 @@
+// RUN: %clang -target hexagon -### -mnvs %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NVS
+
+// RUN: %clang -target hexagon -### -mno-nvs %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NO-NVS
+
+// CHECK-NVS: "-target-feature" "+nvs"
+
+// CHECK-NO-NVS: "-target-feature" "-nvs"
+
More information about the cfe-commits
mailing list