[PGO] Verify BFI counts after loading profile data
authorRong Xu <xur@google.com>
Mon, 14 Dec 2020 23:54:28 +0000 (15:54 -0800)
committerRong Xu <xur@google.com>
Mon, 14 Dec 2020 23:56:10 +0000 (15:56 -0800)
commit54e03d03a7a4d47f09d40bcbcfe484066a52a077
treea8c8a61096d0715fe2b1446d92b4e94399937ed2
parent9eac818370fe4b50a167627593bfe53e61c216bc
[PGO] Verify BFI counts after loading profile data

This patch adds the functionality to compare BFI counts with real
profile
counts right after reading the profile. It will print remarks under
-Rpass-analysis=pgo, or the internal option -pass-remarks-analysis=pgo.

Differential Revision: https://reviews.llvm.org/D91813
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenModule.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/test/Transforms/PGOProfile/Inputs/bfi_verification.proftext [new file with mode: 0644]
llvm/test/Transforms/PGOProfile/bfi_verification.ll [new file with mode: 0644]