This is an archive of the discontinued LLVM Phabricator instance.

[CSSPGO] Avoid deleting probe instruction in FoldValueComparisonIntoPredecessors
ClosedPublic

Authored by wlei on May 18 2021, 1:22 PM.

Details

Summary

This change tries to fix a place missing moveAndDanglePseudoProbes . In FoldValueComparisonIntoPredecessors, it folds the BB into predecessors and then marked the BB unreachable. However, the original logic from the BB is still alive, deleting the probe will mislead the SampleLoader mark it as zero count sample.

Diff Detail

Event Timeline

wlei created this revision.May 18 2021, 1:22 PM
wlei requested review of this revision.May 18 2021, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 1:22 PM
wlei edited the summary of this revision. (Show Details)May 18 2021, 1:32 PM
wlei added reviewers: hoy, wenlei, wmi.
hoy added a comment.May 18 2021, 2:43 PM

Thanks for the fix. Is it possible to add a test?

wlei updated this revision to Diff 346325.May 18 2021, 8:02 PM

Address Hongtao's feedback, add test case

wlei added a comment.May 18 2021, 8:02 PM

Thanks for the fix. Is it possible to add a test?

Yes, test case is added.

hoy accepted this revision.May 19 2021, 9:23 AM

LGTM, thanks.

As discussed offline, we may want to experiment treating all missing probes as dangling in the final pass of the pipeline and see how effective the counts inference can be. This would avoid such ad-hoc fixes including the previous ones we made.

This revision is now accepted and ready to land.May 19 2021, 9:23 AM
wenlei accepted this revision.May 19 2021, 11:09 AM

lgtm, thanks.

This revision was landed with ongoing or failed builds.May 19 2021, 1:39 PM
This revision was automatically updated to reflect the committed changes.