[PGO] Move CFGMST.h into the include directory
authorChristian Ulmann <christian.ulmann@nextsilicon.com>
Thu, 27 Apr 2023 14:06:26 +0000 (14:06 +0000)
committerChristian Ulmann <christian.ulmann@nextsilicon.com>
Thu, 27 Apr 2023 14:11:04 +0000 (14:11 +0000)
This commit moves the CFGMST.h file into the include directory. The
implemented algorithm is can be helpful for downstream projects that
want to use the PGO data in a non-standard way.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D149336

llvm/include/llvm/Transforms/Instrumentation/CFGMST.h [moved from llvm/lib/Transforms/Instrumentation/CFGMST.h with 98% similarity]
llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp

@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIB_TRANSFORMS_INSTRUMENTATION_CFGMST_H
-#define LLVM_LIB_TRANSFORMS_INSTRUMENTATION_CFGMST_H
+#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_CFGMST_H
+#define LLVM_TRANSFORMS_INSTRUMENTATION_CFGMST_H
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/STLExtras.h"
@@ -300,4 +300,4 @@ public:
 
 #undef DEBUG_TYPE // "cfgmst"
 
-#endif // LLVM_LIB_TRANSFORMS_INSTRUMENTATION_CFGMST_H
+#endif // LLVM_TRANSFORMS_INSTRUMENTATION_CFGMST_H
index 332dd2e..acb9e8e 100644 (file)
@@ -13,7 +13,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "CFGMST.h"
 #include "llvm/ADT/Hashing.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/STLExtras.h"
@@ -38,6 +37,7 @@
 #include "llvm/Support/Regex.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Instrumentation.h"
+#include "llvm/Transforms/Instrumentation/CFGMST.h"
 #include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
 #include "llvm/Transforms/Utils/ModuleUtils.h"
 #include <algorithm>
index 673cc0c..34fb5ed 100644 (file)
@@ -48,7 +48,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
-#include "CFGMST.h"
 #include "ValueProfileCollector.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/TargetParser/Triple.h"
 #include "llvm/Transforms/Instrumentation.h"
 #include "llvm/Transforms/Instrumentation/BlockCoverageInference.h"
+#include "llvm/Transforms/Instrumentation/CFGMST.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/Transforms/Utils/MisExpect.h"
 #include "llvm/Transforms/Utils/ModuleUtils.h"