Recommit [SampleFDO] Add flag for partial profile.
authorWei Mi <wmi@google.com>
Fri, 3 Apr 2020 18:57:36 +0000 (11:57 -0700)
committerWei Mi <wmi@google.com>
Tue, 7 Apr 2020 21:28:25 +0000 (14:28 -0700)
commitb49eac71ad76cd8ee3771745ff591ee8771eab1b
tree8c340a0893aed56338627d4b52e3428bf72727c6
parent96e51ed005a960d1c746a0a7774ce255bb497ed5
Recommit [SampleFDO] Add flag for partial profile.

Fix the error of show-prof-info.test on some platforms without zlib.

The common profile usage is to collect profile from a target and then use the profile to guide the optimized build for the same target. There are some cases that no profile can be collected for a target. In those cases, although no full profile is available, it is possible to have some partial profile collected from other targets to optimize common libraries and utilities. A flag is needed to tell the partial profile from the full profile apart, so compiler can use different strategy for them.

Differential Revision: https://reviews.llvm.org/D77426
llvm/include/llvm/IR/ProfileSummary.h
llvm/include/llvm/ProfileData/SampleProf.h
llvm/include/llvm/ProfileData/SampleProfWriter.h
llvm/lib/ProfileData/SampleProfReader.cpp
llvm/test/tools/llvm-profdata/show-prof-info.test [new file with mode: 0644]
llvm/test/tools/llvm-profdata/show-prof-size.test [deleted file]
llvm/tools/llvm-profdata/llvm-profdata.cpp