[PATCH] D86820: [X86] Add a /tune: option for clang-cl
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 13:30:23 PDT 2020
craig.topper updated this revision to Diff 289273.
craig.topper added a comment.
Use an alias.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86820/new/
https://reviews.llvm.org/D86820
Files:
clang/include/clang/Driver/Options.td
clang/test/Driver/cl-x86-flags.c
Index: clang/test/Driver/cl-x86-flags.c
===================================================================
--- clang/test/Driver/cl-x86-flags.c
+++ clang/test/Driver/cl-x86-flags.c
@@ -128,5 +128,9 @@
// RUN: %clang_cl -m64 -arch:avx512 --target=i386-pc-windows -### -- 2>&1 %s | FileCheck -check-prefix=avx51264 %s
// avx51264: argument unused during compilation
+// RUN: %clang_cl -m64 -arch:AVX -tune:haswell --target=x86_64-pc-windows -### -- 2>&1 %s | FileCheck -check-prefix=tune %s
+// tune: "-target-cpu" "sandybridge"
+// tune-SAME: "-tune-cpu" "haswell"
+
void f() {
}
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -4685,6 +4685,9 @@
def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
HelpText<"Enable OpenMP support with experimental SIMD support">,
Alias<fopenmp>;
+def _SLASH_tune : CLCompileJoined<"tune:">,
+ HelpText<"Set CPU for optimization without affecting instruction set">,
+ Alias<mtune_EQ>;
// Non-aliases:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86820.289273.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200901/3aaf7060/attachment.bin>
More information about the cfe-commits
mailing list