1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

[PGO] Move Value Profile Kind to InstrProfData.inc

ValueProfKind value affects runtime data structure and
definition is shared between compiler-rt and LLVM.

llvm-svn: 253806
This commit is contained in:
Xinliang David Li 2015-11-22 01:39:07 +00:00
parent b823f0597b
commit 241cfd4800
2 changed files with 20 additions and 4 deletions

View File

@ -169,10 +169,8 @@ inline std::error_code make_error_code(instrprof_error E) {
}
enum InstrProfValueKind : uint32_t {
IPVK_IndirectCallTarget = 0,
IPVK_First = IPVK_IndirectCallTarget,
IPVK_Last = IPVK_IndirectCallTarget
#define VALUE_PROF_KIND(Enumerator, Value) Enumerator = Value,
#include "llvm/ProfileData/InstrProfData.inc"
};
struct InstrProfStringTable {

View File

@ -107,6 +107,24 @@ VALUE_PROF_FUNC_PARAM(uint32_t, CounterIndex, Type::getInt32Ty(Ctx))
#undef INSTR_PROF_COMMA
/* VALUE_PROF_FUNC_PARAM end */
/* VALUE_PROF_KIND start */
#ifndef VALUE_PROF_KIND
#define VALUE_PROF_KIND(Enumerator, Value)
#else
#define INSTR_PROF_DATA_DEFINED
#endif
VALUE_PROF_KIND(IPVK_IndirectCallTarget, 0)
/* These two kinds must be the last to be
* declared. This is to make sure the string
* array created with the template can be
* indexed with the kind value.
*/
VALUE_PROF_KIND(IPVK_First, IPVK_IndirectCallTarget)
VALUE_PROF_KIND(IPVK_Last, IPVK_IndirectCallTarget)
#undef VALUE_PROF_KIND
/* VALUE_PROF_KIND end */
/* COVMAP_FUNC_RECORD start */
/* Definition of member fields of the function record structure in coverage
* map.