[PGO] Make indexed value profile data more compact
authorXinliang David Li <davidxl@google.com>
Tue, 10 Nov 2015 00:24:45 +0000 (00:24 +0000)
committerXinliang David Li <davidxl@google.com>
Tue, 10 Nov 2015 00:24:45 +0000 (00:24 +0000)
commitbcd8e0aae7dc4eea0ff0a425ba164db10c4dcb71
tree510973a5cb84830fc426d54123839c9e231c5841
parenta7f0a0a566a9e7b0e53fa3124381a040db5df743
[PGO] Make indexed value profile data more compact

- Make indexed value profile data more compact by peeling out
  the per-site value count field into its own smaller sized array.
- Introduced formal data structure definitions to specify value
  profile data layout in indexed format. Previously the layout
  of the data is only assumed in the client code (scattered in
  three different places : size computation, EmitData, and ReadData
- The new data structure  serves as a central place for layout documentation.
- Add interfaces to force BE output for value profile data (testing purpose)
- Add byte swap unit tests

Differential Revision: http://reviews.llvm.org/D14401

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