This is an archive of the discontinued LLVM Phabricator instance.

[ViewCFG] Allow printing edge weights in debuggers
ClosedPublic

Authored by hoyFB on Apr 12 2020, 11:48 AM.

Details

Summary

Extending the Function::viewCFG prototypes to allow for printing block probability info in form of .dot files during debugging.

Also avoiding an AV when no BFI/BPI available.

Diff Detail

Event Timeline

hoyFB created this revision.Apr 12 2020, 11:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2020, 11:48 AM
hoyFB updated this revision to Diff 256871.Apr 12 2020, 11:49 AM

Updating D77978: [ViewCFG] Allow printing edge weights in debuggers

hoyFB updated this revision to Diff 256873.Apr 12 2020, 12:00 PM

Updating D77978: [ViewCFG] Allow printing edge weights in debuggers

Harbormaster failed remote builds in B52864: Diff 256869!
Harbormaster failed remote builds in B52868: Diff 256873!
wenlei accepted this revision.Apr 12 2020, 2:17 PM

Thanks for the change - this comes in handy for debugger. LGTM.

llvm/include/llvm/Analysis/CFGPrinter.h
71

nit: when raw weights is printed, both BFI and BPI is needed. The comment is slightly confusing, though functionality-wise it's fine as EdgeWeights is always checked before RawWeights.

This revision is now accepted and ready to land.Apr 12 2020, 2:17 PM
hoyFB updated this revision to Diff 257120.Apr 13 2020, 2:44 PM

Updating D77978: [ViewCFG] Allow printing edge weights in debuggers

hoyFB added a comment.Apr 13 2020, 2:45 PM

Decorated BFI/BPI parameters with const.

CFGPrinter.cpp has a viewCFG method -- that one should be replaced with the new interface as well.

hoyFB updated this revision to Diff 257143.Apr 13 2020, 4:25 PM

Updating D77978: [ViewCFG] Allow printing edge weights in debuggers

@davidxl Please let me know if you have more feedbacks. Thanks.

Delete Test Plan: if you don't intend to add anything.

hoyFB edited the summary of this revision. (Show Details)Apr 21 2020, 1:01 PM
hoyFB updated this revision to Diff 260177.Apr 26 2020, 11:47 AM
hoyFB edited the summary of this revision. (Show Details)

Updating D77978: [ViewCFG] Allow printing edge weights in debuggers

Rebased and capitalized function parameter names.

hoyFB closed this revision.Apr 26 2020, 1:27 PM