[Openmp-commits] [PATCH] D104821: Fix openmp build on arm

Khem Raj via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 23 14:45:07 PDT 2021


raj.khem created this revision.
Herald added subscribers: jfb, guansong, kristof.beyls, yaxunl.
raj.khem requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

include mm_malloc.h for _mm_malloc/_mm_free definitions
define KMP_MFENCE to nothing in else case, since its used
unconditionally in kmp_barrier.cpp


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104821

Files:
  openmp/runtime/src/kmp_barrier.h
  openmp/runtime/src/kmp_os.h


Index: openmp/runtime/src/kmp_os.h
===================================================================
--- openmp/runtime/src/kmp_os.h
+++ openmp/runtime/src/kmp_os.h
@@ -1038,6 +1038,8 @@
     KMP_MFENCE_();                                                             \
   }
 #define KMP_SFENCE() KMP_SFENCE_()
+#else
+#define KMP_MFENCE()
 #endif
 
 #ifndef KMP_IMB
Index: openmp/runtime/src/kmp_barrier.h
===================================================================
--- openmp/runtime/src/kmp_barrier.h
+++ openmp/runtime/src/kmp_barrier.h
@@ -14,6 +14,7 @@
 #define KMP_BARRIER_H
 
 #include "kmp.h"
+#include "mm_malloc.h"
 
 // Use four cache lines: MLC tends to prefetch the next or previous cache line
 // creating a possible fake conflict between cores, so this is the only way to


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104821.354083.patch
Type: text/x-patch
Size: 797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210623/3eda112c/attachment.bin>


More information about the Openmp-commits mailing list