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.
Paths
| Differential D77978
[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 TimelineComment Actions Thanks for the change - this comes in handy for debugger. LGTM.
This revision is now accepted and ready to land.Apr 12 2020, 2:17 PM Comment Actions CFGPrinter.cpp has a viewCFG method -- that one should be replaced with the new interface as well.
Revision Contents
Diff 260177 llvm/include/llvm/Analysis/CFGPrinter.h
llvm/include/llvm/IR/Function.h
llvm/lib/Analysis/CFGPrinter.cpp
|
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.