[PGO] Introduce value profile data closure type.
authorXinliang David Li <davidxl@google.com>
Tue, 24 Nov 2015 19:21:15 +0000 (19:21 +0000)
committerXinliang David Li <davidxl@google.com>
Tue, 24 Nov 2015 19:21:15 +0000 (19:21 +0000)
commite8ec005f39d55b58da0148ac1f718c097433a7b2
tree3a8cba9b7481c9da54111f4964ee64f55777e601
parenta8a4b7cd81d0c92b2205a292032b99be16dc918a
[PGO] Introduce value profile data closure type.

The closure is designed to abstact away two types of value profile
data:
  - InstrProfRecord which is the primary data structure used to
    represent profile data in host tools (reader, writer, and profile-use)
  - value profile runtime data structure suitable to be used by C
    runtime library.
Both sources of data need to serialize to disk/memory-buffer in common
format: ValueProfData.

The abstraction allows compiler-rt's raw profiler writer to share
the same code with indexed profile writer.

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