[PATCH] D86820: [X86] Add a /tune: option for clang-cl

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 20:28:05 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGca134374b74e: [X86] Add a /tune: option for clang-cl (authored by craig.topper).
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

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
@@ -4696,6 +4696,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.289628.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200903/fec5f2c2/attachment.bin>


More information about the cfe-commits mailing list