[PGO] Implement ValueProfiling Closure interfaces for runtime value profile data
authorXinliang David Li <davidxl@google.com>
Wed, 25 Nov 2015 23:31:18 +0000 (23:31 +0000)
committerXinliang David Li <davidxl@google.com>
Wed, 25 Nov 2015 23:31:18 +0000 (23:31 +0000)
commit931217997cd3c9696284e73cace5b3a761147b36
tree169228a5e9c51c4fba884616011c5391a204f6a3
parent5062813b46e69c0ee735e6fefaa05f2c466e524f
[PGO] Implement ValueProfiling Closure interfaces for runtime value profile data

This is one of the many steps to commonize value profiling support between profile
runtime and compiler/llvm tools.

After this change, profiler runtime now can share the same C APIs to do VP
serialization/deseriazation with LLVM host tools (and produces value data
in identical format between indexed and raw profile).

It is not yet enabled in profiler runtime yet.

Also added a unit test case to test runtime profile data serialization/deserialization
interfaces implemented using common closure code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254110 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/InstrProf.h
lib/ProfileData/InstrProf.cpp
unittests/ProfileData/InstrProfTest.cpp