[PATCH] [PPC64LE] Add -m[no-]optimize-swaps option
Bill Schmidt
wschmidt at linux.vnet.ibm.com
Mon Mar 30 12:19:31 PDT 2015
Hi hfinkel, kbarton, nemanjai, seurer,
This patch adds a new switch (-m[no-]optimize-swaps) that sets the optimize-swaps feature attribute for the back end. The code controlled by this switch is under review at http://reviews.llvm.org/D8565.
http://reviews.llvm.org/D8706
Files:
include/clang/Driver/Options.td
test/Driver/ppc-features.cpp
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -1280,6 +1280,10 @@
def mno_qpx : Flag<["-"], "mno-qpx">, Group<m_ppc_Features_Group>;
def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>;
def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>;
+def moptimize_swaps : Flag<["-"], "moptimize-swaps">,
+ Group<m_ppc_Features_Group>;
+def mno_optimize_swaps : Flag<["-"], "mno-optimize-swaps">,
+ Group<m_ppc_Features_Group>;
def minvariant_function_descriptors :
Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>;
def mno_invariant_function_descriptors :
Index: test/Driver/ppc-features.cpp
===================================================================
--- test/Driver/ppc-features.cpp
+++ test/Driver/ppc-features.cpp
@@ -107,6 +107,12 @@
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power8-vector -mpower8-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-P8VECTOR %s
// CHECK-P8VECTOR: "-target-feature" "+power8-vector"
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-optimize-swaps -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOOPTSWAPS %s
+// CHECK-NOOPTSWAPS: "-target-feature" "-optimize-swaps"
+
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-optimize-swaps -moptimize-swaps -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-OPTSWAPS %s
+// CHECK-OPTSWAPS: "-target-feature" "+optimize-swaps"
+
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
// CHECK-NOCRBITS: "-target-feature" "-crbits"
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8706.22896.patch
Type: text/x-patch
Size: 1786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150330/6418cfe8/attachment.bin>
More information about the cfe-commits
mailing list