[ViewCFG] Allow printing edge weights in debuggers
authorHongtao Yu <hoy@fb.com>
Sun, 26 Apr 2020 18:22:16 +0000 (11:22 -0700)
committerHongtao Yu <hoy@fb.com>
Sun, 26 Apr 2020 20:18:29 +0000 (13:18 -0700)
commit93efe25ab386b25a04ae84f2d2019bdb0552cd2f
treeeedc812c41c92bf2623c0a9183d3e62e19544064
parent4cef9812eb8b753e1f510de65d79757182a6a9d4
[ViewCFG] Allow printing edge weights in debuggers

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.

Reviewers: wenlei, davidxl, knaumov

Reviewed By: wenlei, davidxl

Subscribers: MaskRay, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77978
llvm/include/llvm/Analysis/CFGPrinter.h
llvm/include/llvm/IR/Function.h
llvm/lib/Analysis/CFGPrinter.cpp