[PATCH] D105615: [llvm-exegesis] Fix compilation with old libpfm versions.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 11 22:54:51 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG04f8ffd98306: [llvm-exegesis] Fix compilation with old libpfm versions. (authored by courbet).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105615/new/

https://reviews.llvm.org/D105615

Files:
  llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp


Index: llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp
+++ llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp
@@ -8,6 +8,8 @@
 
 #include "X86Counter.h"
 
+#if defined(HAVE_LIBPFM) && defined(LIBPFM_HAS_FIELD_CYCLES)
+
 // FIXME: Use appropriate wrappers for poll.h and mman.h
 // to support Windows and remove this linux-only guard.
 #ifdef __linux__
@@ -32,7 +34,6 @@
 #include <sys/mman.h>
 #include <unistd.h>
 
-#if defined(HAVE_LIBPFM) && defined(LIBPFM_HAS_FIELD_CYCLES)
 namespace llvm {
 namespace exegesis {
 
@@ -178,6 +179,7 @@
   }
 
   counter.stop();
+  (void)Sum;
 
   auto ResultOrError = counter.doReadCounter(nullptr, nullptr);
   if (ResultOrError)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105615.357840.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210712/8a9c82a3/attachment-0001.bin>


More information about the llvm-commits mailing list