[llvm-profgen] Skip duplication factor outside of body sample computation
authorWenlei He <wenlei@fb.com>
Tue, 19 Oct 2021 00:44:45 +0000 (17:44 -0700)
committerWenlei He <wenlei@fb.com>
Wed, 20 Oct 2021 06:10:45 +0000 (23:10 -0700)
commite8c245dcd3b9f4237cdfb9dbcc6669d0b81e7936
treedd17d123ff14a574da30a5906d2d5faed9b6f76d
parent063c2f89aa7f5b0b61a63d639d8124035f26935c
[llvm-profgen] Skip duplication factor outside of body sample computation

We incorrectly use duplication factor for total samples even though we already accumulate samples instead of taking MAX. It causes profile to have bloated total samples for functions with loop unrolled or vectorized. The change fix the issue for total sample, head sample and call target samples.

Differential Revision: https://reviews.llvm.org/D112042
llvm/test/tools/llvm-profgen/inline-noprobe2.test
llvm/tools/llvm-profgen/ProfileGenerator.cpp