[Openmp-commits] [openmp] b840d3a - [OpenMP][host runtime] small fixup of RTM CPUID bit check

via Openmp-commits openmp-commits at lists.llvm.org
Thu Oct 14 14:50:16 PDT 2021


Author: Peyton, Jonathan L
Date: 2021-10-14T16:49:42-05:00
New Revision: b840d3ab0d8a1953fe7d39a87970260088b9ac41

URL: https://github.com/llvm/llvm-project/commit/b840d3ab0d8a1953fe7d39a87970260088b9ac41
DIFF: https://github.com/llvm/llvm-project/commit/b840d3ab0d8a1953fe7d39a87970260088b9ac41.diff

LOG: [OpenMP][host runtime] small fixup of RTM CPUID bit check

Added: 
    

Modified: 
    openmp/runtime/src/kmp_utility.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_utility.cpp b/openmp/runtime/src/kmp_utility.cpp
index bf3e6114e0c2..8118548c162c 100644
--- a/openmp/runtime/src/kmp_utility.cpp
+++ b/openmp/runtime/src/kmp_utility.cpp
@@ -247,15 +247,15 @@ void __kmp_query_cpuid(kmp_cpuinfo_t *p) {
                 i, buf.eax, buf.ebx, buf.ecx, buf.edx));
     }
 #endif
-#if KMP_USE_ADAPTIVE_LOCKS
     p->flags.rtm = 0;
     if (max_arg > 7) {
       /* RTM bit CPUID.07:EBX, bit 11 */
       __kmp_x86_cpuid(7, 0, &buf);
       p->flags.rtm = (buf.ebx >> 11) & 1;
-      KA_TRACE(trace_level, (" RTM"));
+      if (p->flags.rtm) {
+        KA_TRACE(trace_level, (" RTM"));
+      }
     }
-#endif
   }
 
   { // Parse CPU brand string for frequency, saving the string for later.


        


More information about the Openmp-commits mailing list