From 9c157b23d475556eede3132c0513913ed93a131e Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Mon, 23 Nov 2015 05:29:51 +0000 Subject: [PATCH] Move two Value Profiler data structs to InstrProfData.inc (NFC) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253848 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ProfileData/InstrProf.h | 7 ------- include/llvm/ProfileData/InstrProfData.inc | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/llvm/ProfileData/InstrProf.h b/include/llvm/ProfileData/InstrProf.h index ec081664924..cc49452eb87 100644 --- a/include/llvm/ProfileData/InstrProf.h +++ b/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 ValueData; diff --git a/include/llvm/ProfileData/InstrProfData.inc b/include/llvm/ProfileData/InstrProfData.inc index 63447ce8ca7..a51071123d7 100644 --- a/include/llvm/ProfileData/InstrProfData.inc +++ b/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 -- 2.34.1