This is an archive of the discontinued LLVM Phabricator instance.

[CSSPGO] Compute checksum mismatch recursively on nested profile
ClosedPublic

Authored by wlei on Aug 25 2023, 2:49 PM.

Details

Summary

Follow-up diff for https://reviews.llvm.org/D158891. Compute the checksum mismatch based on the original nested profile. Additionally, use a recursive way to compute the children mismatched samples in the nested tree even the top-level func checksum is matched.

Diff Detail

Event Timeline

wlei created this revision.Aug 25 2023, 2:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 2:49 PM
wlei requested review of this revision.Aug 25 2023, 2:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2023, 2:49 PM
wlei edited the summary of this revision. (Show Details)Aug 25 2023, 2:58 PM
wlei added reviewers: hoy, wenlei.
wenlei added inline comments.Aug 25 2023, 3:31 PM
llvm/lib/Transforms/IPO/SampleProfile.cpp
2170

nit: countMismatchedSamples?

2199

Given MismatchedFuncHashSamples is a member of SampleProfileMatcher, we probably don't need to pass it all the way through the recursive calls?

Same for other statistics that is a member of SampleProfileMatcher.

wlei added inline comments.Aug 25 2023, 5:47 PM
llvm/lib/Transforms/IPO/SampleProfile.cpp
2170

done!

2199

Ah, good catch, I was designing to use the variable outside of the function.

wlei updated this revision to Diff 553679.Aug 25 2023, 5:48 PM

Updating D158900: [CSSPGO] Compute checksum mismatch recursively on nested profile

wenlei accepted this revision.Aug 25 2023, 7:28 PM

lgtm, thanks.

This revision is now accepted and ready to land.Aug 25 2023, 7:28 PM
hoy accepted this revision.Aug 29 2023, 5:08 PM