[CodeView] Add CodeView support for PGO debug information
authorMichael Holman <michael.holman@microsoft.com>
Wed, 21 Apr 2021 22:29:19 +0000 (15:29 -0700)
committerReid Kleckner <rnk@google.com>
Wed, 21 Apr 2021 22:29:19 +0000 (15:29 -0700)
commit77357208c46a08b5b90729125236b52256209359
tree6f02a29695a62e0f271fe3ba7b0e7d49482c9c22
parentc4a83c4e69f1c858df787723df4923c41a23e00d
[CodeView] Add CodeView support for PGO debug information

This change adds debug information about whether PGO is being used or
not.

Microsoft performance tooling (e.g. xperf, WPA) uses this information to
show whether functions are optimized with PGO or not, as well as whether
PGO information is invalid.

This information is useful for validating whether training scenarios are
providing good coverage of real world scenarios, showing if profile data
is out of date, etc.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D99994
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/test/DebugInfo/COFF/pgo.ll [new file with mode: 0644]