[SampleFDO] Skip profile reading when flattened profile used in ThinLTO postlink

If the sample profile has no inlining hierachy information included, we call
the sample profile is flattened. For flattened profile, in ThinLTO postlink
phase, SampleProfileLoader's hot function inlining and profile annotation will
do nothing, so it is better to save the effort to read in the profile and run
the sample profile loader pass. It is helpful for reducing compile time when
the flattened profile is huge.

Differential Revision: https://reviews.llvm.org/D54819


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351476 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed