[PATCH] D21790: [Clang][Feature] Adding CLFLUSHOPT feature to clang

michael zuckerman via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 28 05:28:24 PDT 2016


m_zuckerman created this revision.
m_zuckerman added reviewers: AsafBadouh, igorb, delena.
m_zuckerman added a subscriber: cfe-commits.

http://reviews.llvm.org/D21790

Files:
  include/clang/Basic/BuiltinsX86.def
  lib/Headers/CMakeLists.txt
  lib/Headers/immintrin.h

Index: lib/Headers/immintrin.h
===================================================================
--- lib/Headers/immintrin.h
+++ lib/Headers/immintrin.h
@@ -54,6 +54,10 @@
 #include <wmmintrin.h>
 #endif
 
+#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLFLUSHOPT__)
+#include <clflushoptintrin.h>
+#endif
+
 #if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX__)
 #include <avxintrin.h>
 #endif
Index: lib/Headers/CMakeLists.txt
===================================================================
--- lib/Headers/CMakeLists.txt
+++ lib/Headers/CMakeLists.txt
@@ -27,6 +27,7 @@
   __clang_cuda_runtime_wrapper.h
   cpuid.h
   cuda_builtin_vars.h
+  clflushoptintrin.h
   emmintrin.h
   f16cintrin.h
   float.h
Index: include/clang/Basic/BuiltinsX86.def
===================================================================
--- include/clang/Basic/BuiltinsX86.def
+++ include/clang/Basic/BuiltinsX86.def
@@ -652,6 +652,9 @@
 TARGET_BUILTIN(__builtin_ia32_xsaves, "vv*ULLi", "", "xsaves")
 TARGET_BUILTIN(__builtin_ia32_xsaves64, "vv*ULLi", "", "xsaves")
 
+//CLFLUSHOPT
+TARGET_BUILTIN(__builtin_ia32_clflushopt, "vc*", "", "clflushopt")
+
 // ADX
 TARGET_BUILTIN(__builtin_ia32_addcarryx_u32, "UcUcUiUiUi*", "", "adx")
 TARGET_BUILTIN(__builtin_ia32_addcarryx_u64, "UcUcULLiULLiULLi*", "", "adx")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21790.62081.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160628/663bc301/attachment.bin>


More information about the cfe-commits mailing list