[PATCH] D105861: [llvm-exegesis] Rework cmake variables around LIBPFM checking.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 10:30:15 PDT 2021


oontvoo updated this revision to Diff 358332.
oontvoo added a comment.

updated code to use <> #include everywhere


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105861

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


Index: llvm/tools/llvm-exegesis/lib/X86/X86Counter.h
===================================================================
--- llvm/tools/llvm-exegesis/lib/X86/X86Counter.h
+++ llvm/tools/llvm-exegesis/lib/X86/X86Counter.h
@@ -15,14 +15,14 @@
 #ifndef LLVM_TOOLS_LLVM_EXEGESIS_LIB_X86_X86COUNTER_H
 #define LLVM_TOOLS_LLVM_EXEGESIS_LIB_X86_X86COUNTER_H
 
-#include "../PerfHelper.h"
-#include "llvm/Support/Error.h"
-
 // FIXME: Use appropriate wrappers for poll.h and mman.h
 // to support Windows and remove this linux-only guard.
 #if defined(__linux__) && defined(HAVE_LIBPFM) &&                              \
     defined(LIBPFM_HAS_FIELD_CYCLES)
 
+#include "../PerfHelper.h"
+#include "llvm/Support/Error.h"
+
 namespace llvm {
 namespace exegesis {
 
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
@@ -16,11 +16,9 @@
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/Errc.h"
 
-#ifdef HAVE_LIBPFM
-#include "perfmon/perf_event.h"
-#include "perfmon/pfmlib.h"
-#include "perfmon/pfmlib_perf_event.h"
-#endif // HAVE_LIBPFM
+#include <perfmon/perf_event.h>
+#include <perfmon/pfmlib.h>
+#include <perfmon/pfmlib_perf_event.h>
 
 #include <atomic>
 #include <chrono>
Index: llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
+++ llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
@@ -12,9 +12,9 @@
 #include "llvm/Support/Error.h"
 #include "llvm/Support/raw_ostream.h"
 #ifdef HAVE_LIBPFM
-#include "perfmon/perf_event.h"
-#include "perfmon/pfmlib.h"
-#include "perfmon/pfmlib_perf_event.h"
+#include <perfmon/perf_event.h>
+#include <perfmon/pfmlib.h>
+#include <perfmon/pfmlib_perf_event.h>
 #endif
 
 #include <cassert>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105861.358332.patch
Type: text/x-patch
Size: 1918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210713/18315e02/attachment.bin>


More information about the llvm-commits mailing list