Go to the source code of this file.
|
static void | writeCFGToDotFile (Function &F, BlockFrequencyInfo *BFI, BranchProbabilityInfo *BPI, uint64_t MaxFreq, bool CFGOnly=false) |
|
static void | viewCFG (Function &F, const BlockFrequencyInfo *BFI, const BranchProbabilityInfo *BPI, uint64_t MaxFreq, bool CFGOnly=false) |
|
| INITIALIZE_PASS (CFGViewerLegacyPass, "view-cfg", "View CFG of function", false, true) PreservedAnalyses CFGViewerPass |
|
| INITIALIZE_PASS (CFGOnlyViewerLegacyPass, "view-cfg-only", "View CFG of function (with no function bodies)", false, true) PreservedAnalyses CFGOnlyViewerPass |
|
| INITIALIZE_PASS (CFGPrinterLegacyPass, "dot-cfg", "Print CFG of function to 'dot' file", false, true) PreservedAnalyses CFGPrinterPass |
|
| INITIALIZE_PASS (CFGOnlyPrinterLegacyPass, "dot-cfg-only", "Print CFG of function to 'dot' file (with no function bodies)", false, true) PreservedAnalyses CFGOnlyPrinterPass |
|
|
static cl::opt< std::string > | CFGFuncName ("cfg-func-name", cl::Hidden, cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed.")) |
|
static cl::opt< std::string > | CFGDotFilenamePrefix ("cfg-dot-filename-prefix", cl::Hidden, cl::desc("The prefix used for the CFG dot file names.")) |
|
static cl::opt< bool > | HideUnreachablePaths ("cfg-hide-unreachable-paths", cl::init(false)) |
|
static cl::opt< bool > | HideDeoptimizePaths ("cfg-hide-deoptimize-paths", cl::init(false)) |
|
static cl::opt< double > | HideColdPaths ("cfg-hide-cold-paths", cl::init(0.0), cl::desc("Hide blocks with relative frequency below the given value")) |
|
static cl::opt< bool > | ShowHeatColors ("cfg-heat-colors", cl::init(true), cl::Hidden, cl::desc("Show heat colors in CFG")) |
|
static cl::opt< bool > | UseRawEdgeWeight ("cfg-raw-weights", cl::init(false), cl::Hidden, cl::desc("Use raw weights for labels. " "Use percentages as default.")) |
|
static cl::opt< bool > | ShowEdgeWeight ("cfg-weights", cl::init(false), cl::Hidden, cl::desc("Show edges labeled with weights")) |
|
◆ INITIALIZE_PASS() [1/4]
INITIALIZE_PASS |
( |
CFGOnlyPrinterLegacyPass |
, |
|
|
"dot-cfg-only" |
, |
|
|
"Print CFG of function to 'dot' file (with no function bodies)" |
, |
|
|
false |
, |
|
|
true |
|
|
) |
| |
◆ INITIALIZE_PASS() [2/4]
INITIALIZE_PASS |
( |
CFGOnlyViewerLegacyPass |
, |
|
|
"view-cfg-only" |
, |
|
|
"View CFG of function (with no function bodies)" |
, |
|
|
false |
, |
|
|
true |
|
|
) |
| |
◆ INITIALIZE_PASS() [3/4]
INITIALIZE_PASS |
( |
CFGPrinterLegacyPass |
, |
|
|
"dot-cfg" |
, |
|
|
"Print CFG of function to 'dot' file" |
, |
|
|
false |
, |
|
|
true |
|
|
) |
| |
◆ INITIALIZE_PASS() [4/4]
INITIALIZE_PASS |
( |
CFGViewerLegacyPass |
, |
|
|
"view-cfg" |
, |
|
|
"View CFG of function" |
, |
|
|
false |
, |
|
|
true |
|
|
) |
| |
◆ viewCFG()
◆ writeCFGToDotFile()
Definition at line 62 of file CFGPrinter.cpp.
References CFGDotFilenamePrefix, CFGOnly, llvm::errs(), F, llvm::sys::fs::OF_Text, llvm::DOTFuncInfo::setEdgeWeights(), llvm::DOTFuncInfo::setHeatColors(), llvm::DOTFuncInfo::setRawEdgeWeights(), ShowEdgeWeight, ShowHeatColors, UseRawEdgeWeight, and llvm::WriteGraph().
Referenced by INITIALIZE_PASS().
◆ CFGDotFilenamePrefix
cl::opt< std::string > CFGDotFilenamePrefix("cfg-dot-filename-prefix", cl::Hidden, cl::desc("The prefix used for the CFG dot file names.")) |
( |
"cfg-dot-filename-prefix" |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("The prefix used for the CFG dot file names.") |
|
|
) |
| |
|
static |
◆ CFGFuncName
cl::opt< std::string > CFGFuncName("cfg-func-name", cl::Hidden, cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed.")) |
( |
"cfg-func-name" |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed.") |
|
|
) |
| |
|
static |
◆ HideColdPaths
cl::opt< double > HideColdPaths("cfg-hide-cold-paths", cl::init(0.0), cl::desc("Hide blocks with relative frequency below the given value")) |
( |
"cfg-hide-cold-paths" |
, |
|
|
cl::init(0.0) |
, |
|
|
cl::desc("Hide blocks with relative frequency below the given value") |
|
|
) |
| |
|
static |
◆ HideDeoptimizePaths
cl::opt< bool > HideDeoptimizePaths("cfg-hide-deoptimize-paths", cl::init(false)) |
( |
"cfg-hide-deoptimize-paths" |
, |
|
|
cl::init(false) |
|
|
) |
| |
|
static |
◆ HideUnreachablePaths
cl::opt< bool > HideUnreachablePaths("cfg-hide-unreachable-paths", cl::init(false)) |
( |
"cfg-hide-unreachable-paths" |
, |
|
|
cl::init(false) |
|
|
) |
| |
|
static |
◆ ShowEdgeWeight
cl::opt< bool > ShowEdgeWeight("cfg-weights", cl::init(false), cl::Hidden, cl::desc("Show edges labeled with weights")) |
( |
"cfg-weights" |
, |
|
|
cl::init(false) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Show edges labeled with weights") |
|
|
) |
| |
|
static |
◆ ShowHeatColors
cl::opt< bool > ShowHeatColors("cfg-heat-colors", cl::init(true), cl::Hidden, cl::desc("Show heat colors in CFG")) |
( |
"cfg-heat-colors" |
, |
|
|
cl::init(true) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Show heat colors in CFG") |
|
|
) |
| |
|
static |
◆ UseRawEdgeWeight
cl::opt< bool > UseRawEdgeWeight("cfg-raw-weights", cl::init(false), cl::Hidden, cl::desc("Use raw weights for labels. " "Use percentages as default.")) |
( |
"cfg-raw-weights" |
, |
|
|
cl::init(false) |
, |
|
|
cl::Hidden |
, |
|
|
cl::desc("Use raw weights for labels. " "Use percentages as default.") |
|
|
) |
| |
|
static |