summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-11-23 05:29:51 +0000
committerXinliang David Li <davidxl@google.com>2015-11-23 05:29:51 +0000
commit67501ca1b95213d0ef46f4d8e24073d70e16a7bc (patch)
treecc554a934062d026c501cdb4d210f9782736f63f
parentab94e71dc6ee7a1a0143f2313c4426ca83546ec5 (diff)
downloadbcm5719-llvm-67501ca1b95213d0ef46f4d8e24073d70e16a7bc.tar.gz
bcm5719-llvm-67501ca1b95213d0ef46f4d8e24073d70e16a7bc.zip
Move two Value Profiler data structs to InstrProfData.inc (NFC)
llvm-svn: 253848
-rw-r--r--llvm/include/llvm/ProfileData/InstrProf.h7
-rw-r--r--llvm/include/llvm/ProfileData/InstrProfData.inc19
2 files changed, 19 insertions, 7 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index ec081664924..cc49452eb87 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -199,13 +199,6 @@ struct InstrProfStringTable {
}
};
-struct InstrProfValueData {
- // Profiled value.
- uint64_t Value;
- // Number of times the value appears in the training run.
- uint64_t Count;
-};
-
struct InstrProfValueSiteRecord {
/// Value profiling data pairs at a given value site.
std::list<InstrProfValueData> ValueData;
diff --git a/llvm/include/llvm/ProfileData/InstrProfData.inc b/llvm/include/llvm/ProfileData/InstrProfData.inc
index 63447ce8ca7..a51071123d7 100644
--- a/llvm/include/llvm/ProfileData/InstrProfData.inc
+++ b/llvm/include/llvm/ProfileData/InstrProfData.inc
@@ -230,6 +230,25 @@ COVMAP_FUNC_RECORD(const uint64_t, llvm::Type::getInt64Ty(Ctx), FuncHash, \
#define INSTR_PROF_VALUE_PROF_FUNC_STR \
INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_FUNC)
+/* The data structure that represents a tracked value by the
+ * value profiler.
+ */
+typedef struct InstrProfValueData {
+ // Profiled value.
+ uint64_t Value;
+ // Number of times the value appears in the training run.
+ uint64_t Count;
+} InstrProfValueData;
+
+/* This is an internal data structure used by value profiler. It
+ * is defined here to allow serialization code sharing by LLVM
+ * to be used in unit test.
+ */
+typedef struct ValueProfNode {
+ InstrProfValueData VData;
+ struct ValueProfNode *Next;
+} ValueProfNode;
+
#endif /* INSTR_PROF_DATA_INC_ */
#else
OpenPOWER on IntegriCloud