Page MenuHomePhabricator

[PGO] verify BFI counts after loading profile data
AcceptedPublic

Authored by xur on Thu, Nov 19, 11:57 AM.

Details

Reviewers
davidxl
Summary

Compare BFI counts with the raw profile counts and print messages.

Split from https://reviews.llvm.org/D61540

Diff Detail

Event Timeline

xur created this revision.Thu, Nov 19, 11:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Nov 19, 11:57 AM
davidxl added inline comments.Thu, Nov 19, 12:24 PM
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
1704

Probably use opt-remark-analysis -- it can provide line number which is more informative. The function header print can remain as debug print.

1711

opt-remark seems better.

1713

nit: Num_of_mismatch_BB

xur added inline comments.Thu, Nov 19, 9:57 PM
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
1704

Agreed. Remarks fit well here. I will change to use remarks.

1711

Ditto.

1713

Will change.

xur updated this revision to Diff 306744.Fri, Nov 20, 11:12 AM

Using remarks to print the message.
Note that the message printing is still under the internal option.
(This seems OK to me as other options, like EmitBranchProbability, are doing the same.)

davidxl added inline comments.Fri, Nov 20, 11:32 AM
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
1710

Remark or RemarkAnalysis?

davidxl added inline comments.Fri, Nov 20, 11:36 AM
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
262

Add a description here that -Rpass-analysis=PGO is needed for messages.

xur added inline comments.Fri, Nov 20, 12:20 PM
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
262

Sure.

1710

I thought you suggested Remark. I'm OK either way.
I will change to RemarkAnalysis.

xur updated this revision to Diff 306763.Fri, Nov 20, 12:36 PM

Integrated David's review comments.

davidxl accepted this revision.Fri, Nov 20, 2:05 PM

lgtm

This revision is now accepted and ready to land.Fri, Nov 20, 2:05 PM